调用付款到银行卡API接口,一直报“签名出错,请根据签名算法进行签名”错误?

微信支付 文章 2022-04-17 10:20 646 0 全屏看文

AI助手支持GPT4.0

调用付款到银行卡API接口,一直报“签名出错,请根据签名算法进行签名”错误?When calling the payment to bank card API interface, the error "Signature error, please sign according to the signature algorithm" is reported all the time?

调用付款到银行卡API接口,一直报“签名出错,请根据签名算法进行签名”错误?

编程语言:JAVA

问题描述: 我在请求付款至银行卡之前。我先请求了获取公钥并成功,说明我的签名实现代码没错,但是还是提示签名出错。

我初步判断可能出现的问题:(1)公钥有误(但是我的公钥已经转成PKCS#8格式)(2)RSA加密出错。

但是具体问题还是解决不了,请求大佬们帮助,谢谢!


Programming language: Java Problem Description: before I request payment to the bank card. I first requested to obtain the public key and succeeded, indicating that my signature implementation code is correct, but still prompted that the signature is wrong. I preliminarily judge the possible problems: (1) the public key is wrong (but my public key has been converted to pkcs#8 format) (2) RSA encryption is wrong. But the specific problems can't be solved. Please ask the bosses for help. Thank you!

回答:

欧阳斌:
小炮:

终于找到问题所在!原因找到:desc是中文,可能呢导致了最后sign加密的时候时候出现问题。把desc改成英文的就成功!

Memory:

如果是加密的问题,报错不是签名错误,可以参考https://developers.weixin.qq.com/community/develop/article/doc/00042cea7e8a40fe0b0c0e8f55b813

小炮:好的,感谢

-EOF-

AI助手支持GPT4.0