WIN-2308041133\Administrator 7 months ago
parent
commit
d18573e60f
1 changed files with 4 additions and 8 deletions
  1. 4 8
      application/api/controller/Pay.php

+ 4 - 8
application/api/controller/Pay.php

@@ -44,7 +44,6 @@ class Pay extends Api
         } else {
             $number = date('ymdh', time()) . rand(10000, 99999);//订单编号
             if (!input('price')) {
-                var_dump(1124);die();
                 $this->error(__('金额不对'));
             }
             $datapost = input('param.');//订单数据
@@ -78,7 +77,6 @@ class Pay extends Api
         $site = config('site');
         $amount = $data['zprice'];
         if (!$amount) {
-            var_dump(5514);die();
             $this->error(__('金额不对'));
         }
         // 异步通知地址
@@ -673,8 +671,7 @@ class Pay extends Api
 //            $this->error(__('金额不对'));
 //        }
 //        $price = input('price');
-        $price =  Db::name('videolist')->where('id', input('vid'))->value('sharesprice');
-        var_dump($price);die();
+        $price =  Db::name('videolist')->where('id', input('vid'))->value('sharesprice');;
 //        $pricebuy = input('pricebuy');
 //            if(input('lx')==2){
 //                $price=input('priced');
@@ -708,8 +705,6 @@ class Pay extends Api
 
         $site = config('site');
         $amount = $price;
-        var_dump(646846);
-        var_dump($amount);die();
 //        $amount = $data['zprice'];
 //        if (!$amount) {
 //            $this->error(__('金额不对'));
@@ -865,7 +860,7 @@ class Pay extends Api
     public function shareyuepay($money, $user_id, $id)//版权余额支付
     {
         $user = $this->Usermodel::get($user_id);
-        if ($user && $money != 0) {
+        if ($user) {
             $data = Db::name('video_share')->where('id', $id)->find();
             if ($user->money < $money) {
                 $this->error(__('余额不足'));
@@ -915,7 +910,8 @@ class Pay extends Api
             }
 
         } else {
-            $this->error(__('金额不对'));
+            $this->error(__('用户不存在'));
+
         }
     }