-
Notifications
You must be signed in to change notification settings - Fork 0
/
InstantPaymentPost.py
46 lines (40 loc) · 1.11 KB
/
InstantPaymentPost.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import zeep
import config
#
# The nain
#
def main():
wsdl = './WSDL/WinstantPayWebService.xml'
client = zeep.Client(wsdl=wsdl)
res = client.service.InstantPaymentCreate(request = {
'ServiceCallerIdentity':{
'LoginId': config.userLogin,
'Password': config.userPassword,
'ServiceCallerId': config.callerId
},
'FromCustomer': 'RALF',
'ToCustomer': 'Argie1970',
'Amount': 10.000,
'CurrencyCode': 'THB',
'ValueDate': '',
'ReasonForPayment':'',
'ExternalReference': '',
'Memo':''
})
print res
payment_id = res.PaymentInformation.PaymentId
print("Payment id is %s\n" % payment_id)
res = client.service.InstantPaymentPost(request = {
'ServiceCallerIdentity':{
'LoginId': config.userLogin,
'Password': config.userPassword,
'ServiceCallerId': config.callerId
},
'InstantPaymentId': payment_id
})
print res
#
# Invoke Main from here to solve accidential import
#
if __name__ == "__main__":
main()