Skip to content

V3支付,组装预支付参数和官网字段不一致(packageValue 和 package字段) #3953

@afzaici-jack

Description

@afzaici-jack

com.github.binarywang.wxpay.service.WxPayService#createOrderV3 调用统一下单接口,字段不一致需要转换
官方说package ,接口返回的说packageValue

createOrderV3 打印如下
{
appId: "xxxx",
timeStamp: "1775202418",
nonceStr: "OOudfKC8uPVz3RtKYa5ESSuJOFPYSpor",
packageValue: "prepay_id=wx031546587801055c8516d0bfcde4e30001",
signType: "RSA",
paySign: "太长了,各种字符串",
prepayId: "wx031546587801055c8516d0bfcde4e30001",
signStr: "xxx",
signType: "RSA",
timeStamp: "1775202418"
}

微信官方的demo
wx.requestPayment
(
{
"timeStamp": "1414561699",
"nonceStr": "5K8264ILTKCH16CQ2502SI8ZNMTM67VS",
"package": "prepay_id=wx201410272009395522657a690389285100",
"signType": "RSA",
"paySign": "xxx",
"success":function(res){},
"fail":function(res){},
"complete":function(res){}
}
)

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions