This commit is contained in:
Kevin Adametz 2019-02-22 18:41:06 +01:00
parent 1953c97cd0
commit d1dae9b736
9 changed files with 687 additions and 242 deletions

View file

@ -4,6 +4,7 @@ namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller;
use App\Http\Controllers\Pay\PayoneController;
use App\Models\Product;
use Validator;
use App\Services\Util;
@ -27,8 +28,6 @@ class CheckoutController extends Controller
$user_shop = Util::getUserShop();
if(Input::get('selected_country')){
Yard::instance('shopping')->setShippingCountryWithPrice(Input::get('selected_country'));
}else{
@ -43,7 +42,7 @@ class CheckoutController extends Controller
public function checkoutFinal(){
$rules = array(
/*$rules = array(
'billing.firstname'=>'required',
'billing.lastname'=>'required',
'billing.email'=>'required|email',
@ -65,8 +64,16 @@ class CheckoutController extends Controller
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
return back()->withErrors($validator)->withErrors($validator)->withInput(Input::all());
}*/
if(Input::get('payment_method')){
$pay = new PayoneController(Input::get('payment_method'));
$pay->setPrePayment([]);
$pay->setPersonalData([]);
$pay->ResponseData([]);
}
$data = [
'user_shop' => Util::getUserShop(),
];
@ -74,6 +81,20 @@ class CheckoutController extends Controller
}
public function transactionStatus($check){
if($check == "cancel"){
\Session::flash('checkout-error', 'Der Zahlungsvorgang wurde abgebrochen, die Bestellung konnte nicht ausgeführt werden.');
return $this->checkout();
}
$pay = new PayoneController([]);
$pay->checkStatus();
$data = \Request::all();
var_dump($data);
$data = \Input::all();
var_dump($data);
die();
}
public function removeCard($rowId){
Yard::instance('shopping')->remove($rowId);