修改支付宝支付 地址

This commit is contained in:
yijiegong 2024-09-18 17:42:42 +08:00
parent 9ddef54afd
commit 53597281d9
2 changed files with 11 additions and 8 deletions

View File

@ -1860,10 +1860,9 @@ public class PayService {
public Result createOrder(String ip, String userId, String payType, String shopId, BigDecimal amount) throws JsonProcessingException { public Result createOrder(String ip, String userId, String payType, String shopId, BigDecimal amount) throws JsonProcessingException {
if (ObjectUtil.isNull(userId) || ObjectUtil.isEmpty(userId) || ObjectUtil.isEmpty(payType) || ObjectUtil.isNull(payType) if (ObjectUtil.isNull(userId) || ObjectUtil.isEmpty(userId) || ObjectUtil.isEmpty(payType) ||
ObjectUtil.isNull(payType) || ObjectUtil.isNull(shopId) || ObjectUtil.isEmpty(shopId) ||
|| ObjectUtil.isNull(shopId) || ObjectUtil.isEmpty(shopId) || ObjectUtil.isNull(shopId) || ObjectUtil.isNull(amount) || ObjectUtil.isEmpty(amount) ObjectUtil.isNull(shopId) || ObjectUtil.isNull(amount) || ObjectUtil.isEmpty(amount)) {
) {
return Result.fail(CodeEnum.PARAM); return Result.fail(CodeEnum.PARAM);
} }
@ -1930,8 +1929,10 @@ public class PayService {
String reqbody = "店铺收款码"; String reqbody = "店铺收款码";
if("WECHAT".equals(payType)){ if("WECHAT".equals(payType)){
PublicResp<JspayResp> publicResp = thirdPayService.jspay(url, thirdApply.getAppId(), thirdApply.getAppToken(), reqbody, reqbody, orderInfo.getOrderAmount().multiply(new BigDecimal(100)).longValue(), payType, "WECHAT".equals(payType) ? thirdApply.getSmallAppid() : null, userId, ip, DateUtils.getSsdfTimes(), thirdApply.getStoreId(), backUrl, backUrl); PublicResp<JspayResp> publicResp = thirdPayService.jspay(url, thirdApply.getAppId(), thirdApply.getAppToken(),
reqbody, reqbody, orderInfo.getOrderAmount().multiply(new BigDecimal(100)).longValue(),
payType, thirdApply.getSmallAppid(), userId, ip,
DateUtils.getSsdfTimes(), thirdApply.getStoreId(), backUrl, backUrl);
if (ObjectUtil.isNotNull(publicResp) && ObjectUtil.isNotEmpty(publicResp)) { if (ObjectUtil.isNotNull(publicResp) && ObjectUtil.isNotEmpty(publicResp)) {
if ("000000".equals(publicResp.getCode())) { if ("000000".equals(publicResp.getCode())) {
@ -1981,7 +1982,9 @@ public class PayService {
} }
} }
}else if("ALIPAY".equals(payType)){ }else if("ALIPAY".equals(payType)){
PublicResp<ApppayResp> publicResp= thirdPayService.apppay(url,thirdApply.getAppId(),thirdApply.getAppToken(),reqbody,reqbody,orderInfo.getOrderAmount().multiply(new BigDecimal(100)).longValue(),payType,ip,DateUtils.getSsdfTimes(),thirdApply.getStoreId(),backUrl,backUrl); PublicResp<ApppayResp> publicResp= thirdPayService.apppay(url,thirdApply.getAppId(),thirdApply.getAppToken(),
reqbody,reqbody,orderInfo.getOrderAmount().multiply(new BigDecimal(100)).longValue(),
payType,ip,DateUtils.getSsdfTimes(),thirdApply.getStoreId(),backUrl,backUrl);
if (ObjectUtil.isNotNull(publicResp) && ObjectUtil.isNotEmpty(publicResp)) { if (ObjectUtil.isNotNull(publicResp) && ObjectUtil.isNotEmpty(publicResp)) {
if ("000000".equals(publicResp.getCode())) { if ("000000".equals(publicResp.getCode())) {

View File

@ -411,7 +411,7 @@ public class ThirdPayService {
param.setSign(sign); param.setSign(sign);
String reqbody = JSONUtil.toJSONString(param); String reqbody = JSONUtil.toJSONString(param);
log.info("请求参数:{}", reqbody); log.info("请求参数:{}", reqbody);
String response = HttpRequest.post(url.concat(apppay)).body(reqbody).execute().body(); String response = HttpRequest.post(url.concat(h5pay)).body(reqbody).execute().body();
log.info("返回结果:{}", response); log.info("返回结果:{}", response);
PublicResp<ApppayResp> resp =JSONUtil.parseJSONStr2T(response,PublicResp.class); PublicResp<ApppayResp> resp =JSONUtil.parseJSONStr2T(response,PublicResp.class);
resp.setObjData(JSONUtil.parseJSONStr2T(resp.getBizData(),ApppayResp.class)); resp.setObjData(JSONUtil.parseJSONStr2T(resp.getBizData(),ApppayResp.class));