|
|
@@ -31,12 +31,15 @@ class CgRefundService extends BaseService
|
|
|
if (empty($cg)) {
|
|
|
util::fail('没有找到采购订单');
|
|
|
}
|
|
|
+ $payWay = $cg->payWay;
|
|
|
$cg->refund = PurchaseClass::REFUND_YES;
|
|
|
$cg->save();
|
|
|
|
|
|
$transaction_id = $cg->thirdNo ?? '';
|
|
|
- if (empty($transaction_id)) {
|
|
|
- util::fail('第三方支付订单号没有找到');
|
|
|
+ if ($payWay == dict::getDict('payWay', 'wxPay')) {
|
|
|
+ if (empty($transaction_id)) {
|
|
|
+ util::fail('第三方支付订单号没有找到');
|
|
|
+ }
|
|
|
}
|
|
|
$refundOrderSn = orderSn::getCgRefundSn();
|
|
|
$post['cgId'] = $cg->id;
|
|
|
@@ -105,7 +108,6 @@ class CgRefundService extends BaseService
|
|
|
$shop->totalIncome = $currentTotalIncome;
|
|
|
$shop->save();
|
|
|
|
|
|
- $payWay = $cg->payWay;
|
|
|
$currentType = dict::getDict('capitalType', 'cgRefund', 'id');
|
|
|
|
|
|
if ($payWay == dict::getDict('payWay', 'wxPay')) {
|