Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You cannot cancel this PaymentIntent because it has a status of canceled #57

Closed
bellu opened this issue Jul 16, 2024 · 5 comments
Closed
Labels
invalid This doesn't seem right

Comments

@bellu
Copy link

bellu commented Jul 16, 2024

I'm using the 2.0.9 version, and lately if a payment has been rejected from stripe or if i come back to the website without paying; i have this error on the website (see screenshot).
Any suggestions?

Screenshot 2024-07-12 alle 15 50 37
@Prometee
Copy link
Member

Hello @bellu !

Are you able to update the plugin to v2.0.10 at least? It seems to be the same issue that already has been fixed.

@Prometee Prometee added the invalid This doesn't seem right label Jul 16, 2024
@bellu
Copy link
Author

bellu commented Jul 17, 2024

Hi @Prometee!

I updated to the v2.0.10, but i've the same issue.
I saw here #53 (comment) that you mention another workaround, can you be more specific please?

Thanks

@Prometee
Copy link
Member

@bellu I already added this legacy action to the available one (https://github.com/FLUX-SE/PayumStripe/blob/master/src/StripeCheckoutSessionGatewayFactory.php#L43), then even if your Stripe API version is not a recent one it will execute it if needed.

Are you able to describe exactly what steps you are making to reproduce this error ? And do you have custom code running on this payment method ?

@bellu
Copy link
Author

bellu commented Jul 18, 2024

During the payment if i use the "back to the website" button on the stripe checkout page, i've this error.
I don't have any custom code for this payment method.

PS: I updated to the v2.0.10, but the legacy cancel action doesn't seem to be here https://github.com/FLUX-SE/PayumStripe/tree/v2.0.10/src/Action/StripeCheckoutSession

@Prometee
Copy link
Member

flux-se/sylius-payum-stripe-plugin: at least 2.0.10 (Sylius plugin)
flux-se/payum-stripe-bundle: at least 2.0.1 (Symfony bundle)
flux-se/payum-stripe: at least 2.0.15 (basic payum lib)

The versions of those packages are not synced. but if you use this requirements in your composer.json :

"require": {
    "flux-se/sylius-payum-stripe-plugin": "^2.0"
}

And you update the plugin then the rest will get updated with the latest version.

Unfortunately, I'm not able to reproduce your issue. When you come back from Stripe portal a Payum extension is taking care of expiring the Stripe Session :
https://github.com/FLUX-SE/SyliusPayumStripePlugin/blob/master/src/Extension/CancelExistingPaymentIntentExtension.php then the Payment is canceled and a new one is created by Sylius for the customer to retry with another payment ethod or the same one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants