#anhle82 - payment element

1 messages ยท Page 1 of 1 (latest)

small slate
#

Hi, do you have a save card on your Google Pay/ Apple pay?

fossil pulsar
#

no i don't

small slate
#

@fossil pulsar - please write in your follow ups on the thread so we can chat in one place

fossil pulsar
#

yes, i just realized that

small slate
#

You'd need to set that up first as it won't show without it

fossil pulsar
#

how about pay later option?

small slate
#

Let me look on my end.. Are you able to share your URL with me so I can further investigate this?

fossil pulsar
#

I'm working locally in dev environment so can't share but I can provide any information that you need

small slate
fossil pulsar
#

I'm referring to all the payment methods that I turned on via setting

#

I was expecting after migrating to Payment Element, my stripe form would look something like below with different payment method option: card, bank, pay later...

small slate
#

I see, what guidelines are you following to migrate to Payment elements?

fossil pulsar
small slate
fossil pulsar
#

yes, in test mode

#

but at the top of the setting page, I got some warning.

small slate
#

It does not appear that you've fully integrated to Payment Elements yet.

fossil pulsar
#

Are you able to tell me what did I miss?

#

'automatic_payment_methods' => [
'enabled' => 'true',
]

was provided to payment intent creation call

small slate
#

Could you share some snippet of your code here so I can help debug?

fossil pulsar
#

yes

small slate
#

With your existing integration using the Payment Intents correct, you have the correct guide.

fossil pulsar
#

Can I give you a payment intent example in test mode? Will that help?

#

pi_3Kv6hg2O1y39ZmSu1VBQZByi

small slate
#

Looking here to see how I can debug this with you.. give me a few minutes please.

fossil pulsar
#

thanks

#

I figured it out. I removed setup future usage and it's working now

small slate
#

Great, I was trying to test it on my test environment. Glad you got it figured it out.

fossil pulsar
#

But still don't see apple pay option when trying out on my phone

#

ah, look like I have to config apple pay via payment method setting

small slate
#

Can you see Google pay in Chrome?

#

Apple pay does have additional steps you'd need to take to show.

fossil pulsar
#

ah, let my try chrome

#

I don't see google pay in chrome

#

oh, is it integrated directly into the card number?

#

look like it's

small slate
#

As long as you have your Google wallet set up, you should be able to see the button. I'm unsure what you're referring to with 'integrated directly into the card number'.

fossil pulsar
#

i don't see the button

small slate
#

Saved cards on your browser is not the same as a Google wallet.

fossil pulsar
#

let me do a screenshot

small slate
#

You can exit out of it right away.. If the wallet is set up properly, you should see 'Can make payment'

fossil pulsar
#

after click buy, it showed a google pay popup

#

i saw "Can make payment"

small slate
#

Can you reload the payment elements and see if it shows now on that page?

fossil pulsar
#

my page right?

#

still the same

small slate
fossil pulsar
#

Yes

small slate
#

Does your URL start https? Is it an insecure page?

fossil pulsar
#

it's a secure page

small slate
#

Do you see any errors or warning on the Console?

fossil pulsar
#

only warning about afterpay and klarma

#

The following payment method types are not activated:

  • afterpay_clearpay
  • klarna

They will be displayed in test mode, but hidden in live mode. Please activate the payment method types in your dashboard (https://dashboard.stripe.com/settings/payment_methods) and ensure your account is enabled for any preview features that you are trying to use.

small slate
#

Can you share another payment intent example for after the payment element started working?

fossil pulsar
#

pi_3Kv7C22O1y39ZmSu1yiT4REn

surreal stone
#

๐Ÿ‘‹ I'm just hopping in since @small slate needs to head out soon

#

Just to confirm - is the current state of things that Google Pay is not showing up as expected with your Payment Element integration?

fossil pulsar
#

hi karbi, that is correct

surreal stone
#

And are you testing in incognito mode? Or in a normal window?

fossil pulsar
#

in normal window

surreal stone
#

Gotcha - do you have site I could access to try this out on my end?

fossil pulsar
#

no, but let me do it. give me 5 minutes

#

please click the link, add something to cart and checkout

surreal stone
#

I see Google Pay show up on my end - this means that something is wrong with your specific google pay cards on your environment

fossil pulsar
#

can you show me a screenshot so I know what to expect the screen look like?

surreal stone
#

This is what I see on my end:

fossil pulsar
#

i see

#

After re-setup google pay, I can see the button now. Thanks

surreal stone
#

๐Ÿ‘ awesome!

fossil pulsar
#

Regarding apple pay, is the configure file required to be hosted on my server indefinitely or I can delete it after stripe verify?

surreal stone
#

We generally recommend that you keep it around just in case Apple needs to check again

fossil pulsar
#

the reason I asked is because I use domain alias to run multiple websites using the same code base. How can I config apple pay for my scenario?

#

never mind, I think I will use htaccess to handle this

#

one last question, before migrating to Payment Element, I set setup_future_usage = "off_session" to save card details. With Payment Element, I can't set setup_future_usage because it will hide pay later options. Is it possible show all the payment method options and also save card details if customer select card option?

surreal stone
#

Sorry I missed your earlier question!

#

For your latest question, instead of setting setup_future_usage top level on the Payment Intent, I believe you can set payment_method_options[card][setup_future_usage] (see https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card-setup_future_usage) to only have it apply to card

fossil pulsar
#

perfect. Thanks a lot @surreal stone I will test it out later today. Appreciate your help!

surreal stone
#

๐Ÿ‘