-
Notifications
You must be signed in to change notification settings - Fork 226
微信支付
gusibi edited this page Apr 23, 2019
·
11 revisions
微信支付文档
from weixin.pay import WeixinPay
wxpay = WeixinPay(appid='appid',
mch_id='mchid',
notify_url='url',
partner_key='key')
create_pay_info= {}
# 统一下单
wxpay.unifiedorder(**create_pay_info)
# 查询订单
wxapp.order_query(out_trade_no='out_trade_no')
# 企业付款
wxepay = WeixinEnterprisePay(appid='appid',
mch_id='mchid',
mch_key='mch_key',
mch_cert='mch_cert',
partner_key='key')
wxepay.transfers(partner_trade_no,
openid,
amount,
desc=u'结算')
# 企业付款查询
wxepay_query = WeixinEnterprisePayQuery(appid='appid',
mch_id='mchid',
mch_key='mch_key',
mch_cert='mch_cert',
partner_key='key')
wxepay_query.gettransferinfo(partner_trade_no)