py-pay
Python pay library.
pip install -U py-pay
微信支付
from py_pay.wechat import WechatPay
wechat_conf = {
'app_id': 'appid',
'mch_id': '商户号',
'key': '签名key',
# 需要双向证书的配置下面两行
# 'cert_file': '/path/to/cert_file',
# 'cert_key': '/path/to/cert_key',
}
wechat_pay = WechatPay(**wechat_conf)
# 示例
params = {'foo': 'bar'}
wechat_pay.unifiedorder(params) # 统一下单
wechat_pay.orderquery(params) # 查询订单
wechat_pay.closeorder(params) # 关闭订单
wechat_pay.refund(params) # 申请退款
wechat_pay.refundquery(params) # 退款查询
wechat_pay.pay_notify(request.body) # 支付通知
wechat_pay.response(False, '签名失败') # 支付通知
wechat_pay.promotion_transfers(params) # 企业付款
Metadata
Release files for py-pay 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| py-pay-1.3.0.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_pay-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.1 kB
Release files / py-pay-1.3.0.tar.gz
| Download URL | py-pay-1.3.0.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13db73ecc53685261f436cda40824e9aa8720f3e2f22bb70bfc3c5c16dc57292
|
|
BLAKE2b-256 checksum How to use checksums |
4d8065b83fec395952b05edf301940b4a7fa0c247b6269ea39dc02d49918625d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
|
Release files / py_pay-1.3.0-py3-none-any.whl
| Download URL | py_pay-1.3.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78c1f9fcaa7dbfc97484c46de3274540a85695556e76ae6878282e4bf97b17fb
|
|
BLAKE2b-256 checksum How to use checksums |
bafddaf182661091a15c20eb7027ce4d7aeb1e0f3515c4365d5de3d84587e546
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
|