github地址:https://github.com/yangyuexiong/WeChatPayV3
from main import WeChatPayV3
from utils import gen_order_number
wx_pay = WeChatPayV3(
mchid=mchid,
appid=appid,
v3key=v3key,
apiclient_key=apiclient_key,
serial_no=serial_no,
notify_url=notify_url
)
order_number = gen_order_number()
resp = wx_pay.pay(
out_trade_no="202206301330151656567015",
total=1,
description="测试",
ip="127.0.0.1"
)
print(resp)
python开发者可以使用已经封装好的“微信支付 V3 API Python SDK”
https://github.com/minibear2021/wechatpayv3