feat: implement comprehensive multi-provider payment processing system
- Add unified payment provider architecture with contract-based design - Implement 6 payment providers: Stripe, Lemon Squeezy, Polar, Oxapay, Crypto, Activation Keys - Create subscription management with lifecycle handling (create, cancel, pause, resume, update) - Add coupon system with usage tracking and trial extensions - Build Filament admin resources for payment providers, subscriptions, coupons, and trials - Implement payment orchestration service with provider registry and configuration management - Add comprehensive payment logging and webhook handling for all providers - Create customer analytics dashboard with revenue, churn, and lifetime value metrics - Add subscription migration service for provider switching - Include extensive test coverage for all payment functionality
This commit is contained in:
@@ -34,9 +34,66 @@ return [
|
||||
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
|
||||
],
|
||||
],
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Payment Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configuration for various payment providers used in the application.
|
||||
| Each provider has specific API keys, webhooks, and settings.
|
||||
|
|
||||
*/
|
||||
|
||||
'stripe' => [
|
||||
'secret_key' => env('STRIPE_SECRET'),
|
||||
'publishable_key' => env('STRIPE_PUBLISHABLE_KEY'),
|
||||
'webhook_secret' => env('STRIPE_WEBHOOK_SECRET'),
|
||||
'success_url' => env('STRIPE_SUCCESS_URL', '/payment/success'),
|
||||
'cancel_url' => env('STRIPE_CANCEL_URL', '/payment/cancel'),
|
||||
],
|
||||
|
||||
'lemon_squeezy' => [
|
||||
'api_key' => env('LEMON_SQUEEZY_API_KEY'),
|
||||
'store_id' => env('LEMON_SQUEEZY_STORE_ID'),
|
||||
'webhook_secret' => env('LEMON_SQUEEZY_WEBHOOK_SECRET'),
|
||||
'success_url' => env('LEMON_SQUEEZY_SUCCESS_URL', '/payment/success'),
|
||||
'cancel_url' => env('LEMON_SQUEEZY_CANCEL_URL', '/payment/cancel'),
|
||||
],
|
||||
|
||||
'polar' => [
|
||||
'api_key' => env('POLAR_API_KEY'),
|
||||
'webhook_secret' => env('POLAR_WEBHOOK_SECRET'),
|
||||
'success_url' => env('POLAR_SUCCESS_URL', '/payment/success'),
|
||||
'cancel_url' => env('POLAR_CANCEL_URL', '/payment/cancel'),
|
||||
'access_token' => env('POLAR_ACCESS_TOKEN'),
|
||||
],
|
||||
|
||||
'oxapay' => [
|
||||
'merchant_api_key' => env('OXAPAY_MERCHANT_API_KEY', ''),
|
||||
'payout_api_key' => env('OXAPAY_PAYOUT_API_KEY', ''),
|
||||
'merchant_api_key' => env('OXAPAY_MERCHANT_API_KEY'),
|
||||
'payout_api_key' => env('OXAPAY_PAYOUT_API_KEY'),
|
||||
'webhook_url' => env('OXAPAY_WEBHOOK_URL'),
|
||||
'success_url' => env('OXAPAY_SUCCESS_URL', '/payment/success'),
|
||||
'cancel_url' => env('OXAPAY_CANCEL_URL', '/payment/cancel'),
|
||||
'sandbox' => env('OXAPAY_SANDBOX', false),
|
||||
],
|
||||
|
||||
'crypto' => [
|
||||
'enabled' => env('CRYPTO_PAYMENTS_ENABLED', false),
|
||||
'webhook_secret' => env('CRYPTO_WEBHOOK_SECRET'),
|
||||
'confirmation_timeout_minutes' => env('CRYPTO_CONFIRMATION_TIMEOUT', 30),
|
||||
'exchange_rate_provider' => env('CRYPTO_EXCHANGE_RATE_PROVIDER', 'coingecko'),
|
||||
'coingecko_api_key' => env('COINGECKO_API_KEY'),
|
||||
'blockchair_api_key' => env('BLOCKCHAIR_API_KEY'),
|
||||
'success_url' => env('CRYPTO_SUCCESS_URL', '/payment/success'),
|
||||
'cancel_url' => env('CRYPTO_CANCEL_URL', '/payment/cancel'),
|
||||
],
|
||||
|
||||
'activation_key' => [
|
||||
'key_prefix' => env('ACTIVATION_KEY_PREFIX', 'AK-'),
|
||||
'key_length' => env('ACTIVATION_KEY_LENGTH', 32),
|
||||
'expiration_days' => env('ACTIVATION_KEY_EXPIRATION_DAYS'),
|
||||
'require_email_verification' => env('ACTIVATION_KEY_REQUIRE_EMAIL', true),
|
||||
'max_keys_per_user' => env('ACTIVATION_KEY_MAX_PER_USER', 5),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user