Kundenhoheit
This commit is contained in:
parent
d8b5206031
commit
dc63fa9fb2
52 changed files with 2436 additions and 557 deletions
|
|
@ -8,6 +8,7 @@ use App\Mail\MailCheckout;
|
|||
use App\Models\PaymentTransaction;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Models\ShoppingPayment;
|
||||
use App\Services\Shop;
|
||||
use App\Services\Util;
|
||||
use App\User;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
|
@ -129,10 +130,12 @@ class PayoneController extends Controller
|
|||
}
|
||||
if($data['txaction'] === 'appointed'){
|
||||
$shopping_order->setUserHistoryValue(['status' => 7]);
|
||||
Shop::userOrders();
|
||||
}
|
||||
|
||||
if($data['txaction'] === 'paid'){
|
||||
$shopping_order->setUserHistoryValue(['status' => 8]);
|
||||
Shop::userOrders();
|
||||
$shopping_order->paid = true;
|
||||
$shopping_order->save();
|
||||
|
||||
|
|
@ -150,7 +153,6 @@ class PayoneController extends Controller
|
|||
if($user->payment_account && $user->daysActiveAccount()>0){
|
||||
$date = \Carbon::parse($user->payment_account)->modify('1 year');
|
||||
}
|
||||
|
||||
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
|
||||
|
|
@ -183,9 +185,8 @@ class PayoneController extends Controller
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
$bcc = [];
|
||||
$billing_email = $shopping_order->shopping_user->billing_email;
|
||||
$user_shop_email = $shopping_order->user_shop->user->email;
|
||||
if(!$billing_email){
|
||||
if($data['mode'] === 'test'){
|
||||
$billing_email = config('app.checkout_test_mail');
|
||||
|
|
@ -194,17 +195,15 @@ class PayoneController extends Controller
|
|||
}
|
||||
}
|
||||
if($data['mode'] === 'test'){
|
||||
$checkout_mail = config('app.checkout_test_mail');
|
||||
$bcc[] = config('app.checkout_test_mail');
|
||||
}else{
|
||||
$checkout_mail = config('app.checkout_mail');
|
||||
$bcc[] = config('app.checkout_mail');
|
||||
}
|
||||
|
||||
if($user_shop_email){
|
||||
Mail::to($billing_email)->bcc([$user_shop_email, $checkout_mail])->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment, $send_link, $data['mode']));
|
||||
}else{
|
||||
Mail::to($billing_email)->bcc($checkout_mail)->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment, $send_link, $data['mode']));
|
||||
if(!$shopping_order->shopping_user->is_like && $shopping_order->shopping_user->member){
|
||||
$bcc[] = $shopping_order->shopping_user->member->email;
|
||||
}
|
||||
|
||||
Mail::to($billing_email)->bcc($bcc)->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment, $send_link, $data['mode']));
|
||||
print("TSOK");
|
||||
exit;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue