A python implementation for wechatpay-apiv3
Project description
wechatpay-py
This is a python implementation of wechatpay apiv3. Implemented with aiohttp for now. The project is now at alpha state, some features are still missing, use at your own risk.
Install
pip install wechatpay-py
Usage
credential = WechatPayCredential(
mch_id='123456',
app_id='',
mch_certificateSerialNumber='asdfasdfadfasdfasdfasdf',
mch_priv_key_file='path to the key file'
)
validator = WechatPayValidator(
*, **kwargs
)
client = AsyncWechatPayClient(
credential,
validator
)
# get certificates
client.get_certificates()
# create order
# create jsapi order
client.jsapi_prepay(
description='description of the order',
out_trade_NO='side'
notify_url='url of the notification'
amount=100,
payer=xyz
)
# create native order
client.native_prepay(
description='description of the order',
out_trade_NO='side'
notify_url='url of the notification'
amount=100,
payer=xyz
)
# querys
client.get_order_by_transaction_id(
)
client.get_order_by_out-trade-no(
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wechatpay-py-0.0.1.tar.gz
(5.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wechatpay-py-0.0.1.tar.gz.
File metadata
- Download URL: wechatpay-py-0.0.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c73f638cb7e24e62e99ceaf3e267f0e4e108c3b9ceb9a5746de199624af01b4
|
|
| MD5 |
2835942edc8a0eae56b25ab5d76ddda6
|
|
| BLAKE2b-256 |
3cff58f2732f56200fac7dc1e79963813c5c99cc609acad4e267e20b985d099b
|
File details
Details for the file wechatpay_py-0.0.1-py3-none-any.whl.
File metadata
- Download URL: wechatpay_py-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b8c0462dc90ebf9e21edbbcd27fa446767a650fcd908c90f0b9028297d3ca2d
|
|
| MD5 |
9b39464f8d79928793d4aa294967543d
|
|
| BLAKE2b-256 |
11b55b2cbe34f0a402af34aa1e9960cbae504713c4c15c2d868701c94127046e
|