From 044a6bf253eeeb34b8e1b5dc8272481ae13bd2f4 Mon Sep 17 00:00:00 2001 From: Kevin Adametz Date: Mon, 4 Mar 2019 17:05:44 +0100 Subject: [PATCH] Payone, Shop, wizard --- .env | 8 +- .idea/workspace.xml | 1024 +++++++++-------- KasController.php | 111 ++ app/Http/Controllers/Api/PayoneController.php | 161 +++ app/Http/Controllers/Pay/PayoneController.php | 43 +- app/Http/Controllers/UserDataController.php | 22 +- app/Http/Controllers/UserShopController.php | 16 +- app/Http/Controllers/Web/CardController.php | 8 +- .../Controllers/Web/CheckoutController.php | 126 +- app/Http/Controllers/Web/SiteController.php | 3 + app/Http/Controllers/WizardController.php | 2 +- app/Models/UserShop.php | 4 + app/Providers/RouteServiceProvider.php | 10 +- app/Services/Yard.php | 75 +- config/app.php | 8 +- config/mail.php | 2 +- config/profanity.php | 4 +- public/.htaccess | 11 + resources/lang/de.json | 4 +- resources/views/home.blade.php | 1 - .../user/components/user_shop_edit.blade.php | 28 +- .../user/components/user_shop_image.blade.php | 2 +- .../components/user_shop_on_site.blade.php | 8 +- .../components/user_shop_register.blade.php | 16 +- resources/views/user/edit.blade.php | 3 +- .../views/web/templates/checkout.blade.php | 14 +- routes/api.php | 15 +- routes/web.php | 81 +- 28 files changed, 996 insertions(+), 814 deletions(-) create mode 100644 KasController.php create mode 100755 app/Http/Controllers/Api/PayoneController.php diff --git a/.env b/.env index 9c7c8eb..9c7ed0a 100644 --- a/.env +++ b/.env @@ -8,8 +8,8 @@ APP_PROTOCOL=http:// APP_URL_MAIN= APP_URL_CHECKOUT=checkout. #APP_URL_MAIN=dev. -APP_URL_CRM=mein. -APP_CHECKOUT_MAIL=k.adametz@kagado.de +APP_URL_CRM=my. +APP_CHECKOUT_MAIL=no-replay@mivita.care LOG_CHANNEL=stack @@ -41,8 +41,8 @@ REDIS_PORT=6379 MAIL_DRIVER=smtp MAIL_HOST=w017f6e4.kasserver.com MAIL_PORT=587 -MAIL_USERNAME=m04804ba -MAIL_PASSWORD=4xyFrgy5y98ZhpAr +MAIL_USERNAME=m04a9fbc +MAIL_PASSWORD=3tQ72oCHZgncCTpK MAIL_ENCRYPTION=null diff --git a/.idea/workspace.xml b/.idea/workspace.xml index e42969f..142f87a 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,52 +2,32 @@ - - - - - - - + + - - + + + + - - - - - - - - - + + + - - - - - - - - - + + + + - - - - - + + + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - count - put - get - setShippingCountry - Util - use Util hidde country_id user_shop @@ -206,6 +150,12 @@ select back_to_shop secu + checkUserShopName + shop_name_description + shop_contact_help + user_shop_name_check + ok + billing_cou @@ -254,23 +204,6 @@ @@ -417,9 +367,9 @@ - @@ -428,7 +378,6 @@ - @@ -454,6 +403,14 @@ + + + + + + + + @@ -477,12 +434,24 @@ + + + + + + + + + + + + @@ -498,31 +467,37 @@ - + - - - - - - - - + + + + + + + + + + + + + + @@ -553,6 +528,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -562,6 +587,7 @@ @@ -59,7 +64,7 @@
-   +  
@@ -111,10 +116,13 @@ dataFilter: function(response) { response = $.parseJSON(response); console.log(response); - - if (response.success === true) return true; + if (response.success === true){ + $('#preview_user_shop_name').val(response.preview_user_shop_name); + return true; + } else { message = response.errors.user_shop_name; + $('#preview_user_shop_name').val(''); return false; } } diff --git a/resources/views/user/edit.blade.php b/resources/views/user/edit.blade.php index e3e50d2..1d4c0a1 100644 --- a/resources/views/user/edit.blade.php +++ b/resources/views/user/edit.blade.php @@ -22,8 +22,7 @@ {!! Form::open(['url' => route('user_edit'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!} - @include('user.form') - + @include('user.user_form')
  {{ __('back') }} diff --git a/resources/views/web/templates/checkout.blade.php b/resources/views/web/templates/checkout.blade.php index 60f328e..ab9420c 100644 --- a/resources/views/web/templates/checkout.blade.php +++ b/resources/views/web/templates/checkout.blade.php @@ -224,7 +224,7 @@ - +
@@ -374,7 +374,7 @@ - + @@ -391,7 +391,15 @@ - zurück zum Warenkorb + @if(isset($order_reference)) + + zurück zum Shop + + @else + + zurück zum Warenkorb + + @endif
diff --git a/routes/api.php b/routes/api.php index c641ca5..ebbc2e5 100755 --- a/routes/api.php +++ b/routes/api.php @@ -13,6 +13,17 @@ use Illuminate\Http\Request; | */ -Route::middleware('auth:api')->get('/user', function (Request $request) { - return $request->user(); +//Route::post('login', 'API\UserController@login'); +//Route::post('register', 'API\UserController@register'); + + + + + +Route::get('/payment/status', 'Api\PayoneController@paymentStatus')->name('api.payment_status'); +Route::post('/payment/status', 'Api\PayoneController@paymentStatus')->name('api.payment_status'); + Route::group(['middleware' => 'auth:api'], function(){ + }); + + diff --git a/routes/web.php b/routes/web.php index 90ad6d7..f759e8c 100755 --- a/routes/web.php +++ b/routes/web.php @@ -51,6 +51,7 @@ Route::get('/shop/product/image/{slug}', function($slug = null) })->name('shop_product_image'); + //main site mivita Route::domain(config('app.pre_url_main').config('app.domain'))->group(function () { @@ -74,7 +75,7 @@ Route::domain(config('app.pre_url_main').config('app.domain'))->group(function ( }); -/* ROUTING FOR CRM mein.mivita / CMS*/ +/* ROUTING FOR CRM my.mivita / CMS*/ Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function () { Auth::routes(); @@ -246,9 +247,6 @@ Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function () Route::domain(config('app.checkout_url').config('app.domain'))->group(function () { - Route::get('/payment/status', 'Web\CheckoutController@paymentStatus')->name('checkout.payment_status'); - Route::post('/payment/status', 'Web\CheckoutController@paymentStatus')->name('checkout.payment_status'); - Route::group(['middleware' => ['checkout']], function() { Route::get('/checkout/card/{identifier?}', 'Web\CheckoutController@checkout')->name('checkout.checkout_card'); @@ -281,80 +279,9 @@ Route::domain('{subdomain}.'.config('app.domain'))->group(function () { Route::get('/card/remove/{rowId}', 'Web\CardController@removeCard')->name('user.card_remove'); Route::get('/card/delete', 'Web\CardController@deleteCard')->name('user.card_delete'); Route::get('/back/to/shop/{reference?}', 'Web\CardController@backToShop')->name('user.back_to_shop'); + Route::get('/domain/check', 'Web\SiteController@domainCheck')->name('user.domain_check'); Route::get('/{site}/{subsite?}/{product_slug?}', 'Web\SiteController@site')->name('user.site'); }); -}); - - - - - - - - -/* - -//Route::get('/', 'HomeController@index')->name('/'); - -/*Route::post('/register/data', 'HomeController@register')->name('register_data'); -Route::post('/user/check/mail', 'HomeController@checkMail')->name('user_check_mail'); - -Route::get('/register/verify/{confirmationCode}', 'HomeController@verify')->name('register_verify'); - -Route::get('/status/register', 'HomeController@statusRegister')->name('status_register'); -Route::get('/status/verify', 'HomeController@statusVerify')->name('status_verify'); -Route::get('/status/error', 'HomeController@statusError')->name('status_error'); - - -Route::get('/user/update_email_confirm/{token}', 'UpdateEmailController@activateMail')->name('user_update_email_confirm'); -*/ - - - - - -/*Route::get('storage/{what}/{path}/{id}/{file_name}', function($what = null, $path = null, $id = null, $file_name = null) -{ - $path = storage_path().'/app/'.$path.'/'.$id.'/images/'.$what.'/'.$file_name; - if (file_exists($path)) { - return Response::file($path); - } -}); - -Route::get('storage/{user_id}/{file_name}', function($user_id = null, $file_name = null) -{ - $path = storage_path().'/'.'app'.'/user/' . $user_id . '/verification/' . $file_name; - if (file_exists($path)) { - return Response::file($path); - } -}); -*/ - -/* -use App\Mail\MailResetPassword; - -Route::get('/send_test_email', function(){ - - try { - // Mail::to('kevin.adametz@me.com')->send(new MailResetPassword('asdasd', Auth::user())); - - Mail::raw('Sending emails with Mailgun and Laravel is easy!', function($message) { - $message->to('kevin.adametz@me.com', 'Kevin Adametz'); - $message->subject('testing Networktrips'); - }); - - - - } catch (\Exception $e) { - dd($e->getMessage()); - } - - $fail = Mail::failures(); - - if(!empty($fail)) throw new \Exception('Could not send message to '.$fail[0]); - - }); - -*/ \ No newline at end of file +}); \ No newline at end of file