Files
jsowell-charger-web/jsowell-pile/src/main/java/com/jsowell/adapay/config/XixiaoAdapayConfig.java
2023-08-15 11:02:02 +08:00

44 lines
1.0 KiB
Java

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);
}
}