微信支付v3 jsapi调起支付时,支付验证签名失败?

微信支付 文章 2021-03-30 15:01 0 13 全屏看文

微信支付v3 jsapi调起支付时,支付验证签名失败?When WeChat Pay v3 jsapi initiates payment, the payment verification signature fails?

微信支付v3 jsapi调起支付时,支付验证签名失败?

搞了好久了,这个签名到底怎么玩?

https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_4.shtml

For a long time, how to play with this signature? https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_ 1_ 4.shtml

回答:

北望沣渭:
const {Rsa, Formatter} = require('wechatpay-axios-plugin')const privateKey = require('fs').readFileSync('/your/merchant/priviate_key.pem')const params = {  appId: 'wx8888888888888888'timeStamp: `${Formatter.timestamp()}`nonceStr: Formatter.nonce(),  package: 'prepay_id=wx201410272009395522657a690389285100'signType: 'RSA',}params.paySign = Rsa.sign(Formatter.joinedByLineFeed(  params.appId, params.timeStamp, params.nonceStr, params.package), privateKey)console.info(params)
森林:

我也遇到了相同的问题 请问解决了吗?

O_o:还没有,这个签名我搞不定
O_o:ok,晚上看下

-EOF-