Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is great, good work!

It looks like `token` is the only callback you can pass to the popup and it receives nothing but the stripe token. Is there any reason not to include more information?

For comparison, this is what stripe.js gives you

  {
    id : "tok_u5dg20Gra", // String of token identifier,
    card : { // Dictionary of the card used to create the token
      name: null,
      address_line1: "12 Main Street",
      address_line2: "Apt 42",
      address_city: "Palo Alto",
      address_state: "CA",
      address_zip: "94301",
      address_country: "US",
      country: "US",
      exp_month: 2,
      exp_year: 2012,
      last4: "4242",
      fingerprint: "BzXGiNioaEH4iECL",
      object: "card",
      type: "Visa"
    },
    created : 1358552058, // Integer of date token was created
    currency: "usd", // String currency that the token was created in
    livemode: true, // Boolean of whether this token was created with a live or test API key
    object: "token", // String identifier of the type of object, always "token"
    used : false, // Boolean of whether this token has been used,
  }
My app uses this information. So as much as I want to, I can't just drop in the new code.

I could use Stripe.getToken but I don't see why I need the extra roundtrips to the server (one for stripe.js, one for getting the info about the token)

Edit: Never mind, I didn't read the docs carefully enough. The callback receives all that, my bad. In the stripe.js docs the parameter is called response and in the new one it's called token. Sorry ;)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: