testemich Promotion
This commit is contained in:
parent
38e7fd504a
commit
a0f4eda6ea
83 changed files with 1690 additions and 504 deletions
|
|
@ -31,9 +31,20 @@ class PromotionController extends Controller
|
|||
public function serve($path = null)
|
||||
{
|
||||
if(!isset($path)){
|
||||
abort(402);
|
||||
$path = 'grueneseele';
|
||||
//abort(402);
|
||||
|
||||
}
|
||||
|
||||
if($path === 'impressum'){
|
||||
return view('web.promotion.impressum');
|
||||
}
|
||||
if($path === 'datenschutzerklaerung'){
|
||||
return view('web.promotion.datenschutzerklaerung');
|
||||
}
|
||||
if($path === 'widerrufsbelehrung'){
|
||||
return view('web.promotion.widerrufsbelehrung');
|
||||
}
|
||||
|
||||
//search for promo
|
||||
$PromotionUser = PromotionUser::where('url', trim($path))->whereNull('user_deleted_at')->first();
|
||||
if(!$PromotionUser){
|
||||
|
|
@ -137,14 +148,9 @@ class PromotionController extends Controller
|
|||
|
||||
UserHistory::create(['user_id' => $PromotionUser->user_id, 'action'=>'web_promotion_payment', 'status'=>1, 'product_id'=>null, 'identifier'=>$identifier]);
|
||||
$checkRepo = new CheckoutRepository();
|
||||
$checkRepo->setPromotion(4, $PromotionUser);
|
||||
$checkRepo->setPromotion(7, $PromotionUser);
|
||||
$checkRepo->init($identifier, $data);
|
||||
return $checkRepo->makePayment();
|
||||
|
||||
//$path = str_replace('http', 'https', $path);
|
||||
//return redirect()->secure($path);
|
||||
// return redirect(route('user_checkout', [$identifier]));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -168,18 +174,23 @@ class PromotionController extends Controller
|
|||
$shopping_payment->txaction = 'open';
|
||||
$shopping_order->txaction = 'open';
|
||||
$payt->txaction = "open";
|
||||
$shopping_order->save();
|
||||
|
||||
}
|
||||
if($payt->status === 'pp'){
|
||||
$send_link = Payment::paymentStatusPaidAction($shopping_order, true);
|
||||
$shopping_payment->txaction = 'paid';
|
||||
$shopping_order->txaction = 'paid';
|
||||
$payt->txaction = "paid";
|
||||
$shopping_order->save();
|
||||
}
|
||||
if($payt->status === 'fnc'){
|
||||
$send_link = Payment::paymentStatusPaidAction($shopping_order, true);
|
||||
$shopping_payment->txaction = 'open';
|
||||
$shopping_order->txaction = 'open';
|
||||
$payt->txaction = "open";
|
||||
$shopping_payment->txaction = 'paid';
|
||||
$shopping_order->txaction = 'paid';
|
||||
$payt->txaction = "paid";
|
||||
$shopping_order->save();
|
||||
|
||||
}
|
||||
if($payt->status === 'non'){
|
||||
$send_link = Payment::paymentStatusPaidAction($shopping_order, true);
|
||||
|
|
@ -248,7 +259,7 @@ class PromotionController extends Controller
|
|||
$invoice = view("web.promotion._invoice_details")->render();
|
||||
}
|
||||
$checkout = view("web.promotion._checkout")->render();
|
||||
$data['shipping_price_formated'] = Yard::instance('shopping')->shipping();
|
||||
$data['shipping_price_formated'] = PromotionCart::getCurrentShippingPrice();
|
||||
|
||||
return response()->json(['response' => $data, 'cart'=>$cart, 'invoice'=>$invoice, 'checkout'=>$checkout, 'status'=>$status]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue