Commit 9077f14bae0ce0d329899bfb73bb2175f211222c
1 parent
7237bc07
钱包支付 Client 失败问题修改
Showing
1 changed file
with
8 additions
and
6 deletions
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/wallet/WalletPayClient.java
| @@ -47,14 +47,15 @@ public class WalletPayClient extends DelegatePayClient<NonePayClientConfig> { | @@ -47,14 +47,15 @@ public class WalletPayClient extends DelegatePayClient<NonePayClientConfig> { | ||
| 47 | reqDTO.getOutTradeNo(), "WALLET_PAY_SUCCESS"); | 47 | reqDTO.getOutTradeNo(), "WALLET_PAY_SUCCESS"); |
| 48 | } catch (Throwable ex) { | 48 | } catch (Throwable ex) { |
| 49 | log.error("[doUnifiedOrder] 失败", ex); | 49 | log.error("[doUnifiedOrder] 失败", ex); |
| 50 | - String errorCode = String.valueOf(INTERNAL_SERVER_ERROR); | 50 | + Integer errorCode = INTERNAL_SERVER_ERROR.getCode(); |
| 51 | String errorMsg = INTERNAL_SERVER_ERROR.getMsg(); | 51 | String errorMsg = INTERNAL_SERVER_ERROR.getMsg(); |
| 52 | if (ex instanceof ServiceException) { | 52 | if (ex instanceof ServiceException) { |
| 53 | ServiceException serviceException = (ServiceException) ex; | 53 | ServiceException serviceException = (ServiceException) ex; |
| 54 | - errorCode = String.valueOf(serviceException.getCode()); | 54 | + errorCode = serviceException.getCode(); |
| 55 | errorMsg = serviceException.getMessage(); | 55 | errorMsg = serviceException.getMessage(); |
| 56 | } | 56 | } |
| 57 | - return PayOrderRespDTO.closedOf(errorCode, errorMsg, reqDTO.getOutTradeNo(), ex); | 57 | + return PayOrderRespDTO.closedOf(String.valueOf(errorCode), errorMsg, |
| 58 | + reqDTO.getOutTradeNo(), ""); | ||
| 58 | } | 59 | } |
| 59 | } | 60 | } |
| 60 | 61 | ||
| @@ -77,14 +78,15 @@ public class WalletPayClient extends DelegatePayClient<NonePayClientConfig> { | @@ -77,14 +78,15 @@ public class WalletPayClient extends DelegatePayClient<NonePayClientConfig> { | ||
| 77 | reqDTO.getOutRefundNo(), "WALLET_REFUND_SUCCESS"); | 78 | reqDTO.getOutRefundNo(), "WALLET_REFUND_SUCCESS"); |
| 78 | } catch (Throwable ex) { | 79 | } catch (Throwable ex) { |
| 79 | log.error("[doUnifiedRefund] 失败", ex); | 80 | log.error("[doUnifiedRefund] 失败", ex); |
| 80 | - String errorCode = String.valueOf(INTERNAL_SERVER_ERROR); | 81 | + Integer errorCode = INTERNAL_SERVER_ERROR.getCode(); |
| 81 | String errorMsg = INTERNAL_SERVER_ERROR.getMsg(); | 82 | String errorMsg = INTERNAL_SERVER_ERROR.getMsg(); |
| 82 | if (ex instanceof ServiceException) { | 83 | if (ex instanceof ServiceException) { |
| 83 | ServiceException serviceException = (ServiceException) ex; | 84 | ServiceException serviceException = (ServiceException) ex; |
| 84 | - errorCode = String.valueOf(serviceException.getCode()); | 85 | + errorCode = serviceException.getCode(); |
| 85 | errorMsg = serviceException.getMessage(); | 86 | errorMsg = serviceException.getMessage(); |
| 86 | } | 87 | } |
| 87 | - return PayRefundRespDTO.failureOf(errorCode, errorMsg, reqDTO.getOutRefundNo(), ex); | 88 | + return PayRefundRespDTO.failureOf(String.valueOf(errorCode), errorMsg, |
| 89 | + reqDTO.getOutRefundNo(), ""); | ||
| 88 | } | 90 | } |
| 89 | } | 91 | } |
| 90 | 92 |