Fix: Move Stripe Payment Intent to always allow redirect
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user