feat: ✨ Moved Stripe routes to extension
This commit is contained in:
parent
8516523efa
commit
e6ef07139d
22
app/Extensions/PaymentGateways/Stripe/routes.php
Normal file
22
app/Extensions/PaymentGateways/Stripe/routes.php
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
include_once(__DIR__ . '/index.php');
|
||||||
|
|
||||||
|
Route::get('payment/StripePay/{shopProduct}', function () {
|
||||||
|
StripePay(request());
|
||||||
|
})->name('payment.StripePay');
|
||||||
|
|
||||||
|
Route::get(
|
||||||
|
'payment/StripeSuccess',
|
||||||
|
function () {
|
||||||
|
StripeSuccess(request());
|
||||||
|
}
|
||||||
|
)->name('payment.StripeSuccess');
|
||||||
|
|
||||||
|
|
||||||
|
// Stripe WebhookRoute -> validation in Route Handler
|
||||||
|
Route::post('payment/StripeWebhooks', function () {
|
||||||
|
StripeWebhooks(request());
|
||||||
|
})->name('payment.StripeWebhooks');
|
|
@ -49,17 +49,14 @@ Route::middleware('guest')->get('/', function () {
|
||||||
|
|
||||||
Auth::routes(['verify' => true]);
|
Auth::routes(['verify' => true]);
|
||||||
|
|
||||||
// Stripe WebhookRoute -> validation in Route Handler
|
|
||||||
Route::post('payment/StripeWebhooks', [PaymentController::class, 'StripeWebhooks'])->name('payment.StripeWebhooks');
|
|
||||||
|
|
||||||
Route::get('/privacy', function () {
|
Route::get('/privacy', function () {
|
||||||
return view('information.privacy');
|
return view('information.privacy');
|
||||||
})->name('privacy');
|
})->name('privacy');
|
||||||
Route::get('/imprint', function () {
|
Route::get('/imprint', function () {
|
||||||
return view('information.imprint');
|
return view('information.imprint');
|
||||||
})->name('imprint');
|
})->name('imprint');
|
||||||
Route::get('/tos', function () {
|
Route::get('/tos', function () {
|
||||||
return view('information.tos');
|
return view('information.tos');
|
||||||
})->name('tos');
|
})->name('tos');
|
||||||
|
|
||||||
Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
||||||
|
@ -91,8 +88,6 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
||||||
//payments
|
//payments
|
||||||
Route::get('checkout/{shopProduct}', [PaymentController::class, 'checkOut'])->name('checkout');
|
Route::get('checkout/{shopProduct}', [PaymentController::class, 'checkOut'])->name('checkout');
|
||||||
Route::post('payment/pay', [PaymentController::class, 'pay'])->name('payment.pay');
|
Route::post('payment/pay', [PaymentController::class, 'pay'])->name('payment.pay');
|
||||||
Route::get('payment/StripePay/{shopProduct}', [PaymentController::class, 'StripePay'])->name('payment.StripePay');
|
|
||||||
Route::get('payment/StripeSuccess', [PaymentController::class, 'StripeSuccess'])->name('payment.StripeSuccess');
|
|
||||||
Route::get('payment/FreePay/{shopProduct}', [PaymentController::class, 'FreePay'])->name('payment.FreePay');
|
Route::get('payment/FreePay/{shopProduct}', [PaymentController::class, 'FreePay'])->name('payment.FreePay');
|
||||||
Route::get('payment/Cancel', [PaymentController::class, 'Cancel'])->name('payment.Cancel');
|
Route::get('payment/Cancel', [PaymentController::class, 'Cancel'])->name('payment.Cancel');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue