|
|
@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
/**
|
|
|
* @author TRX
|
|
|
@@ -33,9 +34,9 @@ public class WxPayConfigModel {
|
|
|
private String apiV3Key;
|
|
|
|
|
|
@Schema(description = "认证类型")
|
|
|
- private String authenticationType;
|
|
|
+ private String authenticationType = "WECHATPAY2-SHA256-RSA2048";
|
|
|
|
|
|
- @Schema(description = "key文件地址类型,oss、local")
|
|
|
+ @Schema(description = "key文件地址类型,oss、local、str")
|
|
|
private String privateKeyType = "";
|
|
|
|
|
|
@Schema(description = "私钥地址")
|
|
|
@@ -47,4 +48,16 @@ public class WxPayConfigModel {
|
|
|
@Schema(description = "支付成功回调地址")
|
|
|
private String notifyUrl;
|
|
|
|
|
|
+ @Schema(description = "支付证书是否配置")
|
|
|
+ private Boolean privateKeyIsComplete = Boolean.FALSE;
|
|
|
+
|
|
|
+ public Boolean getPrivateKeyIsComplete() {
|
|
|
+ if (privateKeyType != null) {
|
|
|
+ if ("str".equals(privateKeyType) && StringUtils.isNotEmpty(privateKeyStr)) {
|
|
|
+ return Boolean.TRUE;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return Boolean.FALSE;
|
|
|
+ }
|
|
|
+
|
|
|
}
|