收藏
回答

为什么APP下单API调用报签名错误“商户证书序列号错误”?

API:APP下单API“https://api.mch.weixin.qq.com/v3/pay/transactions/app

完整的请求:

Authorization: WECHATPAY2-SHA256-RSA2048 mchid="1638890864",nonce_str="zySEXB9TDbkYnWCr9SVkeDUO2NqBKQGe",timestamp="1678088201",serial_no="200BB8B8BB2F28D8B444365A3ECE3B651C5B771D",signature="eTngU9SVwLWtH+vmshsQtzStPnSgLvRlkrYZPfnhVjRJVhjM+5bPxuEnBbBQOHBnDdP29L9Y25xERf+lY9kSwAtoEqS847JNYqh3r4XHllSJ93rWxVTuX5TS1xpCgJVga+i52HDnCsNU+EOOzelBbiBp1C5jh0k4kns1sqtiATlh4D3/BQm/IMVHEMvHXLsiUqCVtVrM+fVS6KMhteuEQCzfz/tE4DidcynrTUO0I0wpD9hh/DxkTXDd8YPVC749kgZNOEO+tlYuqoBEULPb/g9ztE1GxsaYouPS2oBRChrnXfPOeTxtJfHHAwBNg3QD9OeEvd3SZrBr68xq1x4T5w=="

{"out_trade_no":"20230302095935497839","description":"卫生间防水","amount":{"total":1},"notify_url":"https:\/\/zhongbaozs\/payment\/wechatPay","appid":"wxc31faeb053e984d2","mchid":"1638890864"}


返回:

{"code":"SIGN_ERROR","detail":{"detail":{"issue":"sign not match"},"field":"signature","location":"authorization","sign_information":{"method":"POST","sign_message_length":289,"truncated_sign_message":"POST\n/v3/pay/transactions/app\n1678023077\nIDxpDGJbfG2AvC7u6lJ22RZehBg5Ctu5\n{\"out_tr\n","url":"/v3/pay/transactions/app"}},"message":"商户证书序列号有误。"}

用的是V3密钥,重置过密钥和证书依旧没解决问题。希望能大神给予解答

回答关注问题邀请回答
收藏

1 个回答

  • Memory (私信不回复)
    Memory (私信不回复)
    2023-03-06

    去看看你商户后台API证书处的证书序列号是不是“200BB8B8BB2F28D8B444365A3ECE3B651C5B771D”,重新申请证书还会报错说明是你自己配置错了

    2023-03-06
    有用 1
    回复 4
    • 昊源
      昊源
      2023-03-07
      因为是用第三方的插件,没有找到填写证书序列号的地方。倒也确实这个序列号和商户号后台的不一致。
      2023-03-07
      回复
    • Memory (私信不回复)
      Memory (私信不回复)
      2023-03-07回复昊源
      不一致是无法下单的,咨询下插件提供方
      2023-03-07
      回复
    • 昊源
      昊源
      2023-03-08
      谢谢,问题找到了。还是证书配置的问题
      2023-03-08
      回复
    • 昊源
      昊源
      2023-03-08回复Memory (私信不回复)
      谢谢,问题找到了。还是证书配置的问题
      2023-03-08
      回复
登录 后发表内容