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

stripe-terminal v3, capacitor v5 and bugfixes #129

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

zolfariot
Copy link

@zolfariot zolfariot commented Jan 23, 2024

Several updates moving from 3.0.0-beta.8

Compatibility

  • Drop compatibility with Android < 8.0 (API <26) - StripeTerminal 3.x requirement
  • Drop compatibility with iOS < 13.0 - Capacitor 5.x requirement

Changes

  • Migration of the plugin to Capacitor 5.x
  • Bump StripeTerminal SDK to 3.2.x on Android (and migrate code base to new SDK interface)
  • Bump StripeTerminal SDK to 3.2.x on iOS (and migrate code base to new SDK interface)

Fixes

ToDo

  • Embedded discovery/reader
  • Bump StripeTerminal SDK on iOS
  • Test on iOS
  • Test on Android (currently only tested with Tap-to-Pay on Android, used in production)

npmjs fork and instruction for testing

Since this repository is not very actively maintained at the moment, I had to create a fork on npmjs to facilitate testing and deployment of my patches in my products.

To use the fork based on this PR on your project, you simply have to:

npm r capacitor-stripe-terminal
npm i zolfa-nd2reader@3.0.0-beta.10

And replace any occurrence of

import { ... } from 'capacitor-stripe-terminal';

with

import { ... } from 'zolfa-capacitor-stripe-terminal';

Obviously once the patch will be available in this upstream repository I will be happy to remove the npmjs fork.

Lorenzo Zolfanelli and others added 11 commits January 22, 2024 21:11
BREAKING CHANGE
Android < 8.0 not supported any more.

Migrated usage of the SDK according to https://stripe.com/docs/terminal/references/sdk-migration-guide?terminal-sdk-platform=android
JavaScript interface not changed.
Android Material >= 1.10.0 requires targetSdk 34,
but Capacitor 5.x is not compatible with targetSdk 34.
BREAKING CHANGE
iOS < 13.0 not supported any more as Capacitor requirement.
Migrate SDK usage according to:
https://stripe.com/docs/terminal/references/sdk-migration-guide

ToDo:

Handle configuration exceptions properly in the Builder pattern enforced by the
3.x Stripe Terminal SDK.
@zolfariot zolfariot changed the title stripe-terminal-android 3.2, capacitor 5 and bugfixes stripe-terminal v3, capacitor v5 and bugfixes Jan 23, 2024
@kyleabens
Copy link

@zolfariot I ran npm i zolfa-capacitor-stripe-terminal and then tried to build in Android studio and it failed with multiple errors. What's the best way for me to include your build containing support for tap to pay on Android?

@zolfariot
Copy link
Author

@kyleabens I am currently using my patched version in production with capacitor 5, gradle 8.0 and targetSdk 33.

I will have very soon to test and upgrade my apps to the latest capacitor and android SDK, and at that point I will take care of fixing my patch, if feasible within acceptable efforts for a side, unpaid project (end of August / first half of September as approximate ETA).

Also, since there is an alternative plugin that may be more actively developed (https://github.com/capacitor-community/stripe), I think we should take in consideration the hypothesis of abandoning the eventOne one when/if the alternative offer all the same features. At the moment it does not seem the case but if you haven't already you could try it

@kyleabens
Copy link

@zolfariot I tried it but it's lacking some important things such as listening for firmware updates and additional card reader info like battery status and type of device etc.

@nprail
Copy link
Member

nprail commented Aug 7, 2024

Unfortunately, I have not had time to put effort into updating this plugin over the past year or so. I do technically still use the plugin but the app I use it on I also haven't updated in awhile. I would recommend moving to the better maintained Capacitor Community version, if you can, including contributing PRs to that one rather than this one. I will probably deprecate this plugin in the near future.

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

Successfully merging this pull request may close these issues.

Tap to Pay for Android wrong status enum used converting to js
3 participants