|
@@ -35,31 +35,39 @@ public class PayWxV3Service {
|
|
|
// 商户号
|
|
|
private static String mchidDongke = "1570392471";
|
|
|
private static String mchidQinggu = "1304201901";
|
|
|
+ private static String keyNumberDongke = "";
|
|
|
+ private static String keyNumberQinggu = "2BA51F3AB21E440FD129752829003952E765B1AE";
|
|
|
+ private static String apiKeyDongke = "";
|
|
|
+ private static String apiKeyQinggu = "POIUYTREWQAS1q2w3e4r5t6y7u8i9o0p";
|
|
|
// 使用自动更新平台证书的RSA配置
|
|
|
// 一个商户号只能初始化一个配置,否则会因为重复的下载任务报错
|
|
|
private static Config configDongke;
|
|
|
private static Config configQinggu;
|
|
|
private Config getConfigDongke() {
|
|
|
return Objects.nonNull(configDongke) ? configDongke : (configDongke = new RSAAutoCertificateConfig.Builder()
|
|
|
- .merchantId(mchidDongke).privateKeyFromPath(keyPathDongke).merchantSerialNumber("").apiV3Key("").build());
|
|
|
+ .merchantId(mchidDongke).privateKeyFromPath(keyPathDongke)
|
|
|
+ .merchantSerialNumber(keyNumberDongke)
|
|
|
+ .apiV3Key(apiKeyDongke).build());
|
|
|
}
|
|
|
private Config getConfigQinggu() {
|
|
|
return Objects.nonNull(configQinggu) ? configQinggu : (configQinggu = new RSAAutoCertificateConfig.Builder()
|
|
|
.merchantId(mchidQinggu).privateKeyFromPath(keyPathQinggu)
|
|
|
- .merchantSerialNumber("2BA51F3AB21E440FD129752829003952E765B1AE")
|
|
|
- .apiV3Key("POIUYTREWQAS1q2w3e4r5t6y7u8i9o0p").build());
|
|
|
+ .merchantSerialNumber("keyNumberQinggu")
|
|
|
+ .apiV3Key("apiKeyQinggu").build());
|
|
|
}
|
|
|
private static NotificationConfig notificationConfigDongke;
|
|
|
private static NotificationConfig notificationConfigQinggu;
|
|
|
private NotificationConfig getNotificationConfigDongke() {
|
|
|
return Objects.nonNull(notificationConfigDongke) ? notificationConfigDongke : (notificationConfigDongke = new RSAAutoCertificateConfig.Builder()
|
|
|
- .merchantId(mchidDongke).privateKeyFromPath(keyPathDongke).merchantSerialNumber("").apiV3Key("").build());
|
|
|
+ .merchantId(mchidDongke).privateKeyFromPath(keyPathDongke)
|
|
|
+ .merchantSerialNumber(keyNumberDongke)
|
|
|
+ .apiV3Key(apiKeyDongke).build());
|
|
|
}
|
|
|
private NotificationConfig getNotificationConfigQinggu() {
|
|
|
return Objects.nonNull(notificationConfigQinggu) ? notificationConfigQinggu : (notificationConfigQinggu = new RSAAutoCertificateConfig.Builder()
|
|
|
.merchantId(mchidQinggu).privateKeyFromPath(keyPathQinggu)
|
|
|
- .merchantSerialNumber("2BA51F3AB21E440FD129752829003952E765B1AE")
|
|
|
- .apiV3Key("POIUYTREWQAS1q2w3e4r5t6y7u8i9o0p").build());
|
|
|
+ .merchantSerialNumber("keyNumberQinggu")
|
|
|
+ .apiV3Key("apiKeyQinggu").build());
|
|
|
}
|
|
|
|
|
|
|