Merge remote-tracking branch 'source_origin/dev_odex25_donation' into dev_odex25_donation
This commit is contained in:
commit
c308244556
|
|
@ -241,7 +241,7 @@ class HyperPayTokenization(Controller):
|
|||
_logger.warning('Token already exists for registration %s, using existing token' % registration_id)
|
||||
token_id = existing_token
|
||||
else:
|
||||
payment_icon_id = request.env['payment.icon'].sudo().search([('name', 'ilike', data.get('paymentBrand', '')), ('acquirer_ids', 'in', acquirer_id.ids)], limit=1)
|
||||
payment_icon_id = acquirer_id.payment_icon_ids[:1]
|
||||
|
||||
card_vals = {
|
||||
'name': f"{card.get('bin', '')} **** **** **** {card.get('last4Digits', '')}",
|
||||
|
|
|
|||
|
|
@ -13,4 +13,17 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="payment_token_form_view" model="ir.ui.view">
|
||||
<field name="name">payment.token.form.view</field>
|
||||
<field name="model">payment.token</field>
|
||||
<field name="inherit_id" ref="payment.payment_token_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="acquirer_ref" position="after">
|
||||
<field name="payment_icon_id" />
|
||||
<field name="hyperpay_initial_transaction_id" />
|
||||
<field name="hyperpay_payment_brand" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<template id="payment_hyperpay_tokenization.payment_tokens_list" inherit_id="payment.payment_tokens_list">
|
||||
<xpath expr="//t[@t-foreach='pms']//label" position="after">
|
||||
<ul class="float-right list-inline payment_icon_list">
|
||||
<ul class="float-right list-inline payment_icon_list" t-if="pm.payment_icon_id">
|
||||
<li t-attf-class="list-inline-item">
|
||||
<span t-field="pm.payment_icon_id.image_payment_form" t-options='{"widget": "image", "alt-field": "hyperpay_payment_brand"}'/>
|
||||
</li>
|
||||
|
|
|
|||
Loading…
Reference in New Issue