[FIX] payment_adyen: update keys used to generate the merchant

signature + correctly raise errors in validation.
This commit is contained in:
Jay Patel 2015-02-11 10:11:10 +05:30 committed by Thibault Delavallée
parent c0496ed03a
commit 82ab5d0f0e
1 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ class AcquirerAdyen(osv.Model):
if inout == 'in':
keys = "paymentAmount currencyCode shipBeforeDate merchantReference skinCode merchantAccount sessionValidity shopperEmail shopperReference recurringContract allowedMethods blockedMethods shopperStatement merchantReturnData billingAddressType deliveryAddressType offset".split()
else:
keys = "authResult pspReference merchantReference skinCode paymentMethod shopperLocale merchantReturnData".split()
keys = "authResult pspReference merchantReference skinCode merchantReturnData".split()
def get_value(key):
if values.get(key):
@ -135,7 +135,7 @@ class TxAdyen(osv.Model):
if shasign_check != data.get('merchantSig'):
error_msg = 'Adyen: invalid merchantSig, received %s, computed %s' % (data.get('merchantSig'), shasign_check)
_logger.warning(error_msg)
# raise ValidationError(error_msg)
raise ValidationError(error_msg)
return tx