[FIX] payment_ingenico: fix payment_token creation
Now, we can again creates ingenico token on production environment. Commit https://github.com/odoo/odoo/commit/f0e059e6#diff-0c487d0R558 replaced aquirer.id by self.acquire_id.id. It is wrong since env['payment.token'].create() will call the function with self == payment.token(). self.acquirer_id == False --> self.acquirer_id.state != 'enabled' --> request done in test mode each time. closes odoo/odoo#44126 X-original-commit: 68028b90c97f84b40bb5952f7867896456c13253 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
@@ -561,7 +561,7 @@ class PaymentToken(models.Model):
|
||||
'PROCESS_MODE': 'CHECKANDPROCESS',
|
||||
}
|
||||
|
||||
url = 'https://secure.ogone.com/ncol/%s/AFU_agree.asp' % ('prod' if self.acquirer_id.state == 'enabled' else 'test')
|
||||
url = 'https://secure.ogone.com/ncol/%s/AFU_agree.asp' % ('prod' if acquirer.state == 'enabled' else 'test')
|
||||
_logger.info("ogone_create: Creating new alias %s via url %s", alias, url)
|
||||
result = requests.post(url, data=data).content
|
||||
|
||||
|
||||
Reference in New Issue
Block a user