Compare commits
3 Commits
1f012e2c5d
...
0202a93360
| Author | SHA1 | Date |
|---|---|---|
|
|
0202a93360 | |
|
|
d6303efc7b | |
|
|
42b52b037a |
|
|
@ -42,9 +42,9 @@ public class JdPayHttpClientProxy {
|
|||
log.info("1.{}接口请求参数:{}", apiName, request);
|
||||
// 请求参数加密和签名
|
||||
String httpRequest = JdPayApiUtil.encryptAndSignature(jdPayNewConfig, reqNo, request);
|
||||
log.info("2.{}远程调用请求参数:{}", apiName, httpRequest);
|
||||
// log.info("2.{}远程调用请求参数:{}", apiName, httpRequest);
|
||||
String httpResponse = jdPayHttpClient.execute(jdPayNewConfig, urlSuffix, httpRequest);
|
||||
log.info("3.{}远程调用返回参数:{}", apiName, httpResponse);
|
||||
// log.info("3.{}远程调用返回参数:{}", apiName, httpResponse);
|
||||
// 验证和解析返回参数
|
||||
response = JdPayApiUtil.decryptAndVerifySign(jdPayNewConfig, httpResponse);
|
||||
log.info("4.{}耗时:{},接口返回参数:{}", apiName, (System.currentTimeMillis() - startTimestampMs), response);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.hzs.third.pay.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.hzs.common.core.config.BdConfig;
|
||||
|
|
@ -352,7 +353,7 @@ public class JdPayServiceImpl implements IJdPayService {
|
|||
return AjaxResult.success("已支付订单 无需补偿回调!");
|
||||
}
|
||||
log.info("queryOrder : {}", JSONUtil.toJsonStr(response));
|
||||
{
|
||||
if ("FINI".equals(response.getTradeStatus())){
|
||||
// 支付成功处理
|
||||
|
||||
// 商户订单号
|
||||
|
|
@ -370,7 +371,10 @@ public class JdPayServiceImpl implements IJdPayService {
|
|||
// 订单金额
|
||||
int tradeAmount = Integer.parseInt(response.getTradeAmount());
|
||||
BigDecimal payMoney = new BigDecimal(tradeAmount).divide(new BigDecimal("100"), 2, BigDecimal.ROUND_HALF_UP);
|
||||
Integer payType = convertPayType(response.getPayTool());
|
||||
Integer payType = null;
|
||||
if(StrUtil.isNotEmpty(response.getPayTool())){
|
||||
payType = convertPayType(response.getPayTool());
|
||||
}
|
||||
// 支付后续业务处理
|
||||
if (iPayService.notifyHandle(tOnlinePayment.getBusinessType().toString() , thirdOrderCode, thirdOrderCode, payNumber, payTime, payMoney, EPayChannel.JD, channelNumber, payType, acqOrderId)) {
|
||||
return AjaxResult.success();
|
||||
|
|
|
|||
Loading…
Reference in New Issue