avoutic / web-framework-stripe
Stripe module for web-framework
Installs: 136
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/avoutic/web-framework-stripe
Requires
- avoutic/web-framework: ^8.0 || ^9.0 || ^10.0 || ^11.0
- guzzlehttp/guzzle: ^7.9
- stripe/stripe-php: ^7.128
Requires (Dev)
- phpstan/phpstan: ^2.0
README
This module provides Stripe integration for WebFramework, offering a clean interface to interact with Stripe's API for handling payments, subscriptions, and webhooks.
Features
- Stripe customer management
- Product and price creation
- Subscription handling
- Webhook verification
- Invoice retrieval
- Production and development environment support
Requirements
- PHP 8.2 or higher
- WebFramework 8.x
- Stripe PHP SDK 7.128 or higher
Installation
Install via Composer:
composer require avoutic/web-framework-stripe
Make sure the definitions file is included in your project by adding it to definition_files in your config.php file:
return [ 'definition_files' => [ '../vendor/avoutic/web-framework/definitions/definitions.php', '../vendor/avoutic/web-framework-stripe/definitions/definitions.php', 'app_definitions.php', ], ];
Configuration
If you are using the definition from definitions/defitinions.php. You can just add the following stripe.php to your auth config directory (config/auth):
<?php return [ 'api_key' => env('STRIPE_SECRET_KEY'),'your_stripe_secret_key', 'publishable_api_key' => env('STRIPE_PUBLISHABLE_KEY'), 'endpoint_secret' => env('STRIPE_WEBHOOK_SECRET') ]