Browse Source

支付类型

shish 10 months ago
parent
commit
2b229303da
1 changed files with 9 additions and 1 deletions
  1. 9 1
      app-mall/controllers/NoticeController.php

+ 9 - 1
app-mall/controllers/NoticeController.php

@@ -425,7 +425,15 @@ class NoticeController extends PublicController
             util::end();
         }
 
-        $capitalType = dict::getDict('capitalType', 'xhOrder', 'id');
+        //接收流水类型、代金劵
+        $remarkString = $orderTradeInfo['trade_remark'] ?? '';
+        $remarkData = json_decode($remarkString, true);
+        $capitalType = $remarkData['capitalType'] ?? null;
+        if (!isset($capitalType)) {
+            $msg = '支付回调失败了,没有找到capitalType,orderSn:' . $orderSn . ' remark:' . $remarkString;
+            noticeUtil::push($msg, '15280215347');
+            util::end();
+        }
 
         $connection = Yii::$app->db;
         $transaction = $connection->beginTransaction();