Browse Source

pay recharge

Charlie 8 years ago
parent
commit
19fc17b941

+ 2 - 2
www/protected/modules/common/controllers/ConfirmController.php

@@ -8,10 +8,10 @@ class ConfirmController extends CController{
 
             //TODO update database
 
-            if(strpos($input_data['order_no'], 'char_') !== false  ){    //充值卡订单
+            if(strpos($input_data['order_no'], 'char') !== false  ){    //充值卡订单
                 // 支付成功后 用户余额/代金券  增加   暂时充值卡发放的代金券没有过期时间
 
-                $order = RechargeOrder::get(new MongoId(str_replace("char_","",$input_data['order_no'])));
+                $order = RechargeOrder::get(new MongoId(str_replace("char","",$input_data['order_no'])));
 
                 $recharge = Recharge::get(new MongoId($order->recharge));
 

+ 1 - 1
www/protected/modules/o2o/controllers/RechargeController.php

@@ -25,7 +25,7 @@ class  RechargeController extends O2oBaseController{
 
         $str = '壹管家充值卡';
         $amount = ceil($order->price*1000)/10;
-        $result = Service::factory('PayService')->Pay($pay_channel,$amount,'char_'.(string)$order->_id,$str,$str,$user_obj->wx_pub_openid);
+        $result = Service::factory('PayService')->Pay($pay_channel,$amount,'char'.(string)$order->_id,$str,$str,$user_obj->wx_pub_openid);
         if($result === false){
             CommonFn::requestAjax(false,'支付遇到点问题了,请稍候再试');
         }else{