Commit 2a85fcdf authored by Łukasz Nowak's avatar Łukasz Nowak

Return raw data too.

Also document method a bit.
parent aa8c33dd
No related merge requests found
......@@ -13,7 +13,20 @@ except ImportError:
else:
import time
class PayzenSOAP:
"""SOAP communication
Methods are returning list of:
* parsed response
* sent XML
* received XML
SOAP protocol is assumed as untrusted and dangerous, users of those methods
are encouraged to log such messages for future debugging."""
def soap_getInfo(self, transmissionDate, transactionId):
"""Returns getInfo
transmissionDate is "raw" date in format YYYYMMDD, without any marks
transactionId is id of transaction for this date"""
client = suds.client.Client(self.wsdl_link.getUrlString())
sorted_keys = ('shopId', 'transmissionDate', 'transactionId',
'sequenceNb', 'ctxMode')
......@@ -35,7 +48,8 @@ else:
signature += str(v) + '+'
signature += self.getServicePassword()
kw['wsSignature'] = hashlib.sha1(signature).hexdigest()
return client.service.getInfo(**kw)
data = client.service.getInfo(**kw)
return [data, str(client.last_sent()), str(client.last_received())]
class PayzenService(XMLObject, PayzenSOAP):
meta_type = 'Payzen Service'
......
23
\ No newline at end of file
24
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment