this post was submitted on 20 Feb 2024
1 points (100.0% liked)

JavaScript

1978 readers
1 users here now

founded 1 year ago
MODERATORS
 

cross-posted from: https://lemmy.today/post/6812682

Hi,

I'm using stripe.PaymentIntent (server side)

and Stripe.js for the client side.

everything work flawlessly under Firefox. !

With Chrome it's another story... First of all a .js file is being loaded !! ^1 Then in the browser console I received this error:

[Stripe.js] You have not registered or verified the domain, so the following payment methods are not enabled in the Payment Element:

  • apple_pay

Funny thing is that in the Stripe "dashboard" is that the apple_pay is not enabled.. and it work in Firefox..

Any ideas ?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 8 months ago (1 children)
Are you actually trying to use apple_pay, or it that just an irrelevant error you’re not expecting?

No, like I said, apple_pay is disabled ( willingly ) in the stripe dashboard, so I don’t know why the error mention even apply_pay…

Well it wasn't clear whether you were trying to use apply_pay and it magically worked in firefox, but not in Chrome, or Chrome incorrectly things you're trying to use apply_pay...

Have you explicitly declared which payment methods are allowed to be used in your script? Maybe if you haven't declared anything the browser just infers it somehow, and Firefox and Chrome might have a difference in inferring default value

[–] [email protected] 0 points 8 months ago* (last edited 8 months ago)

Have you explicitly declared which payment methods are allowed to be used in your script? Maybe if you haven’t declared anything the browser just infers it somehow, and Firefox and Chrome might have a difference in inferring default value

Indeed it's what I'm thinking too.

Actually I'm using the payment_intents with it's attributes automatic_payment_methods That state in it's description two contradictory thing

  1. Settings to configure compatible payment methods from the Stripe Dashboard
  2. Automatically calculates compatible payment methods


So maybe FireFox use the first one and chrome the second..

I've just found

payment_intents.payment_method_typesThe list of payment method types (e.g. card) that this PaymentIntent is allowed to use.

"payment_method_types": [
    "card",
    "link"
  ],


Now I have to found the complete list of the accepted string of payment_method_types if somebody know where they are laying , let me know, because I can't find them..