#sai-rez_error

1 messages Ā· Page 1 of 1 (latest)

vapid larkBOT
#

šŸ‘‹ 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/1266355680483479626

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

lime girderBOT
#

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.

unique cloak
woeful pecan
#

The issue is I have configured it which is strange, with mode setup the confirmation token has setup_future_usage set correctly, but not with mode payment. My code is below, am i missing something?

`const paymentIntentOptions = {
mode: 'payment',
amount: paymentIntent?.amount,
setupFutureUsuage: 'off_session',
paymentMethodTypes: paymentIntent?.payment_method_types,
} as StripeElementsOptions;

const setupIntentOptions = {
mode: 'setup',
currency: plansState[0]?.currency ?? 'gbp',
setupFutureUsuage: 'off_session',
} as StripeElementsOptions;

const stripeOptions =
doesNeedPaymentIntent && paymentIntent ? paymentIntentOptions : setupIntentOptions;

return (
stripeOptions && (
<ElementsStripeWrapper options={stripeOptions}>
<PaymentDetailsWithElements paymentIntentFromWrapper={paymentIntent} />
</ElementsStripeWrapper>
)
);`

unique cloak
#

What does <ElementsStripeWrapper> component look like?

woeful pecan
#

It's just a simple wrapper around the Elements component

`const ElementsStripeWrapper: React.FC<Props> = ({ children, options = {} }) => {
const { appData } = useContext(AppContext);
const [stripePromise] = useState(() =>
loadStripe(appData.stripeKey, { locale: getLang() as StripeElementLocale }),
);

return stripePromise ? (
<Elements
stripe={stripePromise}
options={{
...options,
fonts: [
{
src: "url('https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap')",
family: 'Roboto Regular',
weight: '400',
},
],
loader: 'always',
}}
>
{children}
</Elements>
) : null;
};`

unique cloak
#

Ah, there's a typo: setupFutureUsuage

#

That's why it's not working in your payment options

#

Well actually, a typo in both lol

woeful pecan
#

omg

#

Sorry for the hassle

unique cloak
#

np at all

woeful pecan
#

Yup tested now and it's working šŸ¤¦ā€ā™‚ļø sorry again