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

Access CVC number in onCardChange callback #425

Closed
tluber opened this issue Jul 15, 2021 · 5 comments
Closed

Access CVC number in onCardChange callback #425

tluber opened this issue Jul 15, 2021 · 5 comments
Labels
question Further information is requested

Comments

@tluber
Copy link

tluber commented Jul 15, 2021

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.

@thorsten-stripe
Copy link
Contributor

@tluber what's the reason for calling the Stripe API directly? Are you doing this from the client. For PCI compliance reason we recommend to not do that.

@thorsten-stripe thorsten-stripe added the question Further information is requested label Jul 16, 2021
@tluber
Copy link
Author

tluber commented 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.

@thorsten-stripe
Copy link
Contributor

In most cases this should not be done on the server-side. Can you outline why you do this server-side rather than using confirmPayment or createPaymentMethod on the client-side as recommended?

@thorsten-stripe
Copy link
Contributor

Closing out due to inactivity.

@ARYX01
Copy link

ARYX01 commented Aug 20, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants