赛捷软件论坛's Archiver

vicky.yu 发表于 2025-12-1 10:01

微信小程序 欠费支付

欠费支付
微信后台向业主方通知用户支付成功(支付失败时无通知)。

1、请求参数
参数名称        类型        必选        备注
appid        string        Y        小程序appid
mch_id        string        Y        支付商户号
nonce_str        string        Y        随机字符串
encrypted_data        string        Y        使用AESCBCPKCS7PADDING
iv        string        Y        用于解密的IV(base64)
sign        string        Y        1~5字段的签名
encrypted_data解密后的数据

参数名称        类型        必选        备注
out_user_id        string        Y        业主后台对用户的标识,设置过注册回调接口时存在
openid        string        Y        用户openid
bank_type        string        Y        支付类型,采用字符串类型的银行标识
total_fee        int        Y        支付费用
transaction_id        string        Y        微信支付单号
time_end        string        Y        格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010
repay_no        string        Y        欠费单号
order_no        array        Y        与本欠费单号相关联的乘车码单号(存在一次支付多笔乘车欠费的情况),每一项的内容为string
order        array        Y        与本欠费单号相关联的乘车码单号的详细信息
其中order的每一项内容如下:

参数名称        类型        必选        备注
order_no        string        Y        乘车码单号
attach        string        Y        免密代扣上传的附加信息
base64_qrcode        string        Y        base64后的乘车码信息
out_order_no        string        Y        外部传的单号
2、返回参数
参数名称        类型        必选        备注
errcode        int        Y        0为成功
errmsg        string        N        错误信息
nonce_str        string        Y        原样带回
3、示例
请求:

{"appid":"test","mch_id":"123456","nonce_str":"abcdefg","encrypted_data":"jfiwajeofjiefef","iv":"afweifwefe"}
encrypted_data解密后为:

{
    "out_user_id":"xxx",
    "openid":"1234",
    "bank_type":"LQT",
    "total_fee":123,
    "transaction_id":"12312312",
    "time_end":"2020030319551111",
    "repay_no":"2020202202020",
    "order_no":[
        "123",
        "456"]
}
返回:

{"errcode":0,"nonce_str":"abcdefg","encrypted_data":"jfiwajeofjiefef","iv":"afweifwefe"}

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.