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

The premise under "Features" seems false #21

Open
jhalborg opened this issue Apr 3, 2018 · 2 comments
Open

The premise under "Features" seems false #21

jhalborg opened this issue Apr 3, 2018 · 2 comments

Comments

@jhalborg
Copy link

jhalborg commented Apr 3, 2018

Hello,

It seems to me that the premises under "Features" are false:

"Collect credit card information and convert it to a Stripe token in a single line of Javascript"

As far as I understand the library, it does not offer any tools to collect card information (checkout flow, UI elements or the like), but should instead read

"Convert credit card information to a Stripe token in a single line of Javascript"

  • at least for now? Maybe the library and readme was started with this in mind, but hasn't gotten that far yet?
@slorber
Copy link

slorber commented Apr 10, 2018

@jhalborg you can collect card data with https://github.com/sbycrosz/react-native-credit-card-input and then send that data with this lib, get a token and send it to your backend.

  handleConfirm = () => {
    const {onCreditCardToken} = this.props;
    const {
      form: {
        values: {
          number,
          expiry,
          cvc,
        }
      }
    } = this.state;
    const stripe = getStripeClient();
    const card = {
      "number": number,
      "exp_month": expiry.split("/")[0],
      "exp_year": "20" + expiry.split("/")[1],
      "cvc": cvc
    };
    console.debug("Stripe createToken",card);
    const tokenPromise = stripe.createToken({
      card,
    });
    ...
  };

@jhalborg
Copy link
Author

jhalborg commented Apr 17, 2018

Sure, or build it from the ground up :-) But that still makes the statement

"Collect credit card information and convert it to a Stripe token in a single line of Javascript"

false ;-)

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

2 participants