Browse Source

支付方式

shish 2 years ago
parent
commit
798c8a78d2
2 changed files with 7 additions and 9 deletions
  1. 6 8
      app-hd/controllers/NoticeController.php
  2. 1 1
      common/components/lakala/Lakala.php

+ 6 - 8
app-hd/controllers/NoticeController.php

@@ -78,20 +78,18 @@ class NoticeController extends PublicController
         $connection = Yii::$app->db;
         $transaction = $connection->beginTransaction();
         try {
-            $payWayType = null;
+            $currentPayWay = null;
             if ($account_type == 'WECHAT') {
-                $payWayType = dict::getDict('payWay', 'wxPay');
-            }
-            if ($account_type == 'ALIPAY') {
-                $payWayType = dict::getDict('payWay', 'alipay');
-            }
-            if (empty($payWayType)) {
+                $currentPayWay = dict::getDict('payWay', 'wxPay');
+            } elseif ($account_type == 'ALIPAY') {
+                $currentPayWay = dict::getDict('payWay', 'alipay');
+            } else {
                 noticeUtil::push('支付回调失败了,没有找到支付类型,orderSn:' . $orderSn, '15280215347');
                 util::end();
             }
             //支付成功后续流程
             $attach = '';
-            payUtil::thirdPay($payWayType, $capitalType, $orderSn, $totalFee, $attach, $transactionId);
+            payUtil::thirdPay($currentPayWay, $capitalType, $orderSn, $totalFee, $attach, $transactionId);
             $transaction->commit();
             echo "SUCCESS";
 

+ 1 - 1
common/components/lakala/Lakala.php

@@ -85,7 +85,7 @@ class Lakala
         return $this->post($lklUrl, $body, $authorization);
     }
 
-    //主扫交易,支付宝
+    //主扫交易,微信
     public function driveWxPay($params)
     {
         $orderSn = $params['orderSn'];