微信支付统一下单接口
用微信OPENID,订单ID生成微信统一下单。
发送API请求
http请求方式: GET http://api.v.com.cn/weixin/weixin_pay.asp?order_no=order_no&openid=openid&Sign=Sign GET数据例子: order_no=2016721398 openid=oc7O8weCFGr6f62e9zuRRG00g85k type=1 trade_type=JSAPI GET请求格式:http://api.v.com.cn/weixin/weixin_pay.asp?order_no=2016721398&openid=oc7O8weCFGr6f62e9zuRRG00g85k&type=1&trade_type=JSAPI&Sign=Sign
参数说明
参数 | 是否必须 | 说明 | 例子 |
---|---|---|---|
order_no | 是 | 订单号 | 后台生成的订单号 |
openid | 是 | 微信客户OPENID | |
type | 是 | 微信公众号ID | 1 V俱乐部服务号 4 V俱乐部APP 6 小程序_全球V生活馆CX 9 小程序_白马全球馆CX |
trade_type | 是 | 交易类型 | 取值如下:JSAPI,NATIVE,APP,MWEB等,说明详见微信支付参数规定 |
spbill_create_ip | 否 | 用户端IP地址 | |
Sign | 是 | 签名 |
返回说明 正常情况下,系统会返回下述JSON数据包:
{ "return_code":"SUCCESS", "return_msg":"OK", "appid":"wx8dffc05a6ada87ed", "mch_id":"1380453402", "nonce_str":"2HELXAfp97wm3ipQ", "sign":"66F6EDA7C1A270C92AE4F16A7B5A624E", "result_code":"SUCCESS", "prepay_id":"wx201704051158002c0898d6190817154997", "trade_type":"JSAPI" }
返回参数说明
参数 | 是否必须 | 参数类型 | 说明 | 例子 |
---|---|---|---|---|
return_code | 是 | String | 是否成功 | SUCCESS |
return_msg | 是 | String | 处理结果:OK-成功 | |
weixin_Name | 是 | String | 微信号名称。 | |
appid | 是 | String | 微信应用ID | |
mch_id | 是 | String | 微信应用mch_id | |
nonce_str | 是 | String | 随机字符串 | |
sign | 是 | String | 微信签名 | |
result_code | 是 | String | 返回状态 | |
prepay_id | 是 | String | 微信统一下单号 | wx201704051158002c0898d6190817154997 |
trade_type | 是 | String | 微信支付模式 |