[FIX] payment_adyen: pspReference is not mandatory
Indeed, when canceling a transaction, pspReference is not passed. In such a case, the arg authResult is set to `CANCELLED`, and in such a case, we should just bypass the form_feedback, as done in the payment_paypal module. opw-634210
This commit is contained in:
parent
238f1fa591
commit
338df8f492
|
@ -20,10 +20,9 @@ class AdyenController(http.Controller):
|
||||||
@http.route([
|
@http.route([
|
||||||
'/payment/adyen/return/',
|
'/payment/adyen/return/',
|
||||||
], type='http', auth='none')
|
], type='http', auth='none')
|
||||||
def adyen_return(self, pspReference, **post):
|
def adyen_return(self, **post):
|
||||||
""" Paypal IPN."""
|
|
||||||
post["pspReference"] = pspReference
|
|
||||||
_logger.info('Beginning Adyen form_feedback with post data %s', pprint.pformat(post)) # debug
|
_logger.info('Beginning Adyen form_feedback with post data %s', pprint.pformat(post)) # debug
|
||||||
|
if post.get('authResult') not in ['CANCELLED']:
|
||||||
request.registry['payment.transaction'].form_feedback(request.cr, SUPERUSER_ID, post, 'adyen', context=request.context)
|
request.registry['payment.transaction'].form_feedback(request.cr, SUPERUSER_ID, post, 'adyen', context=request.context)
|
||||||
return_url = post.pop('return_url', '')
|
return_url = post.pop('return_url', '')
|
||||||
if not return_url:
|
if not return_url:
|
||||||
|
|
Loading…
Reference in New Issue