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

Commit a35c62ab authored by zhoujianping's avatar zhoujianping

1.支付宝小程序退款接口增加回调地址

parent 1d1bcbb7
...@@ -101,7 +101,7 @@ public class PayChannelStrategyAlipayImpl extends AbstractPayChannelStrategyImpl ...@@ -101,7 +101,7 @@ public class PayChannelStrategyAlipayImpl extends AbstractPayChannelStrategyImpl
//退款 //退款
if(notifyMap.containsKey("refund_fee") || notifyMap.containsKey("gmt_refund") || notifyMap.containsKey("out_biz_no")) { if(notifyMap.containsKey("refund_fee") || notifyMap.containsKey("gmt_refund") || notifyMap.containsKey("out_biz_no")) {
returnStr = dragonOrderRefundsService.aliPayRefundCallBack(JSON.toJSONString(notifyMap)); returnStr = dragonOrderRefundsService.aliPayRefundCallBack(JSON.toJSONString(notifyMap),payType,deviceFrom);
return returnStr; return returnStr;
} }
......
...@@ -951,7 +951,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService ...@@ -951,7 +951,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
return null; return null;
} }
public String aliPayRefundCallBack(String jsonStr) { public String aliPayRefundCallBack(String jsonStr,String payType,String deviceFrom) {
LocalDateTime nowTime = LocalDateTime.now(); LocalDateTime nowTime = LocalDateTime.now();
try { try {
AliPayRefundReturnCallBackDto callBackDto = JsonUtils.fromJson(jsonStr, AliPayRefundReturnCallBackDto.class); AliPayRefundReturnCallBackDto callBackDto = JsonUtils.fromJson(jsonStr, AliPayRefundReturnCallBackDto.class);
...@@ -960,9 +960,16 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService ...@@ -960,9 +960,16 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
"\"out_trade_no\":\"" + callBackDto.getOutTradeNo() + "\"," + "\"out_trade_no\":\"" + callBackDto.getOutTradeNo() + "\"," +
"\"trade_no\":\"" + callBackDto.getTradeNo() + "\"," + "\"trade_no\":\"" + callBackDto.getTradeNo() + "\"," +
"\"out_request_no\":\"" + callBackDto.getOutBizNo() + "\"}"); //设置业务参数 "\"out_request_no\":\"" + callBackDto.getOutBizNo() + "\"}"); //设置业务参数
AlipayTradeFastpayRefundQueryResponse response = PayAlipayUtils.getInstance().getHttpClient().execute(request); AlipayClient httpClient=null;
log.info("AlipayTradeFastpayRefundQueryRequest -> data = " + JSON.toJSONString(response)); if(payType.equals(DragonConstant.PayChannelEnum.ALIPAY.getCode()) && deviceFrom.equals(DragonConstant.DeviceFromEnum.APPLET.getCode())){
//支付小程序
httpClient=PayAlipayUtils.getInstance().getHttpClientApplet();
}else {
httpClient=PayAlipayUtils.getInstance().getHttpClient();
}
AlipayTradeFastpayRefundQueryResponse response = httpClient.execute(request);
log.info("AlipayTradeFastpayRefundQueryRequest -> data = " + JSON.toJSONString(response));
if (response.isSuccess()) { if (response.isSuccess()) {
try { try {
NotifyUrlDto dto = new NotifyUrlDto(); NotifyUrlDto dto = new NotifyUrlDto();
......
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