1. Go to this page and download the library: Download elegantly/laravel-stripe 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/ */
elegantly / laravel-stripe example snippets
use Elegantly\Stripe\Commands\CreateStripeWebhooksCommand;
use Elegantly\Stripe\ModelRepository;
return [
'models' => [
'accounts' => [
\App\Models\User::class,
],
'customers' => [
\App\Models\User::class,
],
'repository' => ModelRepository::class,
],
'cache' => [
'accounts' => true,
'customers' => false,
],
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
'version' => env('STRIPE_VERSION', '2024-04-10'),
/**
* This is only used for the CreateStripeWebhooksCommand
* You can add more webhooks directly from your Stripe Dashboard
*/
'webhooks' => [
[
'url' => '/webhooks/stripe',
'connect' => false,
'enabled_events' => [
...CreateStripeWebhooksCommand::DEFAULT_WEBHOOKS_EVENTS,
],
],
],
];