我们做企业微信支付,只有一个appid,一模一样的报文在微信环境下正常唤醒支付,企业微信环境下则提示“商户传入的appid参数不正确,请联系商户处理”
研发能否帮忙看下?已经熬了一天一晚了,企业微信下也没法调试,只能改一次代码,alert一次,一个坑一个坑走了过来,辛苦研发大佬们帮忙看一下!感激不尽!
统一下单报文
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xml>
<nonce_str>6df7dafbeb2040a9b055f7eeceea8fbd</nonce_str>
<openid>ocNvLwq0EfbVDixZK********</openid>
<sign>46213C24FD69ACBD**************</sign>
<fee_type>CNY</fee_type>
<body>测试商品订单金额:0.01</body>
<notify_url>http://xxxxxx.xxx/notify/?order=d4795e1cfa37441ff9908c648eedb9da</notify_url>
<mch_id>1*********</mch_id>
<spbill_create_ip>*.*.*.*</spbill_create_ip>
<out_trade_no>d4795e1cfa37441ff9908c648eedb9da</out_trade_no>
<device_info>Wap</device_info>
<appid>wx1bec33ce046fb05a</appid>
<total_fee>1</total_fee>
<trade_type>JSAPI</trade_type>
<sign_type>MD5</sign_type>
</xml>
微信支付响应报文
{"nonce_str":"jgtnxRrAyqEK6XzS","device_info":"Wap","appid":"wx1bec33ce046fb05a","sign":"2AABE9EF3AABE99FEE563EB625C59328","trade_type":"JSAPI","return_msg":"OK","result_code":"SUCCESS","mch_id":"1*********","return_code":"SUCCESS","prepay_id":"wx03152700643494738e0a24129001cf0000"}
wx.config配置:
wx.config({
"debug": true,
"appId": "wx1bec33ce046fb05a",
"timestamp": "1693726020",
"nonceStr": "ff02274138b84c1ea3e60b0158357d0b",
"signature": "8c21e1866a3a5439b21a9200ad844b9b6c3c29dc",
"jsApiList": ["getBrandWCPayRequest"]
})
WeixinJSBridge:
wx.ready(() => {
alert(1)
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
"appId": "wx1bec33ce046fb05a",
"timeStamp": "1693726020",
"nonceStr": "jgtnxRrAyqEK6XzS",
"package": "prepay_id=wx03152700643494738e0a24129001cf0000",
"signType": "MD5",
"paySign": "6A697BBB185A8719674A81513AB1277F"
},
function(res) {
alert(JSON.stringify(res))
if (res.err_msg == "get_brand_wcpay_request:ok") {
// 使用以上方式判断前端返回,微信团队郑重提示:
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
}
})
alert(2)
})
我随时在线!
你这不搭呀,上边是微信小程序的支付签名,下边是微信H5配置
在企业微信内调起支付要用企业微信那边的方法,你这是要做什么业务?