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

Commit a101b642 authored by 胡佳晨's avatar 胡佳晨

店铺折扣券 向下取整。支付宝扫码退款

parent bc741fe6
......@@ -93,19 +93,19 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
if (insertResult) {
switch (paymentType) {
case DragonConstant.REFUND_TYPE_APP_ALIPAY:
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime,orderCode);
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime, orderCode);
break;
case DragonConstant.REFUND_TYPE_WAP_ALIPAY:
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime,orderCode);
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime, orderCode);
break;
case DragonConstant.REFUND_TYPE_WEB_ALIPAY:
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime,orderCode);
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime, orderCode);
break;
case DragonConstant.REFUND_TYPE_APP_WEPAY:
dto = weyPayRefund(code, orderRefundCode, code, reason, price, priceTotal, paymentId, paymentType, localWePayCallBackUrl, nowTime);
break;
case DragonConstant.REFUND_TYPE_MICROPAY_ALIPAY:
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime,orderCode);
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime, orderCode);
break;
case DragonConstant.REFUND_TYPE_WAP_WEPAY:
dto = weyPayRefund(code, orderRefundCode, code, reason, price, priceTotal, paymentId, paymentType, localWePayCallBackUrl, nowTime);
......@@ -416,14 +416,14 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
parameters.put("appid", PayWepayUtils.getInstance().getAPPLET_APP_ID());
} else if (paymentType.equalsIgnoreCase(DragonConstant.PayTypeEnum.PAYMENT_TYPE_WAP_WEPAY.getCode())) {
parameters.put("appid", PayWepayUtils.getInstance().getWAP_APP_ID());
}else if(paymentType.equalsIgnoreCase(DragonConstant.PayTypeEnum.PAYMENT_TYPE_MICROPAY_WEPAY.getCode())){
} else if (paymentType.equalsIgnoreCase(DragonConstant.PayTypeEnum.PAYMENT_TYPE_MICROPAY_WEPAY.getCode())) {
parameters.put("appid", PayWepayUtils.getInstance().getAPP_ID());
}
parameters.put("nonce_str", nonceStr);
parameters.put("out_refund_no", refundCode);
parameters.put("out_trade_no", code);
parameters.put("refund_fee", (price.multiply(new BigDecimal(100)).intValue())+"");
parameters.put("total_fee", (priceTotal.multiply(new BigDecimal(100)).intValue())+"");
parameters.put("refund_fee", (price.multiply(new BigDecimal(100)).intValue()) + "");
parameters.put("total_fee", (priceTotal.multiply(new BigDecimal(100)).intValue()) + "");
parameters.put("notify_url", notifyUrl);
parameters.put("refund_desc", reason);
parameters.put("refund_account", "REFUND_SOURCE_RECHARGE_FUNDS");
......@@ -528,7 +528,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
}
//支付宝退款接口
public DragonRefundChannelDto aliPayRefund(String orderRefundId, String refundCode, String code, String reason, BigDecimal price, String paymentId, String paymentType, LocalDateTime nowTime,String orderCode) {
public DragonRefundChannelDto aliPayRefund(String orderRefundId, String refundCode, String code, String reason, BigDecimal price, String paymentId, String paymentType, LocalDateTime nowTime, String orderCode) {
String refundStatus;
DragonRefundChannelDto channelDto = new DragonRefundChannelDto();
RefundContentDto contentDto = new RefundContentDto();
......@@ -608,14 +608,15 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
contentDto.setRequest(JSON.toJSONString(response.getParams()));
contentDto.setResponse(response.getBody());
channelDto.setContent(contentDto);
if(DragonConstant.REFUND_TYPE_MICROPAY_ALIPAY.equals(paymentType) && response.getFundChange().equals("Y")) {
if (DragonConstant.REFUND_TYPE_MICROPAY_ALIPAY.equals(paymentType) && response.getFundChange().equals("Y")) {
AliPayRefundReturnCallBackDto map = AliPayRefundReturnCallBackDto.getNew();
map.setOutBizNo(refundCode);
map.setTradeNo(paymentId);
map.setOutTradeNo(orderCode);
map.setGmtRefund(DateUtil.format(response.getGmtRefundPay(), DateUtil.Formatter.yyyyMMddHHmmss));
log.info(JSON.toJSONString(map));
aliPayRefundCallBack(JSON.toJSONString(map));
String jsonStr = JSON.toJSONString(map);
jsonStr = jsonStr.replace("gmtRefund", "gmt_refund").replace("outBizNo", "out_biz_no").replace("outTradeNo", "out_trade_no").replace("tradeNo", "trade_no");
aliPayRefundCallBack(jsonStr);
}
return channelDto;
} catch (Exception e) {
......
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