#paulo-lacerda_code

1 messages ¡ Page 1 of 1 (latest)

thin abyssBOT
#

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

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

steep root
#

hcaptcha is used for other security defenses against bot traffic, its unrelated to the version & fraud signals flag.

#

This behaviour doesn't really make sense to me, I don't know why your web page would be redirected in a webview if thats not the behaviour when accessed directly from a browser.

hazy pelican
#

I'm also really confused about why this is happening

#

and when it opens the page everything that it shows is "verify"

steep root
#

Can you share a screenshot of what you see?

hazy pelican
#

I'll send you a video, just give me a second

steep root
#

What is that pay now button doing / what is the url thats being redirected to?

hazy pelican
#

I didn't click the pay now button, just the click to pay before, that opens the screen that has the stripe stuff

#

but when it loads it also opens the hcaptcha url

steep root
#

What are you rendering on the payment page? I don't see the CardElement included in the imports. I'm inferring you're presenting a customer saved card if they have one. What does the integration of that view look like?

hazy pelican
#

Yeah, you are right about the CardElement. but I didn't understand your question about the integration

steep root
#

Sorry, wrong word

hazy pelican
#

do you want to see the code?

steep root
#

I mean, what Stripe.js stuff are you using in the view that loads when you click "click to pay"?

#

yes please

hazy pelican
#

well, we use the useStripe hook

#

also useElements

#

const stripe = useStripe();
const elements = useElements();

#

and then when there's no saved card or the user chooses to add another one we then show the CardElement:

            onReady={(element: StripeCardElement): void => element.focus()}
            onChange={handleCardElementChange}
            options={{
              style: {
                base: {
                  color: 'text.default',
                  '::placeholder': {
                    color: 'text.default',
                  },
                  backgroundColor: 'transparent',
                  iconColor: 'text.default',
                  fontSize: isSmallMobileDevice ? '12px' : '16px',
                },
              },
            }}
          />```
```const StyledCardElement = styled(CardElement)`
  margin: 20px 0px 0 0;
  padding: 15px;
  background-color: var(--chakra-colors-background-default);
  border: 1px solid var(--chakra-colors-border-default);
  border-radius: 10px;

  &.StripeElement--focus {
    border-color: var(--chakra-colors-border-focus);
  }
`;
#

but in the video I sent you basically the only stuff from stripe.js we were using was useStripe and useElement hooks, since we didn't load the CardElement

steep root
#

Can you access the framed page from a desktop browser to compare behaviour?

hazy pelican
#

yes, in the desktop it doesn't happen

#

and on android it also doesn't happen

#

it's only for ios and when we are using the app, if we open the url directly from the browser it also works fine, it's a really specific and weird situation

thin abyssBOT
steep root
#

Hmm that is really strange. I've never heard of this happening. Still trying to think of other things.

coarse gyro
#

Hello! I'm taking over and catching up...

#

I have a theory about this. Do you have special handling in the web view's delegate for iOS? Is it a WKWebView under the hood, or a UIWebView?

hazy pelican
#

great question, we use expo, let me take a look

coarse gyro
hazy pelican