capacitor-community / stripe

Stripe Mobile SDK wrapper for Capacitor
MIT License
185 stars 74 forks source link

plugin is not working as it is refering to latest Capacitor version #72

Closed wandexer closed 2 years ago

wandexer commented 3 years ago

Describe the bug The plugin cannot be used after installing due to this error: Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'. [ng] Types of property 'Plugins' are incompatible. [ng] Property 'Stripe' is missing in type '{ [pluginName: string]: { [prop: string]: any; }; }' but required in type 'PluginRegistry'. [ng] 16 export interface CapacitorInstance extends CapacitorGlobal { [ng] ~~~~~ [ng] ../../node_modules/@capacitor-community/stripe/dist/esm/definitions.d.ts:3:9 [ng] 3 Stripe: StripePlugin; [ng] ~~ [ng] 'Stripe' is declared here.

The root cause I suppose is the dependency to the "latest" version of capacitor, which is now 3 since it got released. And apparently the mentioned interface got changed.

To Reproduce Steps to reproduce the behavior:

  1. Install the plugin
  2. Try to start the application

Expected behavior Should run ;-)

Additional context I would propose not to refer to the 'latest' version of a dependency in package.json but being deterministic instead (in this case ^3). And it would be great to have a version compatible with Cap 3. :-)

danielehrhardt commented 3 years ago

https://github.com/capacitor-community/stripe/pull/74

rdlabo commented 2 years ago

Thanks for issue! Today this plugin of v3 is released. This not compatible with v1. All APIs have been revamped. So I will close this issue. If you still have the same problem, please create a new Issue. Thank you.

rdlabo commented 2 years ago

@wandexer @danielehrhardt Did you adapt this plugin for production? If yes, please tell us what app. Please help us to develop this plugin in 2022. https://github.com/capacitor-community/stripe/issues/145 Thanks.