summaryrefslogtreecommitdiff
path: root/addons/website_payment/static/src/js
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2013-11-08 16:50:54 +0100
committerThibault Delavallée <tde@openerp.com>2013-11-08 16:50:54 +0100
commitc5aea42e126c6bed7b4a973dd3d41712fdac8622 (patch)
tree40c6f1a3e15b5b20c2e584062416e06194cf6eec /addons/website_payment/static/src/js
parent825c6ec7c32bb668866cf5df2412c581beba7b79 (diff)
[IMP] website_payment: wip work to add credit card front-end management + jquery.payment library use
bzr revid: tde@openerp.com-20131108155054-t4wsnvfu5eb0o3hf
Diffstat (limited to 'addons/website_payment/static/src/js')
-rw-r--r--addons/website_payment/static/src/js/payment_acquirer.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/addons/website_payment/static/src/js/payment_acquirer.js b/addons/website_payment/static/src/js/payment_acquirer.js
new file mode 100644
index 00000000000..0b0a2369c4e
--- /dev/null
+++ b/addons/website_payment/static/src/js/payment_acquirer.js
@@ -0,0 +1,12 @@
+$(document).ready(function () {
+
+ $('input#cc_number').payment('formatCardNumber');
+ $('input#cc_cvc').payment('formatCardCVC');
+ $('input#cc_expiry_mm').payment('restrictNumeric');
+ $('input#cc_expiry_yy').payment('restrictNumeric');
+
+ $('input#cc_number').on('focusout', function (e) {
+ var valid_value = $.payment.validateCardNumber(this.value);
+ console.log('check: ', valid_value);
+ });
+});