mirror of
https://github.com/jeequan/jeepay
synced 2024-11-17 14:58:04 +08:00
优化paypal支付接口参数类名大小写问题
This commit is contained in:
parent
ee24b98a1a
commit
88ceef61da
@ -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));
|
||||
}
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user