one_after 1 mese fa
parent
commit
d675c36125
2 ha cambiato i file con 46 aggiunte e 46 eliminazioni
  1. 43 43
      app/business/GoodsBusiness.php
  2. 3 3
      app/business/WithdrawBusiness.php

+ 43 - 43
app/business/GoodsBusiness.php

@@ -21,53 +21,53 @@ class GoodsBusiness
 
             $payorder = Db::table('wa_payorder')->where('id', $payorderId)->first();
 
-//          if ($payorder->pay_type == 2) {
-//                $data = PayTwoBusiness::payment($payorder->order_no, $payorder->pay_characteristic, $payorder->money, Arr::get($param, 'url', ''));
-//                Log::channel('payment')->info('桥头', $data);
-//                if (Arr::get($data, 'data.retCode') != 'SUCCESS') {
-//                    throw new \Exception('通道未开通!');
-//                }
-//                $arr = [
-//                    'type'       => 2,
-//                    'url'        => Arr::get($data, 'data.payParams.payUrl'),
-//                    'payOrderId' => ''
-//                ];
-//            }elseif ($payorder->pay_type == 3) {
-//                $data = PayThreeBusiness::payment($payorder->order_no, $payorder->pay_characteristic, $payorder->money, Arr::get($param, 'url', ''));
-//                Log::channel('payment')->info('林北', $data);
-//                if (Arr::get($data, 'data.code') != 1000) {
-//                    throw new \Exception('通道未开通!');
-//                }
-//                $arr = [
-//                    'type'       => 2,
-//                    'url'        => Arr::get($data, 'data.data.message.url'),
-//                    'payOrderId' => ''
-//                ];
-//            }elseif ($payorder->pay_type == 5) {
-//                $data = PayFiveBusiness::payment($payorder->order_no, $payorder->pay_characteristic, $payorder->money, Arr::get($param, 'url', ''));
-//                Log::channel('payment')->info('鸿运', $data);
-//                if (Arr::get($data, 'data.retCode') != 'SUCCESS') {
-//                    throw new \Exception('通道未开通!');
-//                }
-//                $arr = [
-//                    'type'       => 2,
-//                    'url'        => Arr::get($data, 'data.payParams.payUrl'),
-//                    'payOrderId' => ''
-//                ];
-//            } else {
-//                $arr = [
-//                    'type'       => 1,
-//                    'url'        => '',
-//                    'payOrderId' => ''
-//                ];
-//            }
-
+          if ($payorder->pay_type == 2) {
+                $data = PayTwoBusiness::payment($payorder->order_no, $payorder->pay_characteristic, $payorder->money, Arr::get($param, 'url', ''));
+                Log::channel('payment')->info('桥头', $data);
+                if (Arr::get($data, 'data.retCode') != 'SUCCESS') {
+                    throw new \Exception('通道未开通!');
+                }
                 $arr = [
                     'type'       => 2,
-                    'url'        => Arr::get($param, 'url', ''),
+                    'url'        => Arr::get($data, 'data.payParams.payUrl'),
                     'payOrderId' => ''
                 ];
-                PayorderBusiness::payorderSave(collect($payorder)->toArray());
+            }elseif ($payorder->pay_type == 3) {
+                $data = PayThreeBusiness::payment($payorder->order_no, $payorder->pay_characteristic, $payorder->money, Arr::get($param, 'url', ''));
+                Log::channel('payment')->info('林北', $data);
+                if (Arr::get($data, 'data.code') != 1000) {
+                    throw new \Exception('通道未开通!');
+                }
+                $arr = [
+                    'type'       => 2,
+                    'url'        => Arr::get($data, 'data.data.message.url'),
+                    'payOrderId' => ''
+                ];
+            }elseif ($payorder->pay_type == 5) {
+                $data = PayFiveBusiness::payment($payorder->order_no, $payorder->pay_characteristic, $payorder->money, Arr::get($param, 'url', ''));
+                Log::channel('payment')->info('鸿运', $data);
+                if (Arr::get($data, 'data.retCode') != 'SUCCESS') {
+                    throw new \Exception('通道未开通!');
+                }
+                $arr = [
+                    'type'       => 2,
+                    'url'        => Arr::get($data, 'data.payParams.payUrl'),
+                    'payOrderId' => ''
+                ];
+            } else {
+                $arr = [
+                    'type'       => 1,
+                    'url'        => '',
+                    'payOrderId' => ''
+                ];
+            }
+
+//                $arr = [
+//                    'type'       => 2,
+//                    'url'        => Arr::get($param, 'url', ''),
+//                    'payOrderId' => ''
+//                ];
+//                PayorderBusiness::payorderSave(collect($payorder)->toArray());
 
         } catch (\Throwable $exception) {
             throw new \Exception($exception->getMessage());

+ 3 - 3
app/business/WithdrawBusiness.php

@@ -107,9 +107,9 @@ class WithdrawBusiness
                     throw new \Exception('最小提现金额:10元');
                 }
             }elseif ($param['mold'] == 23) {
-                if($param['user_data']['new_is_num']<3){
-                    throw new \Exception('邀请三人即可提现');
-                }
+//                if($param['user_data']['new_is_num']<3){
+//                    throw new \Exception('邀请三人即可提现');
+//                }
                 if (10 > $param['money']) {
                     throw new \Exception('最小提现金额:10元');
                 }