Explorar el Código

Merge branch 'dev' of git.huaml.com:zhh/huahuibao into dev

shizhongqi hace 8 meses
padre
commit
88dd0b6ccb

+ 1 - 1
app-ghs/controllers/RenewController.php

@@ -124,7 +124,7 @@ class RenewController extends BaseController
             if (getenv('YII_ENV') == 'production') {
                 $staff = $this->shopAdmin;
                 if ($price < 1580 && $staff->mobile != 15280215347) {
-                    util::fail('金额不能低于年费');
+                    //util::fail('金额不能低于年费');
                 }
             }
             $name = "购买系统";

+ 2 - 1
app-ghs/controllers/TestController.php

@@ -428,7 +428,8 @@ class TestController extends BaseController
             //['name' => '晋江花多多鲜花', 'merchantNo' => '8223970599200EW', 'wx' => [825459643, 825460214], 'zfb' => '2088080677754761'],
             //['name' => '昆明源花汇鲜花', 'merchantNo' => '8227310599200VZ', 'wx' => [826321533, 826321247], 'zfb' => '2088080751421086'],
             //['name' => '厦门厦茗绿植批发', 'merchantNo' => '8223930599200GK', 'wx' => [826594015, 826593264], 'zfb' => '2088080774924483'],
-            ['name' => '珠海淘花里', 'merchantNo' => '82258505992007T', 'wx' => [831476540, 831477416], 'zfb' => '2088180135238924'],
+            //['name' => '珠海淘花里', 'merchantNo' => '82258505992007T', 'wx' => [831476540, 831477416], 'zfb' => '2088180135238924'],
+            ['name' => '龙岩花掌柜', 'merchantNo' => '82240505992005D', 'wx' => [832139093, 832139074], 'zfb' => '2088180163717015'],
             ['name' => '惠州美天鲜花水口店', 'merchantNo' => '8225950599200CY', 'wx' => [827536311, 827535872], 'zfb' => '2088080848565460'],
             ['name' => '深圳鼎盛皇室花卉', 'merchantNo' => '8225840599201MF', 'wx' => [807078304, 807076486], 'zfb' => '2088970117746334'],
             //['name' => '东莞惠雅鲜花(莞城店)', 'merchantNo' => '8226020599200GJ', 'wx' => [796953190, 796976959], 'zfb' => '2088770940104912'],

+ 3 - 0
app-hd/controllers/PurchaseController.php

@@ -1047,6 +1047,8 @@ class PurchaseController extends BaseController
     {
         ini_set('date.timezone', 'Asia/Shanghai');
         $post = Yii::$app->request->post();
+        //默认是支付宝支付
+        $payWay = $post['payWay'] ?? 1;
         $orderSn = isset($post['orderSn']) ? $post['orderSn'] : 0;
         $order = PurchaseClass::getByCondition(['orderSn' => $orderSn], true);
         if (empty($order)) {
@@ -1154,6 +1156,7 @@ class PurchaseController extends BaseController
             'capitalType' => $purchaseCapital,
             'notifyUrl' => $notifyUrl,
             'subject' => $name,
+            'payWay' => $payWay,
         ];
         $response = $laResource->cashierPay($wxParams);
         if (isset($response['code']) == false || $response['code'] != '000000') {

+ 4 - 2
common/components/lakala/Lakala.php

@@ -126,12 +126,14 @@ class Lakala
     {
         $orderSn = $params['orderSn'];
         $amount = $params['amount'];
+        $payWay = $params['payWay'] ?? 1;
+        $payMode = $payWay==1?'ALIPAY':'WECHAT';
         $notifyUrl = $params['notifyUrl'];
         $subject = $params['subject'];
         $capitalType = $params['capitalType'];
         $time = time() + 108000;
         $orderEfficientTime = date("YmdHis", $time);
-        $bus = json_encode([['busi_type' => 'SCPAY', 'params' => ['pay_mode' => 'ALIPAY']]]);
+        $bus = json_encode([['busi_type' => 'SCPAY', 'params' => ['pay_mode' => $payMode]]]);
         $arr = [
             'merchant_no' => $this->merchant_no,
             'term_no' => $this->term_no,
@@ -142,7 +144,7 @@ class Lakala
             'notify_url' => $notifyUrl,
             'order_efficient_time' => $orderEfficientTime,
             'busi_type_param' => $bus,
-            'counter_param' => json_encode(['pay_mode' => 'ALIPAY']),
+            'counter_param' => json_encode(['pay_mode' => $payMode]),
             'counter_remark' => '{"capitalType":' . $capitalType . '}'
         ];
         $baseRequestVO = [