capacitor-community / stripe

Stripe Mobile SDK wrapper for Capacitor
https://capacitor-community-stripe.netlify.app/
MIT License
196 stars 77 forks source link

Error: "Stripe" plugin is not implemented on ios #197

Closed aviral282 closed 2 years ago

aviral282 commented 2 years ago

Hello Everyone,

I am using the plugin to take one-time payments from the customer, the checkout is working fine on android and the web but giving an error on the iOS app built with capacitor

[error] - ERROR Error: Uncaught (in promise): Error: "Stripe" plugin is not implemented on ios s@capacitor://localhost/main.5024bff7c5c0584d42a9.js:1:577436

Error from Xcode :

Screenshot 2022-07-19 at 14 48 54

The app is running fine on the web and android. no problem with ephemeral key or payment intent I think.

Screenshot 2022-07-19 at 14 50 52

Do you have any idea what that could be ?

Thank you

rdlabo commented 2 years ago

Did you run npx cap update ios ?

aviral282 commented 2 years ago

I tried it now, but No luck. I removed the ios completely and added it again.

I investegated further, My iOS pod file does not have a stripe dependency in it. I manually added and updates the pod file with Pod update. Still no luck.

Am I missing some iOS configurations?

rdlabo commented 2 years ago

@aviral282 Plugin has pod dependency: https://github.com/capacitor-community/stripe/blob/master/CapacitorCommunityStripe.podspec#L16 https://github.com/capacitor-community/stripe/blob/master/ios/Podfile#L8

Please try to run:

  1. npx cap update ios
  2. cd ios/App
  3. pod update
aviral282 commented 2 years ago

Hello @rdlabo,

I tried and implemented the stripe in the pod file and updated it pod

This is my profile.lock validating the stripe installed successfully. podlock

But still, the app is not able to find the stripe plugin.

Am i missing any configurations in Xcode or app store connect to enable the stripe in the app? I have not issued any permission to the app.

rdlabo commented 2 years ago

Mumumu... I can't understand why. Please clone this repository, and try angular-demo: https://github.com/capacitor-community/stripe/tree/master/demo/angular

First, try it in an environment that works reliably.

AdiAditya0 commented 2 years ago

Hey @aviral282 , After looking at your podfile, it seems CapacitorCommunityStripe dependency has not been added. Can you please check the Stripe dependency path in the node_modules and add it in the podfile and try pod install?

Something like this

Screenshot 2022-07-22 at 12 14 20 AM

Hope it helps

aviral282 commented 2 years ago

@AdiAditya0 , Hello Aditya.

Thanks a million, it works now. I was missing the same reference for the 'CommunityStripe Plugin', I referenced it now. Works alright.

@rdlabo I wonder why the application was not able to pick up the reference automatically.

Thanks for the help.

rdlabo commented 2 years ago

@AdiAditya0 I had missed this one. Thanks!!!

@aviral282 It is automatically built on my end. But once you do a manual edit it can happen.

rdlabo commented 2 years ago

@aviral282 I'm glad you got it sorted out! Did you use this plugin for production? If yes, please tell us what app. This help development this plugin.

👉 https://github.com/capacitor-community/stripe/issues/145

Thanks.