From 0dd607bcdfd5763a9fb8b0acccc8e40fdbf95630 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Thu, 16 Jun 2022 10:48:06 +0200 Subject: [PATCH] =?UTF-8?q?fix(bot):=20=F0=9F=9A=91=EF=B8=8F=20Stripe=20fo?= =?UTF-8?q?rm=20isn't=20showing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChatBlock/inputs/PaymentForm/StripePaymentForm.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/bot-engine/src/components/ChatGroup/ChatBlock/inputs/PaymentForm/StripePaymentForm.tsx b/packages/bot-engine/src/components/ChatGroup/ChatBlock/inputs/PaymentForm/StripePaymentForm.tsx index 61a130a56..c3de227a0 100644 --- a/packages/bot-engine/src/components/ChatGroup/ChatBlock/inputs/PaymentForm/StripePaymentForm.tsx +++ b/packages/bot-engine/src/components/ChatGroup/ChatBlock/inputs/PaymentForm/StripePaymentForm.tsx @@ -42,8 +42,9 @@ export const StripePaymentForm = ({ options, onSuccess }: Props) => { description: error.name + ' ' + error.message, details: error.message, }) - if (!data || !frameDocument || !frameWindow?.Stripe) return + if (!data || !frameDocument) return await initStripe(frameDocument) + if (!frameWindow?.Stripe) return setStripe(frameWindow.Stripe(data.publicKey)) setClientSecret(data.clientSecret) setAmountLabel(data.amountLabel)