question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

createTokenWithCard() does not return card property on android

See original GitHub issue

In my Component, I have the following simplified handler for <PaymentCardTextField />

  handleSubmit = () => {
    stripe
      .createTokenWithCard(draftPayment)
      .then(response => {
        console.log(response)
      })
  };

The response object above contains the following on android

{
  tokenId: 'tok_19GCAQI5NuVQgnjeKNE32K0p',
  livemode: false,
  user: false 
}

But on iOS, it contains all the keys described in the docs

{
  tokenId: 'tok_19GCAQI5NuVQgnjeKNE32K0p',
  created: 1479236426,
  livemode: 0,
  card: {
    cardId: 'card_19GCAQI5NuVQgnjeRZizG4U3',
    brand: 'Visa',
    funding: 'credit',
    last4: '4242',
    ...
  }
}

Because the card property is missing, I am getting errors on the android app. However, this does not seem to be the case on iOS

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
isnifercommented, May 13, 2017

@paynd @itsmepetrov Please, take a look

0reactions
jasonnathancommented, Jun 27, 2017

thanks @paynd !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - createTokenWithCard() does not return card property ...
In my Component, I have the following simplified handler for <PaymentCardTextField /> handleSubmit = () => { stripe .createTokenWithCard(draftPayment) ...
Read more >
createTokenWithCard with tipsi-stripe does not return an error ...
When you say 'incorrect expiration date', do you mean a valid date(i.e. not in the past), but not the date that matches the...
Read more >
.paymentRequestWithCardForm(options) -> Promise · tipsi-stripe
Opens the Add Card view to to accept a payment. On success the returned object is a PaymentMethod.
Read more >
Stripe Payment In Flutter - FlutterDevs
In this method, you will be save your card details for your payments. RaisedButton( child: Text("Create Token with Card Form"), onPressed: () {...
Read more >
tipsi-stripe - npm
React Native Stripe binding for iOS/Android platforms. ... Store and from there you will see a button to update it (do not search...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found