|
|
@@ -34,11 +34,13 @@ public class AdapayMerchantService {
|
|
|
|
|
|
@PostConstruct
|
|
|
public void init() {
|
|
|
+ log.info("init AdapayMerchantService");
|
|
|
for (AdapayMerchant merchant : adapayMerchantRepo.findAll()) {
|
|
|
addMerchant(merchant);
|
|
|
if (merchant.isSelected()) {
|
|
|
try {
|
|
|
select(merchant.getId());
|
|
|
+ log.info("select merchant success={}", merchant.getName());
|
|
|
} catch (Exception e) {
|
|
|
log.error("select merchant error", e);
|
|
|
}
|
|
|
@@ -77,6 +79,10 @@ public class AdapayMerchantService {
|
|
|
merConfig.setRSAPublicKey(merchant.getPublicKey());
|
|
|
Adapay.initWithMerConfig(merConfig);
|
|
|
|
|
|
+ adapayProperties.setApiKey(merchant.getApiKey());
|
|
|
+ adapayProperties.setMockKey(merchant.getMockKey());
|
|
|
+ adapayProperties.setPrivKey(merchant.getPrivKey());
|
|
|
+ adapayProperties.setPublicKey(merchant.getPublicKey());
|
|
|
adapayProperties.setMerchant(merchant.getName());
|
|
|
adapayProperties.setAppId(merchant.getAppId());
|
|
|
|