#paulo-lacerda_code
1 messages ¡ Page 1 of 1 (latest)
đ 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.
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.
I'm also really confused about why this is happening
and when it opens the page everything that it shows is "verify"
Can you share a screenshot of what you see?
What is that pay now button doing / what is the url thats being redirected to?
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
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?
Yeah, you are right about the CardElement. but I didn't understand your question about the integration
Sorry, wrong word
I mean, what Stripe.js stuff are you using in the view that loads when you click "click to pay"?
yes please
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
Can you access the framed page from a desktop browser to compare behaviour?
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
Hmm that is really strange. I've never heard of this happening. Still trying to think of other things.
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?
great question, we use expo, let me take a look
For example, it could be that something is implementing one or more of the WKNavigationDelegate methods, which is intercepting the hCaptcha requests and trying to load them in the web view incorrectly: https://developer.apple.com/documentation/webkit/wknavigationdelegate
we use this lib for the webview: https://www.npmjs.com/package/react-native-webview