Skip to content
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

WeChatPayOptions中的Certificate属性和CertificatePassword属性前后顺序问题 #154

Closed
BrisWhite opened this issue Jul 1, 2023 · 4 comments

Comments

@BrisWhite
Copy link

BrisWhite commented Jul 1, 2023

WeChatPayOptions.cs处的Certificate属性和CertificatePassword属性,我觉得需要调换个位置。
否则,若商户使用的非默认证书密码(即MchId),会因为先加载Certificate属性,执行GetCertificateInfo方法时,会报错。

@roc916
Copy link
Contributor

roc916 commented Jul 1, 2023

会报什么?

@BrisWhite
Copy link
Author

会抛CryptographicException异常,原因也很简单,例如:
api.p12 文件,对应的MchId:123456,设置的证书密码为:987654,在加载Certificate属性时,获取到的证书密码为:123456(应该为987654),然后,在这里加载证书时就会抛出CryptographicException异常。

@roc916
Copy link
Contributor

roc916 commented Jul 1, 2023

正式环境中是否存在证书密码与MchId不一致的情况?据我了解这个证书密码是无法设置的。

@BrisWhite
Copy link
Author

这个看了一下文档,确实没看到,不过这个设计逻辑我觉得可以稍微调整一下。😄

@roc916 roc916 closed this as completed Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants