stripe-archive / jquery.payment

[DEPRECATED] A general purpose library for building credit card forms, validating inputs and formatting numbers.
MIT License
3.53k stars 686 forks source link

Add support for "/" as card expiry separator, not solely " / " #232

Closed paulozoom closed 8 years ago

paulozoom commented 8 years ago

Other payment gateways, e.g Braintree, do not support MM / YYYY as expiry date, only MM/YYYY, without spaces around the slash.

jenanwise commented 8 years ago

Hi there @paulozoom. As noted in the readme and contributing guidelines, we're not currently accepting feature requests.

With respect to your particular question: I'm not sure what's missing? jquery.payment helps you format display values and spits out structured data. Whether the customer sees "MM / YYYY" vs "MM/YYYY" shouldn't affect how it gets sent to your payment provider:

$.payment.cardExpiryVal('03 / 2025'); //=> {month: 3, year: 2025}
paulozoom commented 8 years ago

The simplest implementation of the Braintree SDK reads the value of card fields on input and gets a payment nonce all by itself. There's a more low-level implementation which I'll switch to, though.

Question: would you accept a PR where an option for the MM/YY separator was a configurable option?

On 15 Jun 2016, at 19:16, Jenan Wise notifications@github.com wrote:

Closed #232.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

jenanwise commented 8 years ago

@paulozoom Probably not, sorry. I suspect it would add a bit of extra complexity on top of a mountain. Please see the readme for details! I think Braintree's integration is actually a better place to ask for looser inputs -- jquery.payment is opinionated about how things should be formatted, and we'd rather not add knobs to that.