#SalteeSam

1 messages · Page 1 of 1 (latest)

rapid wharfBOT
vivid delta
#

Can you share a payment intent id where this is happening?

whole falcon
#

yes! this is the payment id: pi_3NahnQIXJEsTqc6v2wK7RjnH in "test" mode via our connect account pi_3NahnQIXJEsTqc6v2wK7RjnH

vivid delta
#

Can you remove the "allow_redirects": "never" and see if that fixes it?

whole falcon
#

i did try that, and it did not fix it

vivid delta
#

Can you share your code for initializing elements?

whole falcon
#

here is the code for initializing the elements:

import React, { useMemo } from 'react';
import { loadStripe } from '@stripe/stripe-js';
import { Elements } from '@stripe/react-stripe-js';

import { Result } from 'antd';

import { useMenuCheckout } from 'hooks/useMenuCheckout';

export default function StripeCheckoutSession({
    children,
    appearance = { theme: 'stripe' },
}) {
    const {
        checkoutSession: { data },
    } = useMenuCheckout();

    const clientSecret = data?.client_secret;
    const stripeAccount = data?.stripe_account;

    const options = {
        clientSecret: data?.client_secret,
        appearance,
    };

    console.log('data', data);

    const stripePromise = useMemo(() => {
        if (!clientSecret || !stripeAccount) {
            return;
        }
        return loadStripe('pk_test_xQ9yicmmJXA7U59CYydAu7JN', {
            stripeAccount,
        });
    }, [clientSecret, stripeAccount]);

    if (!clientSecret || !stripeAccount) {
        return (
            <Result
                status="404"
                title="Checkout Details Not Found"
                subTitle="Please refresh the page and try again."
            />
        );
    }

    return (
        <Elements options={options} stripe={stripePromise}>
            {children}
        </Elements>
    );
}

#

and yes i can see the google pay option in the demo

vivid delta
#

Sorry I mean the part where you initialize the payment element specifically

whole falcon
#

but then this part here is where it is rendered:

const paymentElementOptions = {
        layout: 'tabs',
        wallets: {
            applePay: 'auto',
            googlePay: 'auto',
        },
    };

return (<> 
<Col xs={24} sm={24} md={24} lg={18} xl={18}>
                    <LinkAuthenticationElement
                        id="link-authentication-element"
                        options={{
                            defaultValues: { email: shoppingCart?.email },
                            layout: 'accordion',
                        }}
                    />
                    <PaymentElement
                        id="payment-element"
                        options={paymentElementOptions}
                    />
                </Col>


</>
vivid delta
#

Hm weird

#

Do you have a test page published where I can try to reproduce?

whole falcon
#

unfortunately not, i am just working locally (we are migrating from the checkout sessions to the custom payment flow)

vivid delta
#

Are you authenticated with link?

#

Have you authenticated with link previously I mean

whole falcon
#

i have with 1 email, and not with another email.

when i use the un-authenticated email i see this (photo#1) and when i am using the authenticated email i see this (photo #2)

vivid delta
#

Hm ok. I would need a test page up and running to try to reproduce this/debug further

whole falcon
#

okay it would likely be early next week at the earliest. should i just post a link in this thread once it is up?

vivid delta
#

We archive threads after some inactivity

#

You can just open a new message in the main channel and someone will help

whole falcon
#

okay thank you!

vivid delta
#

No problem