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

Stripe payment method idempotency_error when card is declined on first try #1254

Closed
Chircop97 opened this issue Jun 29, 2023 · 11 comments
Closed

Comments

@Chircop97
Copy link

Chircop97 commented Jun 29, 2023

Describe the bug
Whenever I try to make a payment via Stripe and the card gets declined and I try again, the application then provides an idempotencyException. This is due to the first request being done using the same reservation key.

To Reproduce
Steps to reproduce the behavior:

  1. Try and make a payment making sure it fails for some reason
  2. Once its failed go ahead and try again
  3. See Error stating the idempotencyException

Expected behavior
This behaviour shouldn't happen and while the reservation should still remain intact, there should be a way to either get a new reservation ID or use another key.

Screenshots
This first image shows the first request with the card being declined.
image

The second image shows the second request with the idempotency error due to using the same reservation ID as the idempotency key.
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Chrome
  • Version 114.0
@cbellone
Copy link
Member

cbellone commented Jul 6, 2023

Hi @Chircop97,

thanks for using alf.io!

By looking at the payload, it seems that you are using Stripe without having configured Strong Customer Authentication.

can you please confirm if that's the case?

@Chircop97
Copy link
Author

That is in fact the case, I will go ahead and implement this and let you know with my result. Thanks

@Chircop97 Chircop97 reopened this Aug 4, 2023
@Chircop97
Copy link
Author

Hi, so I've tried setting it up with Strong Customer Authentication and created the webhook etc, however when I try to do a payment it seems that alf.io hangs waiting for some type of response. When having a look at the logs on stripe webhook. I noticed that the request was received to stripe but had a 500 error stating that the payment provider has not been found.

image

@cbellone
Copy link
Member

please double check that the configuration is consistent across levels (system, organization, event).
please double check that the "base url" configuration does not have a trailing slash at the end

If everything looks OK to you, please share screenshots of the actual configuration on all levels (see above) for the following sections:

  • Payment -> general
  • Payment -> stripe

Please mask / hide actual configuration values, I am only interested in seeing which options are set at which level, in order to reproduce the issue.
Thanks

@Chircop97
Copy link
Author

  1. System Level
    image
  2. Organization Level
    image
  3. Event Level
    image

I also checked the base URL that it doesn't have a trailing slash and its also set on all levels. The issue still persists. Something to point out is that I have an NGINX reverse proxy infront of the alfio. However traffic is not being blocked to /api endpoints, already verified it.

@cbellone
Copy link
Member

cbellone commented Sep 8, 2023

Apologies for getting back to you so late.

I would suggest you a couple of things:

  1. unless you have different organizations on the same instance running their ticket sales, configure stripe at system level and delete all the configurations from organization and event level

  2. You probably don't need stripe connect, unless you are acting as a platform provider for multiple organizations. See https://stripe.com/en-ch/connect for more information

  3. Check on the alf.io logs for any errors.

@Chircop97
Copy link
Author

So, I got rid of all the configurations and left the one under system only, now im having this weird problem not sure if you ever envountered it before. It seems that the pay stays greyed out and there is no field were to input card details.
image

@cbellone
Copy link
Member

The Stripe widget is not loading, the configuration is probably incorrect.
You should have an error on the browser console, can you please check? It should clarify why the widget is not being loaded

@Chircop97
Copy link
Author

Ok so you were right the PK was missing fro mthe organization hence why it wasn't loading the integration. I set the the values as needed and the integration loaded. After pushing a test following the setting up, I resulted in an error on stripe, "payload not recognized"
image

@Chircop97
Copy link
Author

By any chance, could it be that the platform is sending live data while in fact it should be sending test data? Since the keys im using from stripe are in test mode. If so from were can i set this within alfio?

@Chircop97
Copy link
Author

Update: I have re-created the webhook using the latest API version and it works successfully without any problems. Thanks for your genuine help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants