|
@@ -107,21 +107,17 @@ public class UserOrderPaymentServiceImpl extends ServiceImpl<UserOrderPaymentDao
|
|
|
param.setPaymentNo(orderPayment.getPaymentNo());
|
|
|
param.setReason(reason);
|
|
|
|
|
|
- try {
|
|
|
- BaseResult<ClosePayment> responseResult = paymentClient.closePayment(param);
|
|
|
- log.info("关单返回: {}", JSONObject.toJSONString(responseResult));
|
|
|
- if (!responseResult.getStatus()) {
|
|
|
- orderPayment.setCloseStatus(TradeStatusEnum.failed);
|
|
|
- orderPayment.setCloseFailMsg(responseResult.getMsg());
|
|
|
+ BaseResult<ClosePayment> responseResult = paymentClient.closePayment(param);
|
|
|
+ log.info("关单返回: {}", JSONObject.toJSONString(responseResult));
|
|
|
+ if (!responseResult.getStatus()) {
|
|
|
+ orderPayment.setCloseStatus(TradeStatusEnum.failed);
|
|
|
+ orderPayment.setCloseFailMsg(responseResult.getMsg());
|
|
|
+ } else {
|
|
|
+ if (responseResult.getData().getHasNotify()) {
|
|
|
+ orderPayment.setCloseStatus(TradeStatusEnum.pending);
|
|
|
} else {
|
|
|
- if (responseResult.getData().getHasNotify()) {
|
|
|
- orderPayment.setCloseStatus(TradeStatusEnum.pending);
|
|
|
- } else {
|
|
|
- orderPayment.setCloseStatus(TradeStatusEnum.succeeded);
|
|
|
- }
|
|
|
+ orderPayment.setCloseStatus(TradeStatusEnum.succeeded);
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
updateById(orderPayment);
|