fixed calls to request script
This commit is contained in:
parent
7b231b5ed3
commit
2bf9560737
|
@ -104,15 +104,15 @@ class Payment(PaymentCommon):
|
|||
def __init__(self, options, logger=LOGGER):
|
||||
self.options = options
|
||||
self.logger = logger
|
||||
logger.debug('initializing sips payment class with %s' % options)
|
||||
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[BINPATH], executable)
|
||||
executable = os.path.join(self.options.pop(BINPATH), executable)
|
||||
args = [executable] + ["%s=%s" % p for p in params.iteritems()]
|
||||
self.logger.debug('executing %s' % args)
|
||||
result, _ = subprocess.Popen(args, executable=executable,
|
||||
result,_ = subprocess.Popen(' '.join(args),
|
||||
stdout=subprocess.PIPE, shell=True).communicate()
|
||||
if result[0] == '!':
|
||||
result = result[1:]
|
||||
|
@ -138,6 +138,7 @@ 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
|
||||
|
|
Loading…
Reference in New Issue