#gabriel_savedpm-link

1 messages ¡ Page 1 of 1 (latest)

vast grottoBOT
#

👋 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/1306370569452654663

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

ruby sable
#

I forgot to mention that I am testing on Stripe's Dev environment.

Example of my Stripe Payment elements implementation in React:

`const StripePaymentElementsProvider = ({
sessionToken,
children,
}: StripePaymentElementsProviderProps) => {
const theme = useTheme();

const elementsOption = {
clientSecret: setupIntendSecretId,
appearance: {
variables: {
fontFamily: ${themeConfig.fonts.hankenGrotesk.family}, sans-serif,
colorPrimary: theme.backgroundPositive.val,
colorText: theme.primaryA.val,
fontSize3Xs: ${themeConfig.fonts.hankenGrotesk.size.true}px,
},
},
currency: 'ussd',
};

return (
<Elements stripe={stripePromise} options={elementsOption}>
{/* In some children component: */}
<PaymentElement
options={{
layout: 'tabs',
defaultValues: {
billingDetails: {
email: billingDetails.email,
name: billingDetails.firstName + ' ' + billingDetails.lastName,
phone: billingDetails.phone || '',
},
},
}}
/>
</Elements>
);
};

export default StripePaymentElementsProvider;
`

humble forge
#

Hello, thanks for the info. Is the sessionToken in your code from a Customer Session? If so, I would expect the saved PMs to show up again. The only steps that I am aware of that are required are having PMs with allow_redisplay set properly and then the customer session

ruby sable
#

No that's not a Stripe Session Id, it's actually the Setup Intent client secret (seti_1QKnzhC8l6n3Jm54hkpkS20B_secret_RDESPmglF0FkFXdyak6HGis7Ej9pPLx).
I named it sessionToken for people that are not familiar with Stripe API understand that this token is required to initialize the Stripe Elements

humble forge
ruby sable
#

Interesting... I will try that, thanks

vast grottoBOT