PHP code example of ivalin-venkov / stripe-watcher
1. Go to this page and download the library: Download ivalin-venkov/stripe-watcher library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ivalin-venkov / stripe-watcher example snippets
'enabled' => true,
use Illuminate\Support\Facades\Gate;
Gate::define('viewStripeWatcher', function (User $user): bool {
return $user->is_admin;
});
use StripeWatcher\StripeWatcher\Http\Middleware\CaptureWebhook;
Route::post('/stripe/webhook', WebhookController::class)
->middleware(CaptureWebhook::class);