微信支付成功之后,如何获取transaction_id(交易单号)

如何在res.err_msg == "get_brand_wcpay_request:ok"的if条件中获取到交易单号传送到后台

WeixinJSBridge.invoke('getBrandWCPayRequest', {
"appId" : appId, // appId
"timeStamp" : timeStamp,

"nonceStr" : nonceStr,
"package" : 'prepay_id='+pack, // package
"signType" : "MD5",
"paySign" : sign
}, function(res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
alert(res.result_code);
//支付回调
//location.href = "http://jia515042695.eicp.net/retype?orderNumber="+orderNumber;
location.href = "${sysUrl}/personalcenter/retype?orderNumber="+orderNumber;
}else if(res.err_msg == "get_brand_wcpay_request:cancel") {
//取消支付
//location.href.go(-1);
location.href = "${sysUrl}/personalcenter/unpay";
}else{
location.href = "/wechatPayError.html";
}
});

查看全部
qq_36917043
走去哪里
2017/05/25 09:57
  • 支付
  • 微信
  • 点赞
  • 收藏
  • 回答
    私信

1个回复