| | |
| | | request.setTransactionId(o.getPaymentTrId()); |
| | | request.setNotifyUrl(PyamentV3Configurer.notify_url_refund); |
| | | |
| | | AmountReq amount = new AmountReq(); |
| | | int oa = prepareAmount(o.getPaymentAmount()); |
| | | amount.setTotal((long)oa); |
| | | amount.setRefund((long)oa); |
| | | amount.setCurrency("CNY"); |
| | | request.setAmount(amount); |
| | | // 调用接口 |
| | | refundService.create(request); |
| | | |
| | | o.setRefundAmount(o.getPaymentAmount()); |
| | | o.setRefundNo(request.getOutRefundNo()); |
| | | o.setRefundTime(LocalDateTime.now()); |
| | |
| | | deliveryOrderService.refundDelete(orderId); |
| | | |
| | | releasePrepayLock(o); |
| | | |
| | | //最后调用微信退款接口,防止回滚 |
| | | AmountReq amount = new AmountReq(); |
| | | int oa = prepareAmount(o.getPaymentAmount()); |
| | | amount.setTotal((long)oa); |
| | | amount.setRefund((long)oa); |
| | | amount.setCurrency("CNY"); |
| | | request.setAmount(amount); |
| | | // 调用接口 |
| | | refundService.create(request); |
| | | } |
| | | |
| | | public String refundOrderSub(Order o, BigDecimal refundAmount){ |