Avoid stripe resuccess on redirect handling

This commit is contained in:
2024-09-26 14:04:18 +02:00
parent b994cf607e
commit 2d4e5817e6
@@ -105,6 +105,10 @@ class StripeGateway implements GatewayInterface
throw new \Exception(sprintf("Stripe checkout '%s' exists but no GatewayCheckout with that reference was found.", $sessionId));
}
if ($checkout->getStatus() === GatewayCheckoutStatus::Charged) {
return $checkout;
}
if ($request->query->get('type') !== GatewayCheckoutService::RESPONSE_TYPE_SUCCESS) {
return $checkout;
}