HiEventsDev / Hi.Events

Open-source event management and ticket selling platform. Perfect for concerts, conferences, and everything in between 🎟️
https://hi.events
Other
2.21k stars 193 forks source link

🐛 Only credit card option appears in Stripe checkout #286

Open pchurro opened 2 days ago

pchurro commented 2 days ago

Describe the bug In the checkout page, only credit card option appears in the stripe payment window, even though there's multiple payment methods configured in Stripe.

To Reproduce Steps to reproduce the behavior:

  1. Configured my Stripe account with multiple payment methods;
  2. Installed and configured Hi.Events (Non-SAAS mode) with the correct stripe configuration (using Stripe test keys);
  3. Created a regular test event with normal test tickets;
  4. When trying to buy a ticket, only credit card option appears;

Expected behavior I expected the stripe payment methods I configured in Stripe's dashboard to appear.

Screenshots Captura de ecrã 2024-11-11, às 11 45 03 Captura de ecrã 2024-11-11, às 11 45 26 Captura de ecrã 2024-11-11, às 11 59 41

Logs [2024-11-11 11:44:55] production.DEBUG: Stripe payment intent created {"paymentIntentId":"redacted","paymentIntentDTO":{"amount":1000,"currencyCode":"EUR","order":{"HiEvents\\DomainObjects\\OrderDomainObject":{"orderItems":[{"id":11,"order_id":11,"ticket_id":1,"ticket_price_id":1,"total_before_additions":10.0,"quantity":1,"item_name":"Bilhete teste","price":10.0,"price_before_discount":null,"deleted_at":null,"total_tax":0.0,"total_gross":10.0,"total_service_fee":0.0,"taxes_and_fees_rollup":[]}],"attendees":null,"stripePayment":null,"questionAndAnswerViews":null,"event":null}}}}

Desktop (please complete the following information):

Hi.Events Version and platform Lates all-in-one docker container deployed on a VPS

Additional context I've investigated a lot on the stripe side and I can't find anything I'm doing wrong on the Stripe dashboard. Hi.Events doesn't really have much to go wrong when configuring Stripe as I can only configure the keys and webhook and there isn't any way to further configure it in the UI.

ALSO, in the payment screen it says that "When you give your card information, you are allowing "COMPANY NAME" to charge future payments from your card according to the relevant terms" which is something I definitely don't want to appear as it shouldn't even be true, is this something I have configured wrong also in the stripe dashboard?

Very sorry if this isn't anything wrong with the Hi.Events app.

daveearley commented 2 days ago

Hi @pchurro,

Stripe’s selection of payment methods depends on various factors like the customer's location, the currency you’re using, and your account’s settings. Ensure each payment method you want to display is both enabled in your Stripe dashboard and configured properly for the currency and location you’re testing with.

This is what I see while testing:

Screenshot 2024-11-11 at 21 06 55

I'd recommend reaching out to Stripe support to see if there are any location or currency restrictions affecting the display of payment methods.

Regarding the message about "future payments", I'll look into this as it is misleading.

pchurro commented 1 day ago

Hello @daveearley and thank you for the help.

I've contacted Stripe tech support and their answer is that according to here https://github.com/HiEventsDev/Hi.Events/blob/develop/backend/app/Services/Domain/Payment/Stripe/StripePaymentIntentCreationService.php, because "setup_future_usage" is set to "on_session", most payments methods are being filtered out automatically because they don't support it and therefore don't meet the criteria of the request. See here https://docs.stripe.com/payments/payment-methods/payment-method-support#additional-api-supportability

pchurro commented 1 day ago

Stripe support also claims that this configuration is why the message about future payments appears

daveearley commented 23 hours ago

Hi @pchurro,

I reached out to Stripe support, and they confirmed that using on_session or omitting the setup_future_usage option altogether is correct for a checkout flow (as per their documentation).

They also mentioned that some payment options may not appear because our application doesn’t require a billing address by default.

I tested removing setup_future_usage, but it didn’t result in any additional payment options being shown. I’ll keep investigating this issue as it would be nice to have more options display out of the box.

Thanks!

pchurro commented 17 hours ago

@daveearley that's weird, the Stripe tech support I talked to said using setup_future_usage in this context "didn't made sense". The documentation link you've mentioned addresses the off_session and on_session parameters in general which I understand have more applications than setup_future_usage. setup_future_usage's point is simply to "indicate that you intend to make future payments with this PaymentIntent’s payment method", so I don't understand why it is necessary in this particular checkout flow.

Is there a way I can test removing setup_future_usage in my prod app to see if there is a difference in my case?