diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/pppay/PpPayNormalMchParams.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/pppay/PppayNormalMchParams.java similarity index 90% rename from jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/pppay/PpPayNormalMchParams.java rename to jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/pppay/PppayNormalMchParams.java index e8b9e50..18071f0 100644 --- a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/pppay/PpPayNormalMchParams.java +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/pppay/PppayNormalMchParams.java @@ -15,7 +15,7 @@ import org.apache.commons.lang3.StringUtils; * @create 2021/11/15 18:10 */ @Data -public class PpPayNormalMchParams extends NormalMchParams { +public class PppayNormalMchParams extends NormalMchParams { /** * 是否沙箱环境 */ @@ -45,7 +45,7 @@ public class PpPayNormalMchParams extends NormalMchParams { @Override public String deSenData() { - PpPayNormalMchParams mchParams = this; + PppayNormalMchParams mchParams = this; if (StringUtils.isNotBlank(this.secret)) { mchParams.setSecret(StringKit.str2Star(this.secret, 6, 6, 6)); } diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/PaypalWrapper.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/PaypalWrapper.java index 2de40d1..a7531c9 100644 --- a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/PaypalWrapper.java +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/PaypalWrapper.java @@ -3,8 +3,7 @@ package com.jeequan.jeepay.pay.model; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; import com.jeequan.jeepay.core.entity.PayOrder; -import com.jeequan.jeepay.core.model.params.pppay.PpPayNormalMchParams; -import com.jeequan.jeepay.core.model.params.wxpay.WxpayNormalMchParams; +import com.jeequan.jeepay.core.model.params.pppay.PppayNormalMchParams; import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; import com.paypal.core.PayPalEnvironment; import com.paypal.core.PayPalHttpClient; @@ -193,7 +192,7 @@ public class PaypalWrapper { return new ResponseEntity(text, httpHeaders, HttpStatus.OK); } - public static PaypalWrapper buildPaypalWrapper(PpPayNormalMchParams ppPayNormalMchParams){ + public static PaypalWrapper buildPaypalWrapper(PppayNormalMchParams ppPayNormalMchParams){ PaypalWrapper paypalWrapper = new PaypalWrapper(); PayPalEnvironment environment = new PayPalEnvironment.Live(ppPayNormalMchParams.getClientId(), ppPayNormalMchParams.getSecret()); if (ppPayNormalMchParams.getSandbox() == 1) { diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextQueryService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextQueryService.java index d69b078..6f7135b 100644 --- a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextQueryService.java +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextQueryService.java @@ -24,7 +24,7 @@ import com.jeequan.jeepay.core.model.params.IsvsubMchParams; import com.jeequan.jeepay.core.model.params.NormalMchParams; import com.jeequan.jeepay.core.model.params.alipay.AlipayIsvParams; import com.jeequan.jeepay.core.model.params.alipay.AlipayNormalMchParams; -import com.jeequan.jeepay.core.model.params.pppay.PpPayNormalMchParams; +import com.jeequan.jeepay.core.model.params.pppay.PppayNormalMchParams; import com.jeequan.jeepay.core.model.params.wxpay.WxpayIsvParams; import com.jeequan.jeepay.core.model.params.wxpay.WxpayNormalMchParams; import com.jeequan.jeepay.pay.model.*; @@ -208,7 +208,7 @@ public class ConfigContextQueryService { return configContextService.getMchAppConfigContext(mchAppConfigContext.getMchNo(), mchAppConfigContext.getAppId()).getPaypalWrapper(); } - PpPayNormalMchParams ppPayNormalMchParams = (PpPayNormalMchParams) queryNormalMchParams(mchAppConfigContext.getMchNo(), mchAppConfigContext.getAppId(), CS.IF_CODE.PPPAY);; + PppayNormalMchParams ppPayNormalMchParams = (PppayNormalMchParams) queryNormalMchParams(mchAppConfigContext.getMchNo(), mchAppConfigContext.getAppId(), CS.IF_CODE.PPPAY);; return PaypalWrapper.buildPaypalWrapper(ppPayNormalMchParams); } diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextService.java index 31b8670..9b23fa0 100644 --- a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextService.java +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextService.java @@ -25,13 +25,11 @@ import com.jeequan.jeepay.core.model.params.IsvsubMchParams; import com.jeequan.jeepay.core.model.params.NormalMchParams; import com.jeequan.jeepay.core.model.params.alipay.AlipayIsvParams; import com.jeequan.jeepay.core.model.params.alipay.AlipayNormalMchParams; -import com.jeequan.jeepay.core.model.params.pppay.PpPayNormalMchParams; +import com.jeequan.jeepay.core.model.params.pppay.PppayNormalMchParams; import com.jeequan.jeepay.core.model.params.wxpay.WxpayIsvParams; import com.jeequan.jeepay.core.model.params.wxpay.WxpayNormalMchParams; import com.jeequan.jeepay.pay.model.*; import com.jeequan.jeepay.service.impl.*; -import com.paypal.core.PayPalEnvironment; -import com.paypal.core.PayPalHttpClient; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -227,7 +225,7 @@ public class ConfigContextService { } //放置 paypal client - PpPayNormalMchParams ppPayMchParams = mchAppConfigContext.getNormalMchParamsByIfCode(CS.IF_CODE.PPPAY, PpPayNormalMchParams.class); + PppayNormalMchParams ppPayMchParams = mchAppConfigContext.getNormalMchParamsByIfCode(CS.IF_CODE.PPPAY, PppayNormalMchParams.class); if (ppPayMchParams != null) { mchAppConfigContext.setPaypalWrapper(PaypalWrapper.buildPaypalWrapper(ppPayMchParams)); }