#miran_paymentelement-applepay

1 messages ยท Page 1 of 1 (latest)

rose fieldBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1304498879483609171

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

tranquil marten
#

miran_paymentelement-applepay

#

@placid shell It could be many different things unfortunately so I'm going to need more details than just the bit of code initializing PaymentElement.
What do you see in the JS console for example? Do you have more details about how you integrate, how you initialize Stripe.js, which exact browser you are using, etc.?

placid shell
#
            
            let appearance = {
                theme: 'flat',
                variables: {
                    colorPrimary: '#12323E',
                    colorBackground: '#203e49',
                    colorText: 'white',
                    colorDanger: '#df1b41',
                    borderRadius: '0px'                    
                }
            };

            const elementsOptions = {
                appearance: appearance,
                mode: 'payment',
                currency: 'nok',
                amount: 1099,
                captureMethod: 'manual',
                paymentMethodTypes: ['card', 'klarna'],
            };
            const elements = stripe.elements(elementsOptions); // Create an instance of Elements.
            
            const paymentElementOptions = {
                wallets: {
                    applePay: 'auto',
                    googlePay: 'auto',
                },
                layout: 'tabs'
            };
            const paymentElement = elements.create('payment', paymentElementOptions); // Create an instance of the payment Element.
            ```
#

I am using Stripe payment element.

tranquil marten
#
``` what's in `stripeOptions`? That's a crucial bit
placid shell
#
            @if (isPro($expert->company?->id))
                stripeOptions = {
                    ...stripeOptions,
                    stripeAccount: '{{ $expert->company->stripe_user_id }}'
                }
            @endif

            const stripe = Stripe('{{ env("STRIPE_KEY") }}', stripeOptions); // Create a Stripe client.
            ```
#

We have direct charge here also.

#

But that should not be interfering here, right?

#

So, just the locale parameter.

tranquil marten
#

But that should not be interfering here, right?
it absolute does ๐Ÿ™‚

placid shell
#

So, if the charge is created on the platform account, I should be able to see the Google/Apple pay button?

tranquil marten
#

if you have registered the domain properly yes

placid shell
#

Okay, I will be back to you in a few mins...

tranquil marten
#

sure!

#

Sorry this is hard to debug because it can be 20 different things and we play "whac-a-mole" until we find the one(s) that cause it not to appear

placid shell
#

Yes, at this point, I am kind of used to it.

placid shell
#

I am using Arc browser and in incognito mode, I can't see any error on the browser console...

#

the domain verification status

tranquil marten
#

Okay can you move away from Arc entirely and try Safari for ApplePay and Chrome for GooglePay instead?

placid shell
#

On it!

#

One more thing, do I need to have Apple wallet enabled?

#

Because I don't have it enabled yet.

tranquil marten
#

yes you do

placid shell
#

So, let's say someone who uses Windows, can't make a purchase throught Apple pay?

tranquil marten
#

correct they can't

placid shell
#

But can they still see Google pay option?

#

Hey, I just saw Apple pay on my iPhone...

tranquil marten
#

if they use Chrome yes

placid shell
#

What about other chromium based browsers? Are they out of luck?

tranquil marten
#

I don't know for sure. If they support GooglePay it should work

placid shell
#

Alright, thanks for your time and help. Have a nice day!