修改支付宝支付 地址
This commit is contained in:
parent
9ddef54afd
commit
53597281d9
|
|
@ -1860,10 +1860,9 @@ public class PayService {
|
|||
|
||||
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)
|
||||
|
||||
|| ObjectUtil.isNull(shopId) || ObjectUtil.isEmpty(shopId) || ObjectUtil.isNull(shopId) || ObjectUtil.isNull(amount) || ObjectUtil.isEmpty(amount)
|
||||
) {
|
||||
if (ObjectUtil.isNull(userId) || ObjectUtil.isEmpty(userId) || ObjectUtil.isEmpty(payType) ||
|
||||
ObjectUtil.isNull(payType) || ObjectUtil.isNull(shopId) || ObjectUtil.isEmpty(shopId) ||
|
||||
ObjectUtil.isNull(shopId) || ObjectUtil.isNull(amount) || ObjectUtil.isEmpty(amount)) {
|
||||
return Result.fail(CodeEnum.PARAM);
|
||||
}
|
||||
|
||||
|
|
@ -1930,8 +1929,10 @@ public class PayService {
|
|||
String reqbody = "店铺收款码";
|
||||
|
||||
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 ("000000".equals(publicResp.getCode())) {
|
||||
|
|
@ -1981,7 +1982,9 @@ public class PayService {
|
|||
}
|
||||
}
|
||||
}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 ("000000".equals(publicResp.getCode())) {
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ public class ThirdPayService {
|
|||
param.setSign(sign);
|
||||
String reqbody = JSONUtil.toJSONString(param);
|
||||
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);
|
||||
PublicResp<ApppayResp> resp =JSONUtil.parseJSONStr2T(response,PublicResp.class);
|
||||
resp.setObjData(JSONUtil.parseJSONStr2T(resp.getBizData(),ApppayResp.class));
|
||||
|
|
|
|||
Loading…
Reference in New Issue