[IMP] payment_hyperpay_tokenization: choose the first icon from acquirer
This commit is contained in:
parent
ef05271aa0
commit
64e323a8d4
|
|
@ -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', '')}",
|
||||
|
|
|
|||
Loading…
Reference in New Issue