# 用户付款码支付

# 说明

  • 微信条码为 18 位纯数字,以 10、11、12、13、14、15 开头,支付宝条码,25-30 开头的长度为 16-24 位的数字

# 接口地址

https://open.weidoufu.com/pay/micropay (opens new window)

请确保是否已经开通支付,该接口 return_code 返回 1 说明已经支付成功(支付宝不允许自己的账号支付自己的订单,微信允许)

# 接口参数

名称 字段类型 必填参数 说明 (AccessKey/SecretKey)应用密钥
access_key string(32) 应用密钥的 AK,即是 AccessKey
body string(32) 商品名称 例如:QQ 会员充值
out_order_no string(32) 商户订单号(字母、数字,至少 18 位长度)
pay_type int(2) 支付类型 1-微信;2-支付宝;3-云闪付
total_fee int(9) 价格单位:分
auth_code string(32) 扫码的号码 例如:150211238899912330
attach string(128) 附加信息,回调时原样传回 例如:{test:'test1_params'}
ledger string(512) 分账接收方,jsonArray 格式 例如:'[{"amount":1,"sub_mch_no":"xxxxxxxx"}]'
sign string 签名结果(大写),详见 签名算法 (opens new window)

# 返回参数

返回为 json 格式

名称 字段类型 必有 说明
code int 1:成功   0:失败
message string 返回描述信息
mch_trade_no string 平台返回的订单号
out_order_no string 商户订单号(字母、数字)
total_fee int 价格单位:分

成功返回:

{
}

失败返回:

{
  "return_code":0,
  "msg":"签名错误"
}
最后更新于: 11/11/2023, 10:28:08 AM