|
@@ -73,7 +73,7 @@ class OrdersController extends Controller
|
|
$activity_id = $request->has('activity_id') ? $request->get('activity_id') : 0;
|
|
$activity_id = $request->has('activity_id') ? $request->get('activity_id') : 0;
|
|
$ip = $request->has('ip') ? $request->get('ip') : '';
|
|
$ip = $request->has('ip') ? $request->get('ip') : '';
|
|
$n = $request->has('n') ? $request->get('n') : 0;
|
|
$n = $request->has('n') ? $request->get('n') : 0;
|
|
- $crp = $request->has('crp') ? $request->get('crp') : 0;
|
|
|
|
|
|
+ $crm = $request->has('crm') ? $request->get('crm') : 0;
|
|
|
|
|
|
if ($send_order_id && strlen($send_order_id) > 50) {
|
|
if ($send_order_id && strlen($send_order_id) > 50) {
|
|
try {
|
|
try {
|
|
@@ -168,7 +168,7 @@ class OrdersController extends Controller
|
|
$ip = get_client_ip();
|
|
$ip = get_client_ip();
|
|
}
|
|
}
|
|
|
|
|
|
- $params = compact('uid', 'product_id', 'distribution_channel_id', 'send_order_id', 'bid', 'trade_no', 'pay_redirect_url', 'fromtype', 'activity_id', 'n', 'suid', 'ip', 'p_channel_id','crp');
|
|
|
|
|
|
+ $params = compact('uid', 'product_id', 'distribution_channel_id', 'send_order_id', 'bid', 'trade_no', 'pay_redirect_url', 'fromtype', 'activity_id', 'n', 'suid', 'ip', 'p_channel_id','crm');
|
|
|
|
|
|
$redirect_url = env('CREATE_PAY_URL') . '?' . http_build_query($params);
|
|
$redirect_url = env('CREATE_PAY_URL') . '?' . http_build_query($params);
|
|
//$redirect_url = env('CREATE_PAY_URL').'?uid='.$uid.'&product_id='.$product_id.'&distribution_channel_id='
|
|
//$redirect_url = env('CREATE_PAY_URL').'?uid='.$uid.'&product_id='.$product_id.'&distribution_channel_id='
|
|
@@ -323,9 +323,9 @@ class OrdersController extends Controller
|
|
'order_id'=>$result->id,'gxhp'=>'mw_transfer','appid'=>'','bid'=>$bid,'data_hour_key'=>'','times'=>'','distribution_channel_id'=>$p_channel_id
|
|
'order_id'=>$result->id,'gxhp'=>'mw_transfer','appid'=>'','bid'=>$bid,'data_hour_key'=>'','times'=>'','distribution_channel_id'=>$p_channel_id
|
|
]);
|
|
]);
|
|
}
|
|
}
|
|
- if($crp){
|
|
|
|
|
|
+ if($crm){
|
|
OrderParamService::createByParam([
|
|
OrderParamService::createByParam([
|
|
- 'order_id'=>$result->id,'gxhp'=>'crm','appid'=>'','bid'=>$bid,'data_hour_key'=>$crp,'times'=>'','distribution_channel_id'=>$distribution_channel_id
|
|
|
|
|
|
+ 'order_id'=>$result->id,'gxhp'=>'crm','appid'=>'','bid'=>$bid,'data_hour_key'=>$crm,'times'=>'','distribution_channel_id'=>$distribution_channel_id
|
|
]);
|
|
]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -415,6 +415,7 @@ class OrdersController extends Controller
|
|
$activity_id = $request->get('activity_id', 0);
|
|
$activity_id = $request->get('activity_id', 0);
|
|
$suid = $request->get('suid', 0);
|
|
$suid = $request->get('suid', 0);
|
|
$bid = $request->has('bid') ? $request->get('bid') : 0;
|
|
$bid = $request->has('bid') ? $request->get('bid') : 0;
|
|
|
|
+ $crm = $request->has('crm') ? $request->get('crm') : '';
|
|
$hash_bid = $bid;
|
|
$hash_bid = $bid;
|
|
$fromtype = $request->has('fromtype') ? $request->get('fromtype') : $request->get('from', 'main');
|
|
$fromtype = $request->has('fromtype') ? $request->get('fromtype') : $request->get('from', 'main');
|
|
|
|
|
|
@@ -526,6 +527,11 @@ class OrdersController extends Controller
|
|
if ($result) {
|
|
if ($result) {
|
|
$this->orderCreated($init_order);
|
|
$this->orderCreated($init_order);
|
|
$this->recordOtherParam($result->id, $uid);
|
|
$this->recordOtherParam($result->id, $uid);
|
|
|
|
+ if($crm){
|
|
|
|
+ OrderParamService::createByParam([
|
|
|
|
+ 'order_id'=>$result->id,'gxhp'=>'crm','appid'=>'','bid'=>$bid,'data_hour_key'=>$crm,'times'=>'','distribution_channel_id'=>$distribution_channel_id
|
|
|
|
+ ]);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if ($suid) {
|
|
if ($suid) {
|
|
$this->createSubstituteOrder($result->id, $uid, $suid);
|
|
$this->createSubstituteOrder($result->id, $uid, $suid);
|