-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apple pay and google pay support? #4
Comments
Hey @arunim2405, Welcome! According to Stripe, No additional configuration is required to use Apple Pay in Checkout. You need to configure the Stripe platform itself with your apple merchant data tho, Step by step article on how to configure stripe with apple merchant details (Check the As of this library, we simply open the web version of Stripe Checkout, so if you enable apple pay from stripe's API, it should work out of the box. Let me know If I can help further! Please reopen the issue if there's anything that needs to be implemented here 💪 |
I failed to use your webview to call ApplePay either. It seems on iOS, to make ApplePay available, we have to use an in-app-browser to open Stripe checkout page. It provides the context of Safari for using the ApplePay. If open a Stripe checkout webpage in an app's webview, it would not let you use the ApplePay. |
Hi @AnLuoRidge , |
So, there's no apple pay support atm due to the context not being passed to the webview. I will try to find a way around this soon! But it doesn't look like a straight forward fix. P.S: PRs are welcome! |
No...I don't have a chance to test on Android. Nor do I have any idea of fixing it. Hope @a-tokyo would find a workaround. |
@AnLuoRidge @arunim2405 The issue is mainly with react-native-webview, once it supports apple pay then this library should as well Issue for apple pay support in react-native-webview Apple pay is available on webpages opened with I found a workaround here react-native-webview/react-native-webview#920 (comment) |
Thank you @a-tokyo . The workaround is awesome! |
@AnLuoRidge @a-tokyo , |
@arunim2405 They should not affect the onSuccess and onCancel as long as the URL is correct, the library relies on detecting URL changes to call functions |
@arunim2405 What a coincidence!!! I met the problem of However, not like you, I'm still using react-native-stripe-checkout-webview directly. That's really weird. I even, in this package's source code, wrote some I'll build a new expo project tmr to dig out what's the root cause. |
@arunim2405, @AnLuoRidge I suspect the following: The We can check the new schema and add an additional check here https://github.com/A-Tokyo/react-native-stripe-checkout-webview/blob/449f622ce907967fcf848cc9ef80bd4895ff156a/src/StripeCheckout.js#L76 |
"dont use any script injections e.g. onMessage, injectedJavaScript cause they use WKUserScript for injection in webpage and disables Apple Pay. But u'll have question how to communicate between webview and app - if u need apple pay in most cases u are integrating 3rd party checkout(e.g. stripe) -> all u need "close" webview on success or fail -> many checkout providers have "callback urls" e.g. stripe have success_url, just use it, redirect user back into your app on success/fail via deep link" |
Yes, I read this part of source code today. While...I wrote my That drove me crazy. I'll examine what could be wrong tomorrow. |
@arunim2405 no the handler functions are not injected in the page, we just listen to URL changes |
@AnLuoRidge That sure is weird! We just need to detect the URL string somehow! |
Update, I finally got hands on a testing ios device with apple pay sandbox. Implemented the workaround stated above and I am pleased to share with you guys that apple pay is working as expected. onSuccess and onCancel is also working as expected. I just need a method to test out google pay. @AnLuoRidge @a-tokyo |
@arunim2405 Great! Awesome job! @arunim2405 @AnLuoRidge Do you think we add the tempfix to the documentation? Or should we fork the webview repo and use it? |
Now I know. It's the http url in
I think add this temp fix in the README is enough. |
@AnLuoRidge @arunim2405 Here's a PR with the documentation #12 , let me know if you have any proposed changes! |
Trust me, forking it could cause side issues, My opinion : create an issue and wait for it is the right solution! |
@arunim2405 , @a-tokyo , Google pay is not working in android device. I have tried react-native-webview/react-native-webview#920 (comment) this solution but no effect in android. Stripe preview is working well in chrome with in the same android device. Is there anything I am missing, even from Stripe dashboard. Please find my code below:
Versions using: Thanks |
Hi, my current objective is to integrate apple pay and google pay into my app. It already supports card payment. Can I use this? Thank you for your help
The text was updated successfully, but these errors were encountered: