| Line 19... |
Line 19... |
| 19 |
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
|
19 |
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
|
| 20 |
print ''
|
20 |
print ''
|
| 21 |
print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
|
21 |
print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
|
| 22 |
print ''
|
22 |
print ''
|
| 23 |
print 'Functions:'
|
23 |
print 'Functions:'
|
| 24 |
print ' i64 createPayment(i64 userId, double amount, i64 gatewayId, i64 txnId)'
|
24 |
print ' i64 createPayment(i64 userId, double amount, i64 gatewayId, i64 txnId, bool isDigital)'
|
| 25 |
print ' getPaymentsForUser(i64 userId, i64 fromTime, i64 toTime, PaymentStatus status, i64 gatewayId)'
|
25 |
print ' getPaymentsForUser(i64 userId, i64 fromTime, i64 toTime, PaymentStatus status, i64 gatewayId)'
|
| 26 |
print ' getPayments(i64 fromTime, i64 toTime, PaymentStatus status, i64 gatewayId)'
|
26 |
print ' getPayments(i64 fromTime, i64 toTime, PaymentStatus status, i64 gatewayId)'
|
| 27 |
print ' getPaymentsByCapturedDate(i64 fromTime, i64 toTime, i64 gatewayId)'
|
27 |
print ' getPaymentsByCapturedDate(i64 fromTime, i64 toTime, i64 gatewayId)'
|
| 28 |
print ' PaymentGateway getPaymentGateway(i64 id)'
|
28 |
print ' PaymentGateway getPaymentGateway(i64 id)'
|
| 29 |
print ' getActivePaymentGateways()'
|
29 |
print ' getActivePaymentGateways()'
|
| Line 31... |
Line 31... |
| 31 |
print ' getPaymentForTxnId(i64 txnId)'
|
31 |
print ' getPaymentForTxnId(i64 txnId)'
|
| 32 |
print ' Payment getSuccessfulPaymentForTxnId(i64 txnId)'
|
32 |
print ' Payment getSuccessfulPaymentForTxnId(i64 txnId)'
|
| 33 |
print ' bool updatePaymentDetails(i64 id, string gatewayPaymentId, string sessionId, string gatewayTxnStatus, string description, string gatewayTxnId, string authCode, string referenceCode, string errorCode, PaymentStatus status, string gatewayTxnDate, attributes)'
|
33 |
print ' bool updatePaymentDetails(i64 id, string gatewayPaymentId, string sessionId, string gatewayTxnStatus, string description, string gatewayTxnId, string authCode, string referenceCode, string errorCode, PaymentStatus status, string gatewayTxnDate, attributes)'
|
| 34 |
print ' getSuccessfulPaymentsAmountRange()'
|
34 |
print ' getSuccessfulPaymentsAmountRange()'
|
| 35 |
print ' string initializeHdfcPayment(i64 merchantPaymentId)'
|
35 |
print ' string initializeHdfcPayment(i64 merchantPaymentId)'
|
| - |
|
36 |
print ' string doHdfcPaymentForDigitalOrder(i64 merchantPaymentId, i64 rechargeOrderId)'
|
| 36 |
print ' string initializeHdfcEmiPayment(i64 merchantPaymentId)'
|
37 |
print ' string initializeHdfcEmiPayment(i64 merchantPaymentId)'
|
| 37 |
print ' i64 createRefund(i64 orderId, i64 merchantTxnId, double amount)'
|
38 |
print ' i64 createRefund(i64 orderId, i64 merchantTxnId, double amount)'
|
| 38 |
print ' bool capturePayment(i64 merchantTxnId)'
|
39 |
print ' bool capturePayment(i64 merchantTxnId)'
|
| 39 |
print ' bool partiallyCapturePayment(i64 merchantTxnId, double amount, string xferBy, string xferTxnId, i64 xferDate)'
|
40 |
print ' bool partiallyCapturePayment(i64 merchantTxnId, double amount, string xferBy, string xferTxnId, i64 xferDate)'
|
| 40 |
print ' getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category)'
|
41 |
print ' getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category)'
|
| Line 88... |
Line 89... |
| 88 |
protocol = TBinaryProtocol.TBinaryProtocol(transport)
|
89 |
protocol = TBinaryProtocol.TBinaryProtocol(transport)
|
| 89 |
client = PaymentService.Client(protocol)
|
90 |
client = PaymentService.Client(protocol)
|
| 90 |
transport.open()
|
91 |
transport.open()
|
| 91 |
|
92 |
|
| 92 |
if cmd == 'createPayment':
|
93 |
if cmd == 'createPayment':
|
| 93 |
if len(args) != 4:
|
94 |
if len(args) != 5:
|
| 94 |
print 'createPayment requires 4 args'
|
95 |
print 'createPayment requires 5 args'
|
| 95 |
sys.exit(1)
|
96 |
sys.exit(1)
|
| 96 |
pp.pprint(client.createPayment(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),))
|
97 |
pp.pprint(client.createPayment(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),))
|
| 97 |
|
98 |
|
| 98 |
elif cmd == 'getPaymentsForUser':
|
99 |
elif cmd == 'getPaymentsForUser':
|
| 99 |
if len(args) != 5:
|
100 |
if len(args) != 5:
|
| 100 |
print 'getPaymentsForUser requires 5 args'
|
101 |
print 'getPaymentsForUser requires 5 args'
|
| 101 |
sys.exit(1)
|
102 |
sys.exit(1)
|
| Line 159... |
Line 160... |
| 159 |
if len(args) != 1:
|
160 |
if len(args) != 1:
|
| 160 |
print 'initializeHdfcPayment requires 1 args'
|
161 |
print 'initializeHdfcPayment requires 1 args'
|
| 161 |
sys.exit(1)
|
162 |
sys.exit(1)
|
| 162 |
pp.pprint(client.initializeHdfcPayment(eval(args[0]),))
|
163 |
pp.pprint(client.initializeHdfcPayment(eval(args[0]),))
|
| 163 |
|
164 |
|
| - |
|
165 |
elif cmd == 'doHdfcPaymentForDigitalOrder':
|
| - |
|
166 |
if len(args) != 2:
|
| - |
|
167 |
print 'doHdfcPaymentForDigitalOrder requires 2 args'
|
| - |
|
168 |
sys.exit(1)
|
| - |
|
169 |
pp.pprint(client.doHdfcPaymentForDigitalOrder(eval(args[0]),eval(args[1]),))
|
| - |
|
170 |
|
| 164 |
elif cmd == 'initializeHdfcEmiPayment':
|
171 |
elif cmd == 'initializeHdfcEmiPayment':
|
| 165 |
if len(args) != 1:
|
172 |
if len(args) != 1:
|
| 166 |
print 'initializeHdfcEmiPayment requires 1 args'
|
173 |
print 'initializeHdfcEmiPayment requires 1 args'
|
| 167 |
sys.exit(1)
|
174 |
sys.exit(1)
|
| 168 |
pp.pprint(client.initializeHdfcEmiPayment(eval(args[0]),))
|
175 |
pp.pprint(client.initializeHdfcEmiPayment(eval(args[0]),))
|