#thai-huynh_api

1 messages ¡ Page 1 of 1 (latest)

trim oysterBOT
#

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

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

dense sleet
#

Elements should work inside a webview, there is a special thing for handling redirects for bank debit payments smoothly but everything should work fine even without that. Does this happen even if your point your webview at one of our demo pages like this payment element doc? https://docs.stripe.com/payments/payment-element

fluid canyon
#

let me try one secont

#

i do see it ... only difference is we use this:

const setupIntent = await stripe.setupIntents.create(
{
customer: member.customerId,
automatic_payment_methods: {
enabled: true
}
},
{ stripeAccount: stripeAccount.stripeId }
);

  return {
    clientSecret: setupIntent.client_secret,
    stripeId: stripeAccount.stripeId
  };

Then:

<Elements
stripe={stripePromise}
options={{
clientSecret,
appearance: {
theme: "flat",
variables: { fontSizeBase: ".85rem" }
},
// iOS webview compatibility options
loader: "auto"
}}
>
<UpdatePaymentMethodForm
onCancel={() => {
setOpen(false);
setStripePromise(null);
setClientSecret(null);
setError(null);
}}
/>
</Elements>

#

it works fine in a web app but doesn't show in a webview

#

if it helps ... in a regulard web app... the element resize up as it loads ... do i need to set a min height somehwere maybe?

dense sleet
#

Do you have a live page I can point a webview at to see this for myself?
And have you been able to hook up a debugger to your app to see if any errors are being emmitted within the webview?

#

That Elements code looks pretty standard so I'm not immediately seeing what may be going wrong here

fluid canyon
trim oysterBOT
fluid canyon
#

this is what i see in a simulator

#

this is what i see on the web app

mellow girder
#

Hello
Taking over and catching up

#

It'll help you check if there's an underlying error on the page

fluid canyon
#

ok will take a look at that

#

is there not a onLoaderror on the Elements component?

fluid canyon
#

oOo is on the actual payment element not the Elements