[FIX] [IMP] adyen: fixed controller (contacted with a GET request); added some data verification when processing the data coming back from adyen
bzr revid: tde@openerp.com-20131204170024-j2czn5nm9p56oosj
This commit is contained in:
@@ -19,7 +19,7 @@ class AdyenController(http.Controller):
|
||||
|
||||
@website.route([
|
||||
'/payment/adyen/return/',
|
||||
], type='http', auth='public', methods=['POST'])
|
||||
], type='http', auth='public')
|
||||
def adyen_return(self, **post):
|
||||
""" Paypal IPN. """
|
||||
_logger.info('Beginning Adyen form_feedback with post data %s', pprint.pformat(post)) # debug
|
||||
|
||||
@@ -140,12 +140,18 @@ class TxAdyen(osv.Model):
|
||||
return tx
|
||||
|
||||
def _adyen_form_get_invalid_parameters(self, cr, uid, tx, data, context=None):
|
||||
# TODO: txn_id: shoudl be false at draft, set afterwards, and verified with txn details
|
||||
invalid_parameters = []
|
||||
|
||||
# reference at acquirer: pspReference
|
||||
if tx.acquirer_reference and data.get('pspReference') != tx.acquirer_reference:
|
||||
invalid_parameters.append(('pspReference', data.get('pspReference'), tx.acquirer_reference))
|
||||
# seller
|
||||
if data.get('skinCode') != tx.acquirer_id.adyen_skin_code:
|
||||
invalid_parameters.append(('skinCode', data.get('skinCode'), tx.acquirer_id.adyen_skin_code))
|
||||
# result
|
||||
if not data.get('authResult'):
|
||||
invalid_parameters.append(('authResult', data.get('authResult'), 'something'))
|
||||
|
||||
return invalid_parameters
|
||||
|
||||
def _adyen_form_validate(self, cr, uid, tx, data, context=None):
|
||||
|
||||
Reference in New Issue
Block a user