多商户配置

This commit is contained in:
2023-08-15 11:02:02 +08:00
parent 713e057769
commit 7c640f13fb
11 changed files with 207 additions and 29 deletions

View File

@@ -0,0 +1,43 @@
package com.jsowell.adapay.config;
import com.jsowell.adapay.factory.AdapayConfigFactory;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
* 希晓充电adapay配置
*/
@Component
@Getter
@Setter
public class XixiaoAdapayConfig extends AbstractAdapayConfig{
@Value("${adapay.debugFlag}")
private boolean debugFlag;
@Value("${adapay.prodMode}")
private boolean prodMode;
@Value("${adapay.xixiao.apiKey}")
private String apiKey;
@Value("${adapay.xixiao.mockApiKey}")
private String mockApiKey;
@Value("${adapay.xixiao.rsaPrivateKey}")
private String rsaPrivateKey;
@Value("${adapay.xixiao.appId}")
private String adapayAppId;
@Value("${adapay.xixiao.wechatAppId}")
private String wechatAppId;
@Override
public void afterPropertiesSet() throws Exception {
// key为微信小程序id
AdapayConfigFactory.register(wechatAppId, this);
}
}