eopayment: make all response() methods accept **kwargs (#7496)
This commit is contained in:
parent
f68292849f
commit
768545df13
|
@ -103,7 +103,7 @@ class Payment(object):
|
|||
'''
|
||||
return self.backend.request(amount, **kwargs)
|
||||
|
||||
def response(self, query_string):
|
||||
def response(self, query_string, **kwargs):
|
||||
'''
|
||||
Process a response from the Bank API. It must be used on the URL
|
||||
where the user browser of the payment server is going to post the
|
||||
|
@ -136,4 +136,4 @@ class Payment(object):
|
|||
your site as a web service.
|
||||
|
||||
'''
|
||||
return self.backend.response(query_string)
|
||||
return self.backend.response(query_string, **kwargs)
|
||||
|
|
|
@ -96,7 +96,7 @@ class Payment(PaymentCommon):
|
|||
url = '%s?%s' % (SERVICE_URL, urllib.urlencode(query))
|
||||
return transaction_id, URL, url
|
||||
|
||||
def response(self, query_string, logger=LOGGER):
|
||||
def response(self, query_string, logger=LOGGER, **kwargs):
|
||||
form = parse_qs(query_string)
|
||||
transaction_id = form.get('transaction_id',[''])[0]
|
||||
form[self.BANK_ID] = transaction_id
|
||||
|
|
|
@ -506,7 +506,7 @@ class Payment(PaymentCommon):
|
|||
'value': params[key]} for key in params])
|
||||
return reference, FORM, form
|
||||
|
||||
def response(self, query_string):
|
||||
def response(self, query_string, **kwargs):
|
||||
params = urlparse.parse_qs(query_string, True)
|
||||
params = dict((key.upper(), params[key][0]) for key in params)
|
||||
reference = params['ORDERID']
|
||||
|
|
|
@ -150,7 +150,7 @@ class Payment(PaymentCommon):
|
|||
else:
|
||||
raise RuntimeError('sips/request returned -1: %s' % error)
|
||||
|
||||
def response(self, query_string):
|
||||
def response(self, query_string, **kwargs):
|
||||
form = urlparse.parse_qs(query_string)
|
||||
params = {'message': form[DATA][0]}
|
||||
result = self.execute('response', params)
|
||||
|
|
|
@ -154,7 +154,7 @@ next_url=%s' % (amount, email, next_url))
|
|||
logger.debug('full url %s' % url)
|
||||
return reference, URL, url
|
||||
|
||||
def response(self, query_string, logger=LOGGER):
|
||||
def response(self, query_string, logger=LOGGER, **kwargs):
|
||||
form = urlparse.parse_qs(query_string)
|
||||
for key, value in form.iteritems():
|
||||
form[key] = value[0]
|
||||
|
|
|
@ -309,7 +309,7 @@ class Payment(PaymentCommon):
|
|||
self.logger.debug('%s transaction id: %s', __name__, transaction_id)
|
||||
return transaction_id, URL, url
|
||||
|
||||
def response(self, query_string):
|
||||
def response(self, query_string, **kwargs):
|
||||
fields = urlparse.parse_qs(query_string, True)
|
||||
for key, value in fields.iteritems():
|
||||
fields[key] = value[0]
|
||||
|
|
|
@ -121,7 +121,7 @@ class Payment(PaymentCommon):
|
|||
url = '%s?%s' % (self.service_url, urlencode(params))
|
||||
return transaction_id, URL, url
|
||||
|
||||
def response(self, query_string):
|
||||
def response(self, query_string, **kwargs):
|
||||
fields = parse_qs(query_string, True)
|
||||
for key, value in fields.iteritems():
|
||||
fields[key] = value[0]
|
||||
|
|
Loading…
Reference in New Issue