#SalteeSam
1 messages · Page 1 of 1 (latest)
Can you share a payment intent id where this is happening?
yes! this is the payment id: pi_3NahnQIXJEsTqc6v2wK7RjnH in "test" mode via our connect account pi_3NahnQIXJEsTqc6v2wK7RjnH
Can you remove the "allow_redirects": "never" and see if that fixes it?
i did try that, and it did not fix it
Can you share your code for initializing elements?
Also do you see the google pay button in the try the demo section here: https://stripe.com/docs/elements/express-checkout-element
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
Sorry I mean the part where you initialize the payment element specifically
oh yes here is the whole file
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>
</>
unfortunately not, i am just working locally (we are migrating from the checkout sessions to the custom payment flow)
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)
Hm ok. I would need a test page up and running to try to reproduce this/debug further
okay it would likely be early next week at the earliest. should i just post a link in this thread once it is up?
We archive threads after some inactivity
You can just open a new message in the main channel and someone will help
okay thank you!
No problem