-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2 刷卡支付验收用例3 沙箱测试报错 #39
Comments
测试校验了一下,这个是官方沙箱环境的一个bug,他们在做返回值签名的时候,把金额0给漏了,即: <cash_fee><![CDATA[0]]></cash_fee> 这个按照APIv2签名规范:
0分金额需要参与签名,而沙箱环境给把这个值给过滤掉算签名了,你可以按照如下方法复现:
Wechatpay.client.v2.defaults.transformResponse.unshift(data => (console.log(data), data));
res = await wxpay.v2.sandboxnew.pay.orderquery({
appid,
mch_id,
nonce_str: Formatter.nonce(),
out_trade_no,
}, {
transformResponse: [Transformer.toObject],
});
console.info(res.data);
我用PHP也验证了一下,均是这个问题,确信这个是官方沙箱环境的一个BUG。 |
@TheNorthMemory
|
@TheNorthMemory 您好! |
APIv2上,保证收单逻辑是正确的是 |
@TheNorthMemory
|
@TheNorthMemory
v2 刷卡支付验收用例3 沙箱测试报错, 请帮忙看看如何解决,谢谢!
用例说明: “用例3:【刷卡-正常】订单金额0.03元(含0.01元代金券和0.02元免充值现金券),用户支付成功 “
使用版本: 0.7.13
刷卡支付验收用例1和2 沙箱测试成功。 用例网址
我的代码:
请求支付成功,获取支付结果时报错信息:
Originally posted by @qaoo8 in #35 (comment)
The text was updated successfully, but these errors were encountered: