Skip to content
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

TerminalConnectTypes.Internet doesn't work for browser app #381

Open
2 of 8 tasks
kyleabens opened this issue Aug 30, 2024 · 5 comments
Open
2 of 8 tasks

TerminalConnectTypes.Internet doesn't work for browser app #381

kyleabens opened this issue Aug 30, 2024 · 5 comments

Comments

@kyleabens
Copy link

kyleabens commented Aug 30, 2024

Platform

  • Web
  • iOS
  • Android

Describe the bug
Using TerminalConnectTypes.Internet does not work for ionic apps in the browser. Seems to only work for iOS or Android apps.

Expected behavior
This should be possible on the browser

await StripeTerminal.discoverReaders({
    type: TerminalConnectTypes.Internet,
    locationId: ***********
 });

Using Function:

  • Payment Sheet / Payment Flow
  • Apple Pay
  • Google Pay
  • Identity (@capacitor-community/stripe-identity)
  • Terminal(@capacitor-community/stripe-terminal)
@rdlabo
Copy link
Member

rdlabo commented Aug 30, 2024

Please check out our demo.It has been available on the Web since v6.2.0.
https://github.com/capacitor-community/stripe/releases/tag/v6.2.0

@kyleabens
Copy link
Author

@rdlabo I'm having a hard time seeing if I need to add something else for it work on web. I'm on v6.2.1 and I can confirm the below promise never resolves or throws an error.

await StripeTerminal.discoverReaders({
    type: TerminalConnectTypes.Internet,
    locationId: ***********
 });

@kyleabens
Copy link
Author

Could it be because TerminalEventsEnum.RequestedConnectionToken listener never fires after await StripeTerminal.initialize({ isTest: false }) ?

@rdlabo
Copy link
Member

rdlabo commented Aug 30, 2024

First, this “Expect Happy Path - Internet” can discover the device (it's my device at hand, so it's offline).

https://capacitor-community-stripe.netlify.app/tabs/terminal

I can guess that the locationId is wrong, the token is wrong, etc., but I confirm that the plugin itself works.

@kyleabens
Copy link
Author

Where can I see the code for that specific "Expect Happy Path - Internet" demo ? I can never get it to fire on the browser but I can on the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants