stripe/stripe-php
Official Stripe PHP SDK for accessing the Stripe API. Install via Composer, configure your API key, and use resource classes to create charges, customers, subscriptions, and more. Works with PHP 7.2+ (requires curl, json, mbstring).
Pros:
payment_record, fleet_data, bizum payment method), enabling early adoption of cutting-edge Stripe features critical for innovative products. This aligns with Laravel’s flexibility for experimental integrations.beneficiary_account, sender_details, and liquid_asset expand support for complex financial flows (e.g., payouts, money movement), which can be abstracted into Laravel services for domain-specific logic.requires_action in DelegatedCheckout and sunbit/wallet payment methods broadens cross-border and alternative payment options, reducible to Laravel’s payment gateway abstractions.Radar enums (e.g., event_type, risk_level) improve fraud detection integration, which can trigger Laravel events (e.g., FraudAlert) for reactive workflows.enum for Radar.CustomerEvaluation) reduces runtime errors, aligning with Laravel’s PHP 8+ type-hinting best practices.Cons:
bm_crn, eg_tin) may break existing business logic for international customers. Requires migration of V2.Core.Account data.Radar.CustomerEvaluation enums now enforce stricter types (e.g., enum('login'|'registration')), necessitating updates to serialized/deserialized data (e.g., JSON APIs).emptyable(literal('account_funding')) may expose null values in Laravel models, requiring nullable field definitions (e.g., ?string in PHP 8+).payment_record) may require custom Laravel facades/services to abstract Stripe’s evolving API, increasing initial setup complexity.Stripe::setEnableTelemetry(false)) are still required for GDPR compliance.bizum (Spain) and sunbit can be integrated with Laravel’s PaymentGateway interfaces, extending support for regional payment systems.beneficiary_account enable Stripe Connect payouts, which can sync to Laravel models (e.g., Payout::class) via observers or events.notify(new FraudAlert($evaluation))) or update user risk profiles in Eloquent models.requires_action statuses can map to Laravel’s workflow states (e.g., PaymentIntent::STATUS_REQUIRES_ACTION), with redirects handled via Laravel’s Redirect helper.transaction_type in payment_details).PaymentMethodType) to reflect new values (bizum, sunbit).Radar.CustomerEvaluation data in JSON columns (e.g., risk_signals:json) for flexibility.V2.Core.Account) will fail. Requires a data migration script to transform or archive legacy records.Radar data (e.g., from APIs) may fail validation. Use Laravel’s JsonSerializable to handle type transitions.payment_record) may change without deprecation warnings. Isolate these behind feature flags in Laravel.transaction_type) risk NullPointerException in Laravel. Use PHP 8’s nullsafe operator (?->) or data_get() helpers.fleet_data) may appear in webhook events, requiring updated Laravel event handlers or middleware.stripe/stripe-php to ^20.1.0-alpha.3 in composer.json and test thoroughly.payment_record) bypass Stripe’s validation. Validate responses manually in Laravel services.sunbit) may introduce compliance risks. Audit Laravel’s card handling logic (e.g., Stripe Elements) for gaps.quantity_precision) add minimal overhead to API calls.payment_record) to avoid breaking changes? Options:
config('stripe.enable_preview_features')).PreviewPaymentService).bizum, sunbit) be abstracted into a unified PaymentGateway interface in Laravel?getRiskLevelAttribute()).beneficiary_account) trigger Laravel events (e.g., PayoutCreated)? If so, how will you ensure idempotency for duplicate webhooks?payment_record data with Laravel models? Options:
payment_record:json).PaymentRecord model with polymorphic relations.sunbit payments) that require custom Stripe integration?payment_record) in Laravel? Options:
Validator::extend('stripe_preview', ...)).if ($previewEnabled && empty($record)) { ... }).bizum) require additional PCI compliance controls in Laravel? If so, how will you audit card data handling?fleet_data) be used in high-volume transactions? If so, how will you optimize Laravel’s queue processing?info('Preview feature used: payment_record')).StripeClient metrics.liquid_asset) for debugging? If so, how will you redact sensitive data (e.g., beneficiary_details)?payment_record latency)? If so, how will you test under load?if ($customer->tax_id_type === 'eg_tin') { ... }).StripePreviewClient) alongside the stable StripeClient for feature isolation.
$this->app->bind(StripePreviewClient::class, function ($app) {
return new StripePreviewClient(config('stripe.preview_key'));
});
// app/Facades/StripePreview.php
public static function getPaymentRecord(string $paymentIntentId) {
return app(StripePreviewClient::class)->paymentIntents->retrieve(
$paymentIntentId,
['expand' => ['payment_record']]
)->payment_record;
}
PreviewFeatureUsed) toHow can I help you explore Laravel packages today?