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

Migration guide from v1 to v3 #86

Closed
nkCreation opened this issue Jul 23, 2021 · 5 comments
Closed

Migration guide from v1 to v3 #86

nkCreation opened this issue Jul 23, 2021 · 5 comments

Comments

@nkCreation
Copy link

First of all, thank you for your amazing work here. I've seen a lot of changes and glad to see it, running under latest specs.

However, I have an ionic capacitor angular 12 app running Stripe with the version 1 of this plugin.
Today I started to migrate all the things from capacitor 2 to capacitor 3.

When it comes to Stripe, I see that everything changed and consequence here is I think I have to adjust the backend of my app or create new endpoint because of breaking changes?

I used createCardToken, setPublishableKey, payWithGooglePay, payWithApplePay, finalizeApplePayTransaction methods... but all of them have been removed.

Also, regarding your screenshots, I fear that my app will have UI changes with the update : I already have a good designed payment form with all the required fields, which I used to pass to creadCardToken before.

Maybe a migration guide is necessary here for people like me looking to update. In short: If I can't update to v3 here, Will I be able to update to capacitor 3?

Thank your for reading!

@rdlabo
Copy link
Member

rdlabo commented Jul 23, 2021

@nkCreation Good Morning.

  1. I think I have to adjust the backend of my app or create new endpoint

Yes. Plugin of v1 is using secret key at frontend. This is not recommend, and we must use endpoint in backend:
#74 (comment)

I fear that my app will have UI changes with the update

That's right. Now this plugin support payment sheet only, and you can't use previous design.

Will I be able to update to capacitor 3?

Not technically impossible, but

  • Put secret key in frontend is danger
  • Developers should not have the user's credit card information directly, they should all be tokenized

So we don't recommend and support.

Thanks.

@nkCreation
Copy link
Author

actually in my app the payment is set in the backend, the only key I used in the front end. is the publishable key but ok, I will edit my back end code.

I'll write an article after that.

thank you

@rdlabo
Copy link
Member

rdlabo commented Jul 26, 2021

Yes, v3's important things is secure that we can't get user's card information. Only get card token.
I am looking forward to your article.
Thank you.

@rdlabo rdlabo closed this as completed Aug 3, 2021
@rdlabo
Copy link
Member

rdlabo commented Jan 19, 2022

@nkCreation Did you adapt this plugin for production? If yes, please tell us what app. Please help us to develop this plugin in 2022.
#145
Thanks.

@hcassar93
Copy link

actually in my app the payment is set in the backend, the only key I used in the front end. is the publishable key but ok, I will edit my back end code.

I'll write an article after that.

thank you

We're in a similar situation moving over from Stripe cordova. Would very much appreciate your advice. How did you end up resolving this issue? We want to maintain the ability to use createCardToken so cards can be added to users accounts using our existing UI. We're storing the secret key on the backend obviously.

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

3 participants