yoco updated to use webhook

This commit is contained in:
twotalesanimation
2025-12-29 14:43:24 +02:00
parent 6de01c13c5
commit 00b8ff77b2
123 changed files with 6959 additions and 12669 deletions
+7
View File
@@ -0,0 +1,7 @@
<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\OrderController;
Route::post('/webhook', [OrderController::class, 'yocoWebhook'])->name('yoco-webhook');
+21 -1
View File
@@ -8,6 +8,7 @@ use App\Http\Controllers\FabricsController;
use App\Http\Controllers\ProductController;
use App\Http\Controllers\CartController;
use App\Http\Controllers\OrderController;
use App\Http\Controllers\Auth\GoogleAuthController;
Route::get('/', [HomeController::class, 'index'])->name('home');
Route::get('/wallpapers', [WallpapersController::class, 'index'])->name('wallpapers');
@@ -17,6 +18,12 @@ Route::get('/fabrics', [FabricsController::class, 'index'])->name('fabrics');
// Product routes
Route::get('/products/{product}', [ProductController::class, 'show'])->name('product-detail');
// Authentication routes
Route::get('/login', function () { return view('auth.login'); })->name('auth.login');
Route::get('/auth/google', [GoogleAuthController::class, 'redirect'])->name('auth.google');
Route::get('/auth/google/callback', [GoogleAuthController::class, 'callback'])->name('auth.google.callback');
Route::post('/logout', [GoogleAuthController::class, 'logout'])->name('logout');
// Cart routes
Route::get('/cart', [CartController::class, 'index'])->name('cart');
Route::post('/cart/add/{product}', [CartController::class, 'add'])->name('cart-add');
@@ -35,4 +42,17 @@ Route::get('/payment/yoco/{order:uuid}', [OrderController::class, 'yocoPayment']
Route::get('/payment/yoco/success/{order:uuid}', [OrderController::class, 'yocoSuccess'])->name('yoco-success');
Route::get('/payment/yoco/cancel/{order:uuid}', [OrderController::class, 'yocoCancel'])->name('yoco-cancel');
Route::get('/payment/yoco/failure/{order:uuid}', [OrderController::class, 'yocoFailure'])->name('yoco-failure');
Route::post('/webhooks/yoco', [OrderController::class, 'yocoWebhook'])->name('yoco-webhook');
// Protected routes - authenticated users only
Route::middleware('auth')->group(function () {
Route::get('/my-account', 'App\Http\Controllers\AccountController@show')->name('my-account');
Route::post('/my-account', 'App\Http\Controllers\AccountController@update')->name('my-account.update');
Route::get('/my-orders', 'App\Http\Controllers\AccountController@orders')->name('my-orders');
Route::get('/my-orders/{order:uuid}', 'App\Http\Controllers\AccountController@orderDetail')->name('my-orders.detail');
Route::get('/custom-orders/create', 'App\Http\Controllers\CustomOrderController@create')->name('custom-orders.create');
Route::post('/custom-orders', 'App\Http\Controllers\CustomOrderController@store')->name('custom-orders.store');
Route::get('/custom-orders/{customOrder:uuid}', 'App\Http\Controllers\CustomOrderController@show')->name('custom-orders.show');
Route::post('/payment/yoco/custom/deposit', 'App\Http\Controllers\CustomOrderController@depositPayment')->name('yoco-custom-deposit');
Route::get('/payment/yoco/custom/deposit/success/{customOrder:uuid}', 'App\Http\Controllers\CustomOrderController@depositSuccess')->name('yoco-custom-deposit-success');
});