#Vincent_92-payment-element

1 messages · Page 1 of 1 (latest)

dawn kayak
#

Hi 👋 can you tell us a bit more about your flow? Since you're showing the payment element on mobile I'm assuming you're building a web flow to be accessed from a mobile device?

wispy relic
#

yes

#

this is for mobile

#

when user click on a button, there is a popup that open to invite the user to enter his card information or select google / apple pay

#

I listen the recommendation of stripe by puttin

#

<meta name="viewport" content="width=device-width, initial-scale=1" />

#

for good display

#

but as you can see on the screenshot , this is too big

#

That's ok , I find, I had "min-width: 500px;" in the global.css

#

solved, thank you, by the way I have another question, I test my mobile app with apple iphone, and in the developer tool, I see a message telling that my domain is not registered with apple and stripe

#

but I already registered the domain on stripe

#

so what can cause the issue please ?

dawn kayak
#

Apologies for the delay. Glad to hear you found the cause of your initial concern!

Can you share your account number and the domain you're using?

hushed karma
#

@wispy relic Are you using Connect in your integration?

wispy relic
#

Non Im not using connect

#

Where can I get my account number ?

dawn kayak
wispy relic
#

acct_1HsdD0LpthC0ShbP

#

the screenshot is from this site

#

But if you look into my account you see that I have registered the domain

hushed karma
#

You need to have a card saved in your apple pay wallet for the button to appear

#

This might not be possible on browserstack, i''m not sure

wispy relic
#

Yes I know, but read the message up right

hushed karma
wispy relic
#

It says that whether i have card or not in apple wallet

#

the domain is not registered

hushed karma
#

Does the docs page show the apple pay button that you can click?

wispy relic
#

Please read the yellow message

hushed karma
#

I've read it

wispy relic
#

Ok I m gonna enter this url in browser stack

#

and see if button apple appear, correct ?

#

This is an Iphone 11 + safari

hushed karma
#

Right, so it looks like the browser/device doesnt support apple pay via brwoserstack then, you'll need to ask browser stack about that

#

You should test with a real device or a local simulator configured with your own account

wispy relic
#

Ok, so it has nothing to do with my registered domain, I mean its not a pb about that

hushed karma
#

well, if you say your domain is already registered successfully in your dashboard then likley not

#

the error message tells you it could be that or no saved card

wispy relic
#

I don't have real Iphone as I'm android user, but I guess I can find on internet a local simulator or something like this to test ?

#

The message on your url

hushed karma
#

You can test this with xcode and the ios simulator

wispy relic
#

says that I have to have a payment card configured inside apple pay wallet, so it is normal that nothing appear no ?

#

ok so I have to user xcode or ios simulator AND I have to enter a real card inside the appel wallet to try, thats correct ?

hushed karma
#

Correct, the requirements are document at the bottom of the docs

wispy relic
#

Thank you I will

#

I have another question

#

I m trying to configure a card with setup intent

#

and when the user have put his card, I don't want to redirect him

#

so on the javascript side I write something like this, but when I confirm I get an error

#

else // Setup card only
{

const {error} = await stripe.confirmSetup({
//Elements instance that was used to create the Payment Element
elements,
confirmParams: {},
redirect: "if_required",
});

}

#

I used redirect: "if_required" to bypass the redirect url because I don't want to redirect the user

#

Is is well typed, or something wrong here ?

#

The card is succefully added to strip, but I get that error

#

Any clue ?

hushed karma
#

You need to check if error is defined, first

#

In the success case, error is null/undefined so error.type is invalid

#

note we show using if(error) { ...}

wispy relic
#

Yes but in the screenshot I sent you

#

the "error" object is not defined

#

And I don't know why it is not defined

hushed karma
#

Because there was no error

#

you said the card was setup successfully

#

If the authorization fails, the Promise will resolve with an {error} object that describes the failure.

wispy relic
#

Understood, so in this case, I have to test first if error is defined, and if it is not, I bypass the if/else error block

hushed karma
#

Correct!

wispy relic
#

have try this but still not work, do you have a tips to check if error is set ?

hushed karma
#

Why not just use if(error)?

wispy relic
#

I already try "if(error)" but still the same error : The browser tell me that "error" is not definied

#

defined

hushed karma
#

ah, you're outside the scope of where error is defined

#

you need to move that code inside the else block

wispy relic
#

Holy S... thank you !

hushed karma
#

NP!

wispy relic
#

Do you know why I have a lot of error, I think that come from stripe js

#

Everythings work, but If I can get rid of there error, it will be more clean

#

Most of them are from inpage-content.js

#

Is this related to google pay maybe ?

#

Maybe because Im in test mode with stripe ?

lime shell
#

never seen this but they don't all look like Stripe errors, not sure what the webassembly thing is, must depend on your overall stack/set up here

wispy relic
#

Was an chrome plugin, no more message now

lime shell
#

awesome!

wispy relic
#

Recently I have noticied here that in europe, google pay modal was in $ dollar currency when setup a card

#

karllekko tell me that they will update to have the good currency, and now this is good

#

but there is still one sentence that has has not been translated

#

in yellow on the screenshot

#

can you tell them about that please ?

lime shell
#

looking

wispy relic
#

ok

lime shell
#

yeah it looks like a Chrome bug, not ours. It's their UI here and we don't control it unfortunately so you can't really do anything other than wait for it to be fixed by google in future version. We'll report it to them but those things take time