记得上下班打卡 | git大法好,push需谨慎

Commit e2a0cc19 authored by zhengfuxin's avatar zhengfuxin

修改退款bug

parent 8fed6da9
......@@ -121,9 +121,11 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
dto = douYinRefund(code, orderRefundCode, code, reason, price, priceTotal, paymentId, paymentType, localDouYinCallBackUrl, nowTime);
break;
case DragonConstant.REFUND_TYPE_WAP_UNION:
dataUtils.setOrderCode(orderRefundCode,orderCode);
dto =UnionWapPayRefund(code, orderRefundCode, code, reason, price, priceTotal, paymentId, paymentType, localUnionPayCallBackUrl, nowTime);
break;
case DragonConstant.REFUND_TYPE_APP_UNION:
dataUtils.setOrderCode(orderRefundCode,orderCode);
dto =UnionWapPayRefund(code, orderRefundCode, code, reason, price, priceTotal, paymentId, paymentType, localUnionPayCallBackUrl, nowTime);
break;
}
......@@ -283,7 +285,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
data.put("orderId", refundCode); //商户订单号,8-40位数字字母,不能含“-”或“_”,可以自行定制规则,重新产生,不同于原消费
data.put("txnTime", txnTime); //订单发送时间,格式为yyyyMMddHHmmss,必须取当前时间,否则会报txnTime无效
data.put("currencyCode", "156"); //交易币种(境内商户一般是156 人民币)
data.put("txnAmt", (price.doubleValue() * 100) + ""); //交易金额 单位为分
data.put("txnAmt", price.multiply(BigDecimal.valueOf(100L)).intValue() + ""); //交易金额 单位为分
data.put("backUrl", notifyUrl); //后台通知地址,后台通知参数详见open.unionpay.com帮助中心 下载 产品接口规范 网关支付产品接口规范 退货交易 商户通知,其他说明同消费交易的后台通知
/***要调通交易以下字段必须修改***/
data.put("origQryId", paymentId); //****原消费交易返回的的queryId,可以从消费交易后台通知接口中或者交易状态查询接口中获取
......@@ -753,10 +755,10 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
}
//商户订单号 商户退款单号
dto.setOrderRefundCode(orderId);
//银联无这个
dto.setRefundCode("");
//从redis里面
dto.setRefundCode(dataUtils.getOrderCode(orderId));
dto.setRefundPrice(new BigDecimal(notifyMap.get("settleAmt")).divide(BigDecimal.valueOf(100)).toString());
dto.setRefundAt(notifyMap.get("traceTime"));
dto.setRefundAt(DateUtil.Formatter.yyyyMMddHHmmss.format(LocalDateTime.now()));
// 应答信息
dto.setRefundError(notifyMap.get("respMsg"));
log.info("SEND WEPAY NOTIFTURL = " + JSON.toJSONString(dto));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment