- How do I integrate Stripe payments in Laravel using payum/stripe?
- First, install the package via Composer: `composer require payum/stripe`. Then configure a Stripe gateway in Payum using the `payum/payum-bridge` package for Laravel integration. Define your Stripe API keys in Laravel’s config and bind the Payum gateway to Laravel’s service container. Follow Payum’s documentation for action-based payment flows like `Capture` or `Authorize`.
- Does payum/stripe support Stripe’s latest API (v2/v3) like PaymentIntents?
- No, this package currently uses Stripe API v1 (deprecated). For PaymentIntents or Stripe v2 features, you’ll need to either fork the package, hybridize with the Stripe SDK, or consider alternatives like `spatie/laravel-stripe`. Audit your API calls and plan for migration if using deprecated endpoints.
- Is payum/stripe compatible with Laravel 9 and PHP 8.x?
- The package lacks official PHP 8.x support, but you can test it with `payum/payum-bridge` (v1.0+). Patch type hints (e.g., return types) and Symfony dependencies manually. For Laravel 9, ensure your Payum configuration aligns with Laravel’s DI container and route model binding. Test thoroughly for compatibility.
- How do I handle Stripe webhooks in Laravel with payum/stripe?
- Use Laravel’s routing system to direct webhooks to Payum’s event handlers. For Stripe v2 webhooks (e.g., `payment_intent.succeeded`), you may need a custom handler to bridge Payum’s event system with Stripe’s payload structure. Payum’s async actions can integrate with Laravel queues, but test Horizon compatibility for retries.
- What are the alternatives to payum/stripe for Laravel-Stripe integration?
- Consider `spatie/laravel-stripe` for a Laravel-specific, actively maintained solution with direct Stripe SDK support. Alternatively, use the official Stripe PHP SDK (`stripe/stripe-php`) for full control, though it lacks Payum’s workflow abstraction. Evaluate your need for Payum’s multi-gateway pattern before switching.
- How do I test payum/stripe in Laravel with mocked Stripe responses?
- Use Laravel’s mocking tools (e.g., `Mockery` or `pestphp`) to simulate Stripe API responses. Payum’s actions can be tested by mocking the Stripe gateway or its storage layer. For webhooks, test event triggers with Laravel’s `fake()` methods or custom test doubles. Payum’s documentation covers basic testing patterns.
- Does payum/stripe support subscriptions or recurring payments?
- The package supports basic Stripe charges but lacks native subscription management. For recurring payments, use Stripe’s `Customer` API or `Subscription` objects via the Stripe SDK. Payum’s workflows can wrap these calls, but you’ll need custom logic for features like proration or invoice generation.
- How do I configure payum/stripe for PCI compliance?
- Payum offloads tokenization and sensitive data handling to Stripe, simplifying PCI scope reduction. Ensure your Laravel app never stores raw card details—use Stripe tokens or PaymentIntents. Payum’s gateway pattern further decouples payment logic, reducing audit complexity. Follow Stripe’s PCI guidelines for additional controls.
- Can I use payum/stripe with multiple payment gateways (e.g., PayPal) in Laravel?
- Yes, Payum’s gateway pattern supports multi-gateway setups. Configure additional gateways (e.g., PayPal via `payum/paypal`) alongside Stripe in your Payum storage. Laravel’s service container can bind each gateway dynamically, enabling runtime switching or fallback logic.
- What’s the maintenance status of payum/stripe, and should I use it in production?
- The package is unmaintained (last updated in 2016) and risks incompatibility with modern Laravel/Stripe. For production, validate its fit for your needs or fork it to backport Stripe v2 support. Consider alternatives like `spatie/laravel-stripe` if long-term maintenance is critical. Always test thoroughly before deployment.