mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-09 22:09:05 +00:00
feat 调式转账接口
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package cn.daxpay.single.service.core.payment.pay.service;
|
||||
|
||||
import cn.daxpay.single.core.exception.PayFailureException;
|
||||
import cn.daxpay.single.core.exception.TradeProcessingException;
|
||||
import cn.daxpay.single.core.param.payment.pay.PayParam;
|
||||
import cn.daxpay.single.core.result.pay.PayResult;
|
||||
@@ -97,7 +98,12 @@ public class PayService {
|
||||
// 支付操作
|
||||
payStrategy.doPayHandler();
|
||||
} catch (Exception e) {
|
||||
payOrder.setErrorMsg(e.getMessage());
|
||||
// 记录错误原因, 此处没有事务, 所以可以正常更新
|
||||
if (e instanceof PayFailureException){
|
||||
payOrder.setErrorCode(e.getMessage());
|
||||
} else {
|
||||
payOrder.setErrorCode("支付出现异常");
|
||||
}
|
||||
// 这个方法没有事务, 所以可以正常更新
|
||||
payOrderService.updateById(payOrder);
|
||||
throw e;
|
||||
@@ -149,7 +155,11 @@ public class PayService {
|
||||
payStrategy.doPayHandler();
|
||||
} catch (Exception e) {
|
||||
// 记录错误原因, 此处没有事务, 所以可以正常更新
|
||||
payOrder.setErrorMsg(e.getMessage());
|
||||
if (e instanceof PayFailureException){
|
||||
payOrder.setErrorCode(e.getMessage());
|
||||
} else {
|
||||
payOrder.setErrorCode("支付出现异常");
|
||||
}
|
||||
payOrderService.updateById(payOrder);
|
||||
throw e;
|
||||
}
|
||||
|
Reference in New Issue
Block a user