diff --git a/src/Payment/Drivers/StripePaymentDriver.php b/src/Payment/Drivers/StripePaymentDriver.php index 9a8a8f8..fdfd58a 100644 --- a/src/Payment/Drivers/StripePaymentDriver.php +++ b/src/Payment/Drivers/StripePaymentDriver.php @@ -100,12 +100,18 @@ class StripePaymentDriver implements 'currency' => $amount->currency->code, 'capture_method' => $captureMethod, 'confirm' => true, + // 'never' rather than the client-side paymentMethodTypes: ['card'] + // restriction alone — the storefront's Payment Element already + // excludes every redirect-based method, but without this Stripe + // still falls back to whatever's enabled in the Dashboard and + // demands a return_url on confirm. Setting this unconditionally + // (not only when no payment_method is given) matches the actual + // flow: a payment_method is always supplied here. + 'automatic_payment_methods' => ['enabled' => true, 'allow_redirects' => 'never'], ]; if (isset($data['payment_method'])) { $params['payment_method'] = $data['payment_method']; - } else { - $params['automatic_payment_methods'] = ['enabled' => true]; } try {