question

jbbdev avatar image
jbbdev asked firacode answered

Google Pay Button IFrame Webview

Hi,

I am working on the IFrame in the Android Webview, to allow users to make Payments to clover merchants through their phones. This is the example I have been following https://codepen.io/gareth-dsouza/pen/MWKbWwv

I am able to see the Google Pay button in the codepen and also at my localhost endpoint. However, the Google Pay button does not load in an Android Browser or in the Webview.

Any solution for this? Also, is it possible to add an Apple Pay button as well?

Thanks!

clover developer community
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
firacode avatar image
firacode answered

The issue might be due to Google Pay’s restriction on loading within iframes or WebView environments. Try setting setDomStorageEnabled(true) and setJavaScriptEnabled(true) in WebView settings. Also, check Google Pay's developer policies to confirm compatibility. For Apple Pay, it requires Safari and won’t work in WebView without native integration. And if you're coding, Firacode is great for improving code readability!

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community