PluginProbe
Omise Payments / 3.7
Omise Payments v3.7
7.2.1 7.2.0 trunk 1.2.3 3.0 3.1 3.10 3.11 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4.0 4.1 4.10 4.11 4.12 4.13 4.14 4.15 4.15.1 All 97 releases
omise / assets / javascripts / omise-util.js

omise-util.js in Omise Payments 3.7, at assets/javascripts/omise-util.js

30 lines 661 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var OmiseUtil = new function(){
2 var _validate_card = function(card){
3 var errors = [];
4 if(!card.name || card.name==""){
5 errors.push("Card holder's name is required");
6 }
7
8 if(!card.number || card.number==""){
9 errors.push("Card number is required");
10 }
11
12 if(!card.expiration_month || card.expiration_month==""){
13 errors.push("Expiry month is required");
14 }
15
16 if(!card.expiration_year || card.expiration_year==""){
17 errors.push("Expiry year is required");
18 }
19
20 if(!card.security_code || card.security_code==""){
21 errors.push("Security code is required");
22 }
23
24 return errors;
25 };
26
27 return {
28 validate_card: _validate_card
29 }
30 }