[FIX] payment: avoid orphan tokens
Don't use token without the partner_id set
This commit is contained in:
@@ -258,8 +258,8 @@ class PaymentPortal(portal.CustomerPortal):
|
||||
and tokenization_required_or_requested
|
||||
)
|
||||
elif flow == 'token': # Payment by token
|
||||
token_sudo = request.env['payment.token'].sudo().browse(payment_option_id)
|
||||
acquirer_sudo = token_sudo.acquirer_id
|
||||
token = request.env['payment.token'].browse(payment_option_id)
|
||||
acquirer_sudo = token.acquirer_id.sudo()
|
||||
token_id = payment_option_id
|
||||
tokenize = False
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user