-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusage.py
More file actions
51 lines (40 loc) · 1.24 KB
/
usage.py
File metadata and controls
51 lines (40 loc) · 1.24 KB
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
47
48
49
50
51
def wx_main():
"""TODO: Docstring for wx_main.
:returns: TODO
"""
from pay import wxpay
wxpay.wx_app()
def alipay_main():
"""TODO: Docstring for alipay_main.
:returns: TODO
"""
from pay import alipay
# print(alipay.trade_app_pay('1', 0.01, 'test'))
print(alipay.parse_response(
get(
alipay.trade_query('20161112111')[0],
alipay.trade_query('20161112111')[1]).text,
'query'))
print(alipay.parse_response(
get(
alipay.trade_refund('20161112111', '2.00')[0],
alipay.trade_refund('20161112111', '2.00')[1]).text,
'refund'))
print(alipay.parse_response(
get(
alipay.trade_cancel('20161112111')[0],
alipay.trade_cancel('20161112111')[1]).text,
'cancel'))
print(alipay.parse_response(
get(
alipay.trade_refund_query('20161112111')[0],
alipay.trade_refund_query('20161112111')[1]).text,
'refund_query'))
print(alipay.parse_response(
get(
alipay.trade_close('201611121111')[0],
alipay.trade_close('201611121111')[1]).text,
'close'))
if __name__ == "__main__":
from requests import get
alipay_main()