summaryrefslogtreecommitdiffstats
path: root/eopayment/sips.py
diff options
context:
space:
mode:
authorraphigaziano <r.gaziano@gmail.com>2013-12-12 08:39:49 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2013-12-12 11:05:56 (GMT)
commit95abe9aa42f5ff0440b0eaff0314e515dc617978 (patch)
tree7d4e9472b2a91bc8dd4e53af583194ea8111e0ca /eopayment/sips.py
parent35ec4728f1d3207002a0601cea9d4158d7b9d5b0 (diff)
downloadeopayment-95abe9aa42f5ff0440b0eaff0314e515dc617978.zip
eopayment-95abe9aa42f5ff0440b0eaff0314e515dc617978.tar.gz
eopayment-95abe9aa42f5ff0440b0eaff0314e515dc617978.tar.bz2
store binpath on init and use this copy later on
Diffstat (limited to 'eopayment/sips.py')
-rw-r--r--eopayment/sips.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/eopayment/sips.py b/eopayment/sips.py
index 2a73354..da3fcca 100644
--- a/eopayment/sips.py
+++ b/eopayment/sips.py
@@ -103,13 +103,14 @@ class Payment(PaymentCommon):
def __init__(self, options, logger=LOGGER):
self.options = options
+ self.binpath = self.options.pop(BINPATH)
self.logger = logger
self.logger.debug('initializing sips payment class with %s' % options)
def execute(self, executable, params):
if PATHFILE in self.options:
params[PATHFILE] = self.options[PATHFILE]
- executable = os.path.join(self.options.pop(BINPATH), executable)
+ executable = os.path.join(self.binpath, executable)
args = [executable] + ["%s=%s" % p for p in params.iteritems()]
self.logger.debug('executing %s' % args)
result,_ = subprocess.Popen(' '.join(args),
@@ -143,7 +144,6 @@ class Payment(PaymentCommon):
params['customer_email'] = email
if next_url:
params['normal_return_url'] = next_url
- params.pop('binpath')
code, error, form = self.execute('request', params)
if int(code) == 0:
return params[ORDER_ID], HTML, form