zhoulj 6 years ago
parent
commit
c8b130a136
1 changed files with 14 additions and 11 deletions
  1. 14 11
      app/Http/Controllers/Wap/Pay/OrdersController.php

+ 14 - 11
app/Http/Controllers/Wap/Pay/OrdersController.php

@@ -137,17 +137,7 @@ class OrdersController extends Controller
         $pay_merchant = DB::table('pay_merchants')->select('id','appid', 'source', 'config_info')->where('id', $channel->pay_merchant_id)->where('is_enabled', 1)->first();
         if (!$pay_merchant || !$pay_merchant->appid || !$pay_merchant->source) return response()->error('WAP_PARAM_ERROR');
         if($pay_merchant->source == 'PALMPAYV2'){
-        	\Log::info('FUCK_PALMPAYV2');
-        	// 注册动作-》创建订单
-        	$action_type = 'CreateOrder';
-        	$param = [
-	        	'openid' => isset($openid)?$openid:'0',
-	        	'uid' =>isset($uid)?$uid:'0',
-	        	'order_sn' => isset($trade_no)?$trade_no:'0',
-	        	'amount' => isset($price)?$price:'0',
-        	];
-        	UserService::PushUserActionToQueue($action_type,$distribution_channel_id,$param);
-        	
+
             return redirect()->to($this->paympay($request,$pay_merchant));
         }
         //重定向 获取用户信息的次数
@@ -542,6 +532,19 @@ class OrdersController extends Controller
         \Log::info('$wechatPay ok-------------------');
         $pay_info = $wechatPay->send($data);
         \Log::info('send ok-------------------');
+        
+        // 注册动作-》创建订单
+        $action_type = 'CreateOrder';
+        $param = [
+	        'openid' => isset($openid)?$openid:'0',
+	        'uid' =>isset($uid)?$uid:'0',
+	        'order_sn' => isset($trade_no)?$trade_no:'0',
+	        'amount' => isset($price)?$price:'0',
+        ];
+        \Log::info('FUCK_PALMPAYV2');
+        UserService::PushUserActionToQueue($action_type,$distribution_channel_id,$param);
+         
+        
         return $pay_info;
     }