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.

No response when card number is wrong with createTokenWithCard()

See original GitHub issue

hi guys, so basically i installed stripe yesterday, and it worked quite well on both android and IOS, but i got an issue like this. I used createTokenWithCard() and i tried test card number (4242 4242 4242 4242) with correct expiration date and cvc and it worked fine, it returned token for me. But when i changed to incorrect test card number or invalid expiration date, nothing happened. Even when i used catch, it didn’t return error or anything. Here’s my code, many thanks:

  stripe
        .createTokenWithCard(params)
        .then(response => {
          console.log("response", response);
        })
        .catch(error => {
          console.log("error", error);
        });

Enviroment

“react-native”: “^0.55.4” “tipsi-stripe”: “^5.6.0”

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sonnt2510commented, Dec 24, 2018

Sorry for late response, i had this issue in ios device only, and i fixed by followed this instruction (#392) You need to add promiseRejector = reject; in ios/TPSStripe/TPSStripeManager.m

0reactions
giteekasawlanicommented, Dec 22, 2018

Sorry for replied late, i had this issue in ios device only, and i fixed by followed this instruction (#392) You need to add promiseRejector = reject; in ios/TPSStripe/TPSStripeManager.m

Yes, I exactly did same, added code manually. and its working. Thanks for reply.

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
Create a card token – curl - Stripe API reference
Creates a single-use token that represents a credit card's details. This token can be used in place ... The card number, as a...
Read more >
Error Code 14: Invalid Card Number - PaymentCloud
It often means the terminal user made a small mistake when keying in the card information, and one or more digits are incorrect....
Read more >
What Is an Invalid Card Number Error? - PayJunction Support
An invalid card number means that the card is likely closed at the card issuing bank and is effectively an invalid card. If...
Read more >
.createTokenWithCard(params) -> Promise · tipsi-stripe
Key Type Description number (Required) String The card's number expMonth (Required) Number The card's expiration month expYear (Required) Number The card's expiration year
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