|
@@ -116,7 +116,7 @@ public class AlipayServiceImpl implements AlipayService {
|
|
|
|
|
|
|
|
|
Map<String, Object> maps = new HashMap<>();
|
|
|
- maps.put("out_trade_no", orderInfo.getOutOrderNo());
|
|
|
+ maps.put("trade_no", orderInfo.getTransactionId());
|
|
|
maps.put("refund_reason", "正常退款");
|
|
|
maps.put("refund_amount", orderInfo.getPayFee());
|
|
|
|
|
@@ -134,14 +134,16 @@ public class AlipayServiceImpl implements AlipayService {
|
|
|
AlipayTradeRefundResponse response = alipayClient.execute(request);
|
|
|
|
|
|
//退款成功
|
|
|
- if (response.isSuccess()){
|
|
|
+ if ("10000".equals(response.getCode())){
|
|
|
orderInfo.setRefundFee(orderInfo.getPayFee());
|
|
|
orderInfo.setPayStatus(payStatus);
|
|
|
orderInfoService.update(orderInfo);
|
|
|
|
|
|
+ }else {
|
|
|
+ throw new Exception(response.getSubMsg());
|
|
|
}
|
|
|
|
|
|
- return response.isSuccess();
|
|
|
+ return true;
|
|
|
|
|
|
|
|
|
}
|