weareseeed / react-square-web-payments-sdk

Easily create PCI-compliant inputs to accept payments online with the Square Payments API. It supports the following payment methods: credit and debit cards, ACH bank transfers, Apple Pay, Google Pay, Gift Cards and Afterpay/Clearpay.
https://react-square-payments.weareseeed.com/
MIT License
37 stars 40 forks source link

Google Pay - unexpected developer issue #92

Open spycedev opened 1 year ago

spycedev commented 1 year ago

Describe the bug

When clicking the Google Pay button, a new window is opened and google asks me to login, after logging in I get the "unexpected developer error". After clicking "Retry" i'm redirected to a localhost/?somedata url.

I'm using the plugin currently in another webview app without issues, but in this Ionic React app running on a physical android device.

Your Example Website or App

N/A

Steps to Reproduce the Bug or Issue

I will create an example app and update the ticket

Expected behavior

A google pay window opens within the webview to login and choose card, once selected to cardtoken is passed

Screenshots or Videos

No response

Platform

Additional context

No response

spycedev commented 1 year ago

It looks like the reason for the developer error is because popup's aren't allowed in capacitor.

I've tried adding *.google to the allowed url's for capacitor in the config file. It's able to redirect to the Google pay login screen but hangs on loading after you type in your email address, and it's not a popup, its actually redirected.

Any ideas ? It works fine outside of the capacitor app.