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

Breaking change between v1.4 and v1.5 #32

Open
alexghr opened this issue Aug 24, 2017 · 3 comments
Open

Breaking change between v1.4 and v1.5 #32

alexghr opened this issue Aug 24, 2017 · 3 comments

Comments

@alexghr
Copy link

alexghr commented Aug 24, 2017

Hi,

We've encountered a problem after upgrading cordova-plugin-stripe from v1.4.0 to v1.5.3. The createCardToken method no longer returns a string as it did in v1.4.0 but a full object. This is a breaking API change and should not exist in a minor version bump. Can you please update the readme with the new type information?

Thanks

@desmondcain
Copy link

Specifying a type of any worked for me since it no longer returns a string.

this.stripe.createCardToken(card)
    .then((res: any) => console.log(res));

@brianlittmann
Copy link

Yea, this was a bummer to hit. In the meantime, my workaround is thus:

let tokenId = (typeof token === "object" ? token.id : token)

@ihadeed
Copy link
Member

ihadeed commented Sep 11, 2017

Sorry for the breaking change. You're right, it should've been a major release.

I updated the typings here, I'll update Ionic Native soon.

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

4 participants