capacitor-stripe-terminal icon indicating copy to clipboard operation
capacitor-stripe-terminal copied to clipboard

stripe-terminal v3, capacitor v5 and bugfixes

Open zolfariot opened this issue 1 year ago • 4 comments

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

  • Fixes #128
  • Fixes #126

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 [email protected]

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.

zolfariot avatar Jan 23 '24 00:01 zolfariot

@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?

kyleabens avatar Aug 05 '24 15:08 kyleabens

@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

zolfariot avatar Aug 05 '24 17:08 zolfariot

@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.

kyleabens avatar Aug 05 '24 17:08 kyleabens

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.

nprail avatar Aug 07 '24 22:08 nprail