#landsman-gpay

1 messages · Page 1 of 1 (latest)

boreal marten
#

yep, Google Pay does not work in WebViews, so that will never work.

#

if you want to support Google Pay it has to be in an native app component.

#

our officially supported paths here are you either redirect out of your app into the system browser and do the payment there on your website or our Checkout hosted page ; or using our native iOS/Android/React Native libraries, happy to try to answer questions about those!

finite marsh
#

Hi, thank you for the reply. We basically have the app written as the web app (PWA). So we don't want to redirect user to the browser, because he/she is already in the browser, but wrapped in native app, WebView... (quick example: https://pay.trisbee.com/michal?lang=en)

So question is: How we can add native code to make it work? Do you have documentation for this?

boreal marten
#

How we can add native code to make it work? Do you have documentation for this?
as far as I know, no

#

there is no way to bridge into the native app from a WebView for the purposes of using GPay, it's not something we've seen or have docs on

finite marsh
#

Damn, that's pitty. iOS with Apple Pay working really nice. Is that a blocker from Google?

boreal marten
#

yes Google Pay only works in Chrome and not in the Android WebView

finite marsh
boreal marten
#

it might work but it's not something we have any experience with or docs I can point you to.

#

our official options are web, or native app. In any case, you would still need to build the native flow and use our mobile SDKs(https://stripe.com/docs/google-pay) since your page would have to delegate into that code

finite marsh
#

Is this something what Stripe can ask Google, by official way, to improve? It would be really nice for Stripe to allow this kind of implementation, by WebViews I guess.

boreal marten
#

that doesn't really help you in this case, but it would be nice yes!

finite marsh
#

Stripe have bigger power to ask Google for this kind improvement. From their side it would be very simple fix I think. Can you submit this feedback to relevant place please?

boreal marten
#

It's not a simple fix in any case

#

so don't rely on this

#

putting that aside my advice would be to just accept not having Google Pay in your app for now(customers can still pay using cards and other methods so you're not blocked!) and consider rewriting your app to an native one when your business grows and you have the resources

finite marsh
#

Yeah, sure.

boreal marten
#

these are the tradeoffs when using a PWA and cross-platform app development, you won't always get 100% of the functionality a native app for the platform would

finite marsh
#

For workaround - do you understand how Stripe.js detecting Google Pay? If we gonna do some JS binding to the native code we have to allow this method, what we doing via Stripe callback.

boreal marten
#

it's not publicly documented and the short answer here is you're not going to be able to make this work

#

stripe.js is not designed with this is in mind in any way to let you try to inject a native binding into the flow so I doubt it would work

#

I really don't know how you would do this, like I said it's not something we have any experience with, and we don't officially support. Our official support is for web apps running in in native browsers, native iOS and Android apps, and React Native mobile apps. Anything outside of that like WebViews are grey areas where you might be able to get basic functionality working but we don't give official support.

#

sorry, I have to run for lunch, but I'll be online again a little later.