- 微信支付V3回调解密错误(测试正常,上线失败)
引入的SDK版本 <dependency> <groupId>com.github.wechatpay-apiv3</groupId> <artifactId>wechatpay-java</artifactId> <version>0.2.12</version> </dependency> 加密config(pem文件在resources下) private Config getConfig() { if(config == null){ PrivateKey privateKey = getPrivateKey("wechatpay/apiclient_key.pem"); config = new RSAAutoCertificateConfig.Builder() .merchantId(properties.getMch().getMchId()) .privateKey(privateKey) .merchantSerialNumber(properties.getMch().getMchSn()) .apiV3Key(properties.getMch().getApiV3Key()) .build(); } return config; } 解密config(pem文件在resources下) public NotificationConfig getNotificationConfig() { if(notificationConfig == null){ PrivateKey privateKey = getPrivateKey("wechatpay/apiclient_key.pem"); notificationConfig = new RSAAutoCertificateConfig.Builder() .merchantId(properties.getMch().getMchId()) .privateKey(privateKey) .merchantSerialNumber(properties.getMch().getMchSn()) .apiV3Key(properties.getMch().getApiV3Key()) .build(); } return notificationConfig; } ***问题: 测试环境:用natapp内网穿透映射的回调地址,回调解密正常 生产环境:用nginx代理的回调地址,回调解密失败 错误信息(****是我打的码): com.wechat.pay.java.core.exception.ValidationException: Processing WechatPay notification,signature verification failed,signType[WECHATPAY2-SHA256-RSA2048] serial[7D816CEC414164CF1C9899187865763F3******] message[1725464137 1kfL1LvqkBsHt715Tvr54Iz****** {"id":"2954fad7-e7d0-51e9-baf9-6ca*******","create_time":"2024-09-04T23:35:37+08:00","resource_type":"encrypt-resource","event_type":"TRANSACTION.SUCCESS","summary":"鏀粯鎴愬姛","resource":{"original_type":"transaction","algorithm":"AEAD_AES_256_GCM","ciphertext":"6zJ+yFafNx+Rr3Z3qn2W1Na4gvhHSMdKl5NlDO1Up5BI1JP7hW0uiJd2EMkq/7Xem3y9b2jteJXxuhDN/aeoss2lXB1WlXHedOVq3W0ZOMbWZp5oqnF/S1fPFgbrPCRe8k2011xUAmTaHZEzjZd9mDm0iuDQTjx4W2Am9hfH8vCNlE9TJPF2yyFji7A6ue0Xf3sWAQJi2Wla1AxtoOOZVRvnH4Ook3cj1lkKOnhDqHQJNyeoDiRvGsHW/I3axTkSGAJUT3UEmhArfqvD5IeubQLCXPVUD2dATmnWtb0HMVdO+ZTlgT62RTMJ0EAmN4xvTQMxqAJW9/YJ/44siBWpT84Wa6P4g427r5KnRtrGK0Lr+Ny6kuV+mEG4RE76jsHbized6YiB1CgKogBG52psX7RTBGg9IdRufQ791yhGXx1frc28k6uCyJUG***********xhyB iI+96+QQ9AXHqKJq0UY+04qfo1Xs7yzXZVPnCiqpv+LN1PY3*******","associated_data":"transaction","nonce":"6uiyqNHQ****"}} ] sign[C1JY8Jf+VeYmbALKx9qcUSBF8Vsj430YK8o+TonodqkNRegv7X**********3RAOd1Gu+K+DCJLg+D847v2pcoF7cv6tm0f+ES2a+86acT3XDELVYFIGV8ZbODg4vKoahLC2BfvKzPPayo+KUh2845nz0N1vhY4SHRUqV3hXbukuLljaaniDljRl24iXtrZkSn1FKH0aq8T1/hIILU6zNxkDjQGcBl8rMktARCRx0JUmAJwkwCZOcGiJ+NyrIO9R++YJGbET9uAm1iOuOJUwLOneeLUh+nDVpL9IvyUlBAtHF1LNtH5sAOWpbTFtLHYD/5+gYPY8IAmDw==]
09-05 - 付款码支付V3什么时候升级完
付款码支付V3什么时候升级完,目前项目已接入JSAPI,Native都是V3的,不想搞两套对接方式。。。。
2023-05-19 - 请问微信公众号的模板消息发送有什么限制吗?
1、除了每日发送次数限制,单关注用户每天最多能收到多少次? 2、发送模板消息时,用户关注后互动过一次之后,以后无论什么时候都能发送吗? 3、关注之后,以后无论什么时候都能发送吗?还是48小时不互动不能发送?
2023-01-11 - 网站刚用的域名,就被封了,无法在微信打开,申诉了没用,还能怎么处理?
刚建的网站,使用刚备案的域名,在微信上不能打开,申诉了还是被封
2022-04-15