| | |
| | | amount.setTotal(shoppingOrder.getPaymentAmount().multiply(new BigDecimal(100)).intValue()); |
| | | amount.setCurrency("CNY"); |
| | | model.setAmount(amount); |
| | | R<String> orderR = wxPaymentClient.refundOrderR(model); |
| | | R<Map<String, Object>> orderR = wxPaymentClient.refundOrderR(model); |
| | | if(200 == orderR.getCode()){ |
| | | this.updateById(shoppingOrder); |
| | | shoppingOrderRefundService.save(shoppingOrderRefund); |
| | | //手续费 |
| | | Map<String, Object> amount1 = (Map<String, Object>) orderR.getData().get("amount"); |
| | | BigDecimal refund_fee = new BigDecimal(amount1.get("refund_fee").toString()).divide(new BigDecimal(100)); |
| | | shoppingOrderRefund.setRefundFee(refund_fee); |
| | | shoppingOrderRefundService.updateById(shoppingOrderRefund); |
| | | } |
| | | } |
| | | if(2 == paymentType){ |