|
@@ -118,16 +118,21 @@ class MonthOrderController extends Controller
|
|
|
$trade_no = $request->post('trade_no');
|
|
|
$out_trade_no = $request->post('out_trade_no');
|
|
|
$result_code = $request->post('result_code',0);
|
|
|
- $this->recordOrderCallBack($request,'MONTH');
|
|
|
- if(!$result_code) return response('success');
|
|
|
$type = 'MONTH';
|
|
|
+ $product_id = 6826;
|
|
|
if($plan_id == env('MONTH_ORDER_PLAN_ID')){
|
|
|
$type = 'MONTH';
|
|
|
+ $product_id = 6826;
|
|
|
}
|
|
|
|
|
|
if($plan_id == env('MONTH_WEEK_ORDER_PLAN_ID')){
|
|
|
$type = 'WEEK';
|
|
|
+ $product_id =7394;
|
|
|
}
|
|
|
+
|
|
|
+ $this->recordOrderCallBack($request,$type);
|
|
|
+ if(!$result_code) return response('success');
|
|
|
+
|
|
|
if ($check = checkParam($request->except('_url'), ['app_id', 'user_id', 'total_fee', 'trade_no', 'out_trade_no'])) {
|
|
|
return response()->error('PARAM_EMPTY', ['msg' => $check]);
|
|
|
}
|
|
@@ -136,7 +141,7 @@ class MonthOrderController extends Controller
|
|
|
//if($sign == $request->post('sign')){
|
|
|
if (!UserMonthService::getOrderByOrder($trade_no, $out_trade_no)) {
|
|
|
UserMonthService::createLOrder($user_id, $plan_id, $total_fee, $trade_no, $out_trade_no,$type);
|
|
|
- $this->addOrderAndVip($user_id, $out_trade_no, $trade_no, $total_fee,6826,$type);
|
|
|
+ $this->addOrderAndVip($user_id, $out_trade_no, $trade_no, $total_fee,$product_id,$type);
|
|
|
$this->successPayPushMsg($user_id,$type);
|
|
|
$this->userProperty($user_id);
|
|
|
}
|
|
@@ -208,7 +213,7 @@ class MonthOrderController extends Controller
|
|
|
'send_order_name' => $send_order_name,
|
|
|
'order_type' => 'RECHARGE',
|
|
|
'from_bid' => $from_bid,
|
|
|
- 'from_type' => 'auto_month',
|
|
|
+ 'from_type' => 'auto_'.strtolower($type),
|
|
|
'activity_id' => 0,
|
|
|
'inner_send_order_id' => '',
|
|
|
'status' => 'PAID',
|
|
@@ -282,7 +287,7 @@ class MonthOrderController extends Controller
|
|
|
$content_format = "包月购买成功通知:\r\n购买类型: 30元包月\r\n><a href='%s'>点击继续上次阅读</a>\r\n包月特权:\r\n 💝 全站所有作品免费阅读\r\n 💝 全站无广告\r\n 💝 阅读管家1对1服务\r\n为保障包月权益,请<a href='%s'>置顶公众号</a> ";
|
|
|
}
|
|
|
if($type == 'WEEK'){
|
|
|
- $content_format = "包周购买成功通知:\r\n购买类型: 30元包月\r\n><a href='%s'>点击继续上次阅读</a>\r\n包月特权:\r\n 💝 全站所有作品免费阅读\r\n 💝 全站无广告\r\n 💝 阅读管家1对1服务\r\n为保障包周权益,请<a href='%s'>置顶公众号</a> ";
|
|
|
+ $content_format = "包周购买成功通知:\r\n购买类型: 7元包月\r\n><a href='%s'>点击继续上次阅读</a>\r\n包月特权:\r\n 💝 全站所有作品免费阅读\r\n 💝 全站无广告\r\n 💝 阅读管家1对1服务\r\n为保障包周权益,请<a href='%s'>置顶公众号</a> ";
|
|
|
}
|
|
|
|
|
|
$delay = 0;
|