Browse Source

开通微信支付,支持手动输入金额

lizhen_gitee 2 years ago
parent
commit
53aa5ee5d2
1 changed files with 4 additions and 3 deletions
  1. 4 3
      application/index/controller/Recharge.php

+ 4 - 3
application/index/controller/Recharge.php

@@ -28,9 +28,9 @@ class Recharge extends Frontend
         $rc_id = input('rc_id',0);
         $pay_type  = input('pay_type','alipay');
         $mobile = input('mobile',0);
-        $money = floatval(input('money',0));
+        $inputmoney = floatval(input('money',0));
 
-        if(!$rc_id && !$money){
+        if(!$rc_id && !$inputmoney){
             $this->error('请选择或手动填写充值金额');
         }
 
@@ -53,9 +53,10 @@ class Recharge extends Frontend
             $money = $recharge_config['money'];
             $gold = $recharge_config['gold'];
         }else{
+            $money = $inputmoney;
             if($money<=0)
             {
-                $this->error('支付金额必须大于0');
+                $this->error('输入金额必须大于0');
             }
             if($money > 1000){
                 $this->error('输入金额最高1000');