summaryrefslogtreecommitdiffstats
path: root/eopayment/sips.py
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2016-02-16 09:51:41 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2016-02-16 17:20:48 (GMT)
commitb69cefbfa86a6c9f51e199217d141d8593b051d5 (patch)
tree84e7e6a0c0a138210fabf68f3f4b657ac11beb76 /eopayment/sips.py
parent8cd625e4651ededa92d888c31d64fafa578f2a9e (diff)
downloadeopayment-b69cefbfa86a6c9f51e199217d141d8593b051d5.zip
eopayment-b69cefbfa86a6c9f51e199217d141d8593b051d5.tar.gz
eopayment-b69cefbfa86a6c9f51e199217d141d8593b051d5.tar.bz2
standardise normal_return_url and automatic_return_url options (#9998)
Diffstat (limited to 'eopayment/sips.py')
-rw-r--r--eopayment/sips.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/eopayment/sips.py b/eopayment/sips.py
index 73c79d5..47b6d20 100644
--- a/eopayment/sips.py
+++ b/eopayment/sips.py
@@ -7,6 +7,7 @@ import logging
import os
import os.path
import uuid
+import warnings
from common import PaymentCommon, HTML, PaymentResponse
from cb import CB_RESPONSE_CODES
@@ -143,8 +144,13 @@ class Payment(PaymentCommon):
params['amount'] = str(int(Decimal(amount) * 100))
if email:
params['customer_email'] = email
- if next_url:
- params['normal_return_url'] = next_url
+ normal_return_url = self.normal_return_url
+ if next_url and not normal_return_url:
+ warnings.warn("passing next_url to request() is deprecated, "
+ "set normal_return_url in options", DeprecationWarning)
+ normal_return_url = next_url
+ if normal_return_url:
+ params['normal_return_url'] = normal_return_url
code, error, form = self.execute('request', params)
if int(code) == 0:
return params[ORDER_ID], HTML, form