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.

Access CVC number in onCardChange callback

See original GitHub issue

In relation with issue #280, we need access to the CVC value since we are only using CardField component to collect data and then calling Stripe API directly.

Describe the solution you’d like Expose CVC value when dangerouslyGetFullCardDetails is set to true (like with the card number).

Thanks! Tomas.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ARYX01commented, Aug 20, 2021

hello, one question if I want to create a new card and not a payment method, what is the difference there?

1reaction
tlubercommented, Jul 16, 2021

No, sorry for the misunderstanding, we are calling it from the server. We have an endpoint to create and attach a payment method to a customer. From Stripe API docs we have:

$ curl https://api.stripe.com/v1/payment_methods \
  -u sk_test_51H8WLmFZLWFKLoPguk07LKrquk5OgArCSHBzDwORI1FMAmbUwws1OEQNCjWNmorEvt6cfv4icW4dnmTSObzCZolf00GqZNXbsZ: \
  -d type=card \
  -d "card[number]"=4242424242424242 \
  -d "card[exp_month]"=7 \
  -d "card[exp_year]"=2022 \
  -d "card[cvc]"=314

For this reason, we need to access the CVC value, which is highly recommended that it always be included.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Accept a payment
Use the onCardChange callback to inspect non-sensitive information about the card, like the brand, and whether the details are complete.
Read more >
jQuery Credit Card Validator and Type Predictor
Enter each card number into the demo above to see it work! Type, Number. Visa, 4012 8888 8888 1881. MasterCard, 5105 1051 0510...
Read more >
Stripe with React Native (frontend) and Laravel 8 (backend ...
Use the onCardChange callback to inspect non-sensitive information about the card, ... and any random CVC number, to create a successful payment.
Read more >
@stripe/stripe-react-native
If no object is provided (undefined), then it is assumed that the payment method ... React hook for accessing functions on the Financial...
Read more >
Card field and Card form - Flutter Stripe - docs.page
Use one official libraries for access to the Stripe API from your server. ... Use them with any CVC, postal code, and future...
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