Membership
This commit is contained in:
parent
37cb2b06c7
commit
21abafb8db
51 changed files with 1549 additions and 493 deletions
|
|
@ -120,11 +120,18 @@ class PayoneController extends Controller
|
|||
$shopping_payment->save();
|
||||
|
||||
$send_link = false;
|
||||
if($data['txaction'] === 'failed'){
|
||||
|
||||
|
||||
if($data['txaction'] === 'failed'){
|
||||
$shopping_order->setUserHistoryValue(['status' => 6]);
|
||||
|
||||
}
|
||||
if($data['txaction'] === 'appointed'){
|
||||
$shopping_order->setUserHistoryValue(['status' => 7]);
|
||||
}
|
||||
|
||||
if($data['txaction'] === 'paid'){
|
||||
$shopping_order->setUserHistoryValue(['status' => 8]);
|
||||
$shopping_order->paid = true;
|
||||
$shopping_order->save();
|
||||
|
||||
|
|
@ -135,18 +142,31 @@ class PayoneController extends Controller
|
|||
if($shopping_order_item->product->action){
|
||||
|
||||
$user = User::findOrFail($shopping_order->auth_user_id);
|
||||
$user->payment_order_id = $shopping_order_item->product->id;
|
||||
$user->save();
|
||||
$send_link = true;
|
||||
$date = date("Y-m-d H:i:s", strtotime("+1 years"));
|
||||
foreach ($shopping_order_item->product->action as $do){
|
||||
if($shopping_order_item->product->getActionName($do) === 'payment_for_account'){
|
||||
$user->payment_order_id = $shopping_order_item->product->id; //34
|
||||
$user->payment_account = $date;
|
||||
$user->wizard = 100;
|
||||
$shopping_order->setUserHistoryValue(['status' => 9]);
|
||||
|
||||
}
|
||||
if($shopping_order_item->product->getActionName($do) === 'payment_for_shop'){
|
||||
$user->payment_order_id = $shopping_order_item->product->id; //35
|
||||
$user->payment_shop = $date;
|
||||
$user->wizard = 100;
|
||||
$shopping_order->setUserHistoryValue(['status' => 9]);
|
||||
|
||||
}
|
||||
if($shopping_order_item->product->getActionName($do) === 'payment_for_shop_upgrade'){
|
||||
if($shopping_order_item->product->upgrade_to_id){
|
||||
$user->payment_order_id = $shopping_order_item->product->upgrade_to_id;
|
||||
}
|
||||
$user->payment_shop = $user->payment_account; //same Date, is upgrade
|
||||
$shopping_order->setUserHistoryValue(['status' => 9]);
|
||||
|
||||
}
|
||||
$user->save();
|
||||
}
|
||||
|
|
@ -156,10 +176,6 @@ class PayoneController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
if($data['txaction'] === 'appointed'){
|
||||
|
||||
}
|
||||
|
||||
$billing_email = $shopping_order->shopping_user->billing_email;
|
||||
$user_shop_email = $shopping_order->user_shop->user->email;
|
||||
if(!$billing_email){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue