|
|
@@ -13,7 +13,7 @@ use Yii;
|
|
|
class payUtil
|
|
|
{
|
|
|
|
|
|
- public static function thirdPay($payWay, $capitalType, $orderSn, $totalFee, $attach)
|
|
|
+ public static function thirdPay($payWay, $capitalType, $orderSn, $totalFee, $attach, $transactionId = '')
|
|
|
{
|
|
|
$connection = Yii::$app->db;
|
|
|
$transaction = $connection->beginTransaction();
|
|
|
@@ -27,7 +27,7 @@ class payUtil
|
|
|
break;
|
|
|
case dict::getDict('capitalType', 'xhPurchase', 'id'):
|
|
|
//零售采购订单
|
|
|
- PurchaseService::thirdPay($payWay, $orderSn, $totalFee, $attach);
|
|
|
+ PurchaseService::thirdPay($payWay, $orderSn, $totalFee, $attach, $transactionId);
|
|
|
break;
|
|
|
case dict::getDict('capitalType', 'hdPurchaseClear', 'id'):
|
|
|
//零售采购订单结清欠款
|
|
|
@@ -47,8 +47,10 @@ class payUtil
|
|
|
break;
|
|
|
default:
|
|
|
}
|
|
|
+
|
|
|
$transaction->commit();
|
|
|
- } catch (Exception $exception) {
|
|
|
+ } catch
|
|
|
+ (Exception $exception) {
|
|
|
$transaction->rollBack();
|
|
|
util::fail("支付回调处理失败 orderSn:{$orderSn} capitalType:{$capitalType}");
|
|
|
}
|