wvs
wechatpay-v3-sdk
pypi i wechatpay-v3-sdk
wvs

wechatpay-v3-sdk

微信支付 API v3 Python SDK

by chen gang

0.41 (see all)License:BSD
pypi i wechatpay-v3-sdk
Readme

wechatpay_v3_sdk

PyPI version

介绍

wechatpay_v3_sdk 微信支付接口V3版python库.

安装

$ pip install wechatpay_v3_sdk

使用方法

准备

参考微信官方文档准备好密钥, 证书文件和配置(证书/密钥/签名介绍)

初始化

from wechatpay_v3_sdk import WeChatPay, WeChatPayType

MCHID = '1230000109'

MCH_PRIVATE_KEY = 'MIIEvwIBADANBgkqhkiG9w0BAQE...'
MCH_KEY_SERIAL_NO = '444F4864EA9B34415...'
WECHAT_PUBLIC_KEY = 'MIIEvwIBADANBgkqhkiG9w0BAQE...'
APPID = 'wxd678efh567hg6787'
NOTIFY_URL = 'https://www.weixin.qq.com/wxpay/pay.php'

wxpay = WeChatPay(wechatpay_type=WeChatPayType.MINIPROG,
                  mchid=MCHID,
                  mch_parivate_key=MCH_PRIVATE_KEY,
                  mch_key_serial_no=MCH_KEY_SERIAL_NO,
                  wechat_public_key=WECHAT_PUBLIC_KEY,
                  appid=APPID,
                  notify_url=NOTIFY_URL)

接口

参考examples.py

GitHub Stars

162

LAST COMMIT

5mos ago

MAINTAINERS

1

CONTRIBUTORS

4

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.41
1yr ago
No alternatives found
No tutorials found
Add a tutorial