2023-01-15 00:40:25 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Route;
|
2023-03-22 15:05:09 +00:00
|
|
|
use App\Extensions\PaymentGateways\Stripe\StripeExtension;
|
2023-01-15 00:40:25 +00:00
|
|
|
|
2023-01-17 14:35:53 +00:00
|
|
|
Route::middleware(['web', 'auth'])->group(function () {
|
2023-05-19 14:01:10 +00:00
|
|
|
Route::get('payment/StripePay/{shopProduct}', function (StripeExtension $stripeExtension) {
|
|
|
|
$stripeExtension->StripePay(request());
|
2023-01-17 14:35:53 +00:00
|
|
|
})->name('payment.StripePay');
|
2023-01-15 00:40:25 +00:00
|
|
|
|
2023-01-17 14:35:53 +00:00
|
|
|
Route::get(
|
|
|
|
'payment/StripeSuccess',
|
|
|
|
function () {
|
2023-03-22 15:05:09 +00:00
|
|
|
StripeExtension::StripeSuccess(request());
|
2023-01-17 14:35:53 +00:00
|
|
|
}
|
|
|
|
)->name('payment.StripeSuccess');
|
|
|
|
});
|
2023-01-15 00:40:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Stripe WebhookRoute -> validation in Route Handler
|
|
|
|
Route::post('payment/StripeWebhooks', function () {
|
2023-03-22 15:05:09 +00:00
|
|
|
StripeExtension::StripeWebhooks(request());
|
2023-01-15 00:40:25 +00:00
|
|
|
})->name('payment.StripeWebhooks');
|