Commit 36ba23ea by xiaoer.li@freemud.com

Merge branch 'feature/2.0.11-超时回调退款' into qa

parents 9233b03a e1bae5dd
......@@ -245,6 +245,11 @@ public class OrderAdapterServiceImpl implements OrderAdapterService {
if (!message.getResult_code().equals(ResponseCodeConstant.RESPONSE_SUCCESS)) {
return orderService.cannelComPayOrder(confirmOrderDto, orderBean);
}
//若是app订单超时回调了 订单已取消则做退款处理
if (OrderStatus.CALCEL.equals(orderBean.getStatus()) && OrderSourceType.APP.getCode().equals(orderBean.getSource())) {
orderService.timeOutRefund(orderBean);
return orderAdapter.sendPaySuccessNoticeMessage();
}
if (!PayStatus.NOT_PAY.getCode().equals(orderBean.getPayStatus())){
return orderAdapter.sendPaySuccessNoticeMessage();
}
......
......@@ -1999,6 +1999,19 @@ public class OrderServiceImpl implements Orderservice {
return null;
}
/**
* 超时回调直接退款
* @param orderBean
*/
public void timeOutRefund(QueryOrdersResponseDto.DataBean.OrderBean orderBean) {
//调用支付退款
log.info("payment timeout callback for refund orderDto={}",JSON.toJSONString(orderBean));
com.freemud.application.sdk.api.base.BaseResponse<OrderRefundResponse> response = null;
Long refundId = System.currentTimeMillis();
com.freemud.sdk.api.assortment.payment.request.OrderRefundRequest orderPayRefundRequest = orderAdapter.getOrderPayRefundRequest(orderBean, refundId, orderBean.getOid());
response = standardPaymentService.orderRefund(orderPayRefundRequest, LogTreadLocal.getTrackingNo());
log.info("payment timeout callback for refund orderId={},request={},resp={}",orderBean.getOid(),JSON.toJSONString(orderPayRefundRequest),JSON.toJSONString(response));
}
// public void backOrdersNotifyActivity(OrderBean orderBean, List<Integer> transType) {
// LogUtil.info("backOrdersNotifyActivity", gson.toJson(orderBean), gson.toJson(transType));
// if (orderBean == null) {
......
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