14 ms·
jQuery.payment
- kt9 14y agoThe thing I love about stripe is that they're so focused on building the best customer experience and software that solves customer problems!
- southphillyman 14y agohallelujah
- jpdoctor 14y ago> The thing I love about stripe is that they're so focused on building the best customer experience and software that solves customer problems! As long as your customer problems are not about low fees or ACH, that is.
- borski 14y agoThe JS load is failing on this page. :( Failed to load resource: the server responded with a status of 403 (Forbidden) https://raw.github.com/stripe/jquery.payment/master/lib/jquery.payment.js Uncaught TypeError: Object [object Object] has no method 'formatCardNumber' jquery-payment:50
- oellegaard 14y agoRefresh fixed that for me.
- borski 14y agoHm. I'm still getting the 403. I emailed them just in case.
- daviddoran 14y agoSame here. Might be due to serving from raw.github.com. AFAIK it's not meant to be used as a CDN.
- maccman 14y agoFixed! Thanks for the heads up.
- jordan_clark 14y agoVery nice. They just keep making it easier and easier to use their service. Good job @stripe!
- niggler 14y agoEDIT 2: appears that the issue was fixed: https://github.com/stripe/jquery.payment/issues/1 https://github.com/stripe/jquery.payment/issues/1 Original Message: The card number is not linked to the CVV length: 343725117665768 is a valid american express number (generated from http://www.getcreditcardnumbers.com/ http://www.getcreditcardnumbers.com/) Their CVV numbers are 4 digits, yet the inputs 343725117665768 12 / 21 123 seems to pass ... EDIT: filed issue: https://github.com/stripe/jquery.payment/issues/1 https://github.com/stripe/jquery.payment/issues/1
- mauro_oto 14y agoAlso, you can enter "12/999" as expiry date, YYY. This probably just means some of the validations are done after data is submitted.
- maccman 14y agoThat's correct, we don't stop people entering invalid dates -- we just validate them after they do so.
- pc 14y agoWe make it easy to do card type-specific CVC validation: $.validateCardCVC('1234', 'amex'); More at https://github.com/stripe/jquery.payment https://github.com/stripe/jquery.payment.
- niggler 14y agoI would think a combined validateCardAndCVV (taking both the card number and the CVV) would be the correct approach here ...
- deleted 14y ago[deleted]
- sethist 14y agoThis looks nice, but I ran into an immediate usability issue. The Card Expiry requires a leading 0 for January. It seems like bad UI to prevent a user from enter 1/13 or 1/2013 in those fields.
- maccman 14y agoWe don't prevent that. If you type '1/' the library turns it into '01 / '.
- sethist 14y agoFair enough, I haven't dug into the code yet. I was basing my comment on the live demo which prevents it.
- dasil003 14y agoHuh? If you literally type '1/13' into the live demo it works as one would expect. '113' works too, it just assumes the month is eleven, and the year starts with 3.
- sethist 14y agoI was referring to the live demo at http://stripe.github.com/jquery.payment/example/ http://stripe.github.com/jquery.payment/example/. Either way, I wouldn't consider the library interpreting 113 as 11/3 as a "working".
- mey 14y agoThere are several incorrect assumptions about this library Cards can be up to 19 digits Bin ranges are constantly updated, so cardType in static code is a broken concept. I expect in the future American Express will issues cards longer then 15 digits. Minimun card length is 13 digits not 10 I don't feel like validating the luhn check, but historically I've seen systems that don't correctly handle the luhn check of variable sizes. Edit: Reference material http://en.wikipedia.org/wiki/Bank_card_number http://en.wikipedia.org/wiki/Bank_card_number If you are actually getting into credit card processing, please talk to your acquirer about data feeds of this type of info on bin ranges. Edit 2: Wikipedia claims Maestro has 12 digit cards, but I've never seen one in the wild, I could be wrong about 13, but it's the assumption we've made processing international payments.
- pc 14y ago(I work at Stripe.) Thanks. I don't think these are so much incorrect assumptions so much as things we should change if the world changes. 19-digit IINs are found on UnionPay, Maestro, and other international cards that Stripe doesn't support today. We might add support for them in the future. As to the others (e.g. American Express cards with more than 15 digits): we'll certainly add support if this changes.
- maccman 14y agoWe'll get UnionPay & Maestro support added shortly.
- badgar 14y ago> Thanks. I don't think these are so much incorrect assumptions so much as things we should change if the world changes. Is that not the definition of an assumption? Something you rely on being true and not changing, and which if it does change, requires reaction? These are incorrect assumptions. It's okay to have them, you don't have to be perfect, but don't redefine "assumption" because you're embarrassed.
- Skywing 14y ago
- batuhanicoz 14y agoThis may be useful with Node too. I wish it wasn't a jQuery plugin but a framework independent library. (I'm aware I can use jQuery on the server-side, but why load jQuery only for a credit card number validation library?) Other than that, this looks good. :)
- lbarrow 14y agoHow does this compare with https://github.com/PawelDecowski/jQuery-CreditCardValidator/ https://github.com/PawelDecowski/jQuery-CreditCardValidator/?
- remear 14y agoNo formatting occurs when input is pasted into the field. Is this by design?
- ceejayoz 14y agoThe readme shows a `$.fn.formatCardNumber()` function, so I'd guess they left whether to manipulate the user input up to you.
- alpb 14y agoThis is why I love Stripe, thanks for contributing bits and pieces to Open Source world!
- nirvdrum 14y agoSupporting 4 digit years might help on the usability front. I'm probably a special case, but I forgot what the format was, as it disappears immediately upon clicking on the field, and naively went with a 4 digit format. There's no helpful error message on the demo page either -- the field just highlights in red. I don't immediately how much is just how that form was constructed vs. what's done in the JS lib.
- TazeTSchnitzel 14y agoThe fields seem nice, but use the cursor keys to edit and they fall apart.
- deadbeef404 14y agoJust because I like breaking things; they've tried to stop text getting into the fields by typing/pasting in the fields. A way around it is to highlight text/characters in the browser or the address bar etc and drag them into the field.
- fijal 14y agoany hope for us poor souls that dwell outside of the United States?
- theycallmemorty 14y agoIsn't it bad form to add 7 functions to the jQuery plugin 'namespace' in a single plugin?