-
Notifications
You must be signed in to change notification settings - Fork 288
Description
错误描述
prepayWithRequestPayment 问题
重现bug的步骤
sdk version
com.github.wechatpay-apiv3
wechatpay-java
0.2.17
在 prepayWithRequestPayment 示例中没有提示配置微信支付公钥啊 启动报错
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'wxPayController': Unsatisfied dependency expressed through field 'wxPayService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wxPayService': Invocation of init method failed; nested exception is com.wechat.pay.java.core.exception.ServiceException: Wrong HttpStatusCode[404]
httpResponseBody[{"code":"RESOURCE_NOT_EXISTS","message":"无可用的平台证书,请在商户平台-API安全申请使用微信支付公钥。可查看指引https://pay.weixin.qq.com/doc/v3/merchant/4012153196"}] HttpRequest[{"http_method":"GET","url":"https://api.mch.weixin.qq.com/v3/certificates?algorithm_type=RSA","uri":"https://api.mch.weixin.qq.com/v3/certificates?algorithm_type=RSA","headers":{"headers":{"Authorization":"WECHATPAY2-SHA256-RSA2048 mchid="1106678741",nonce_str="TESQ6refp7Fmk8XmdP9xl8fW9h1ksXde",timestamp="1773149102",serial_no="6F5A3F647858D509D34B31AEAD4BB78C7DDE420C",signature="JmiJcYZDXrfgCLyWoUZOxEjGh4Hw9hxQARCC/6qd2TwQP5/chaDy9PvlJoyqLGzKeSDHEPNv7avCzRi3mSqMVLnoBaNSGttKadQI7kDP5fcOsIAtwEEVcKf/e4ZQv0TJhDqN4BxRRTy2UP1flNpPXKLL2JIb7RBYmwha4Vamhrmg5T8vJNzes6Jp63Lm6doxq9mNMvezl9u5wA6THXwBf08vopjZpHqlbNBcyX87bYA91XvoVvP02fbiUlPQcaQtfbSRL12HgOcx4CGoYsGAStJN437TPg0CR6kLS+MBpdl+Ck2/Iu9EwJ7z62H1nTSLkORtOmrBv4gA8uB1XDyuTQ=="","Accept":" /","User-Agent":"WechatPay-Java/0.2.17 (Windows 10/10.0) Java/1.8.0_411 Credential/WechatPay2Credential Validator/ okhttp3/null","Content-Type":"application/json","Wechatpay-Serial":""}}}]
预期行为
返回微信小程序调用微信支付的相关参数
导致错误的代码片段
操作系统
windows11
Java 版本
8
wechatpay-java 版本
0.2.16
其他信息
No response