catarse_moip 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 939e9fad48215b2efdaacf53db8696ad8d6ab572
|
4
|
+
data.tar.gz: 53255c7c2e8e5301bd0a0823251db91d7caa8c04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c523a1ff0f803108715949eb5b56168c8d8359d1cd5be9de98c2e13b564b6d62c7feeb60a40d2ec41003c340f8288ec91d5139bd93686ce90e151b8581e70e9f
|
7
|
+
data.tar.gz: b592ddcc0892f1947778775d0784a794568ddac326f37ece0d9da5ebe0882debb6e8513a1080c99e7f4c5d794272ab6aa9722b5ad4b63a1d591690f0140bfa83
|
data/Gemfile.lock
CHANGED
@@ -10,6 +10,7 @@ App.views.MoipForm.addChild('PaymentCard', _.extend({
|
|
10
10
|
activate: function(options){
|
11
11
|
// Set credit card fields masks
|
12
12
|
this.moipForm = this.parent;
|
13
|
+
this.$('#payment_card_number').payment('formatCardNumber');
|
13
14
|
window.app.maskAllElements();
|
14
15
|
},
|
15
16
|
|
@@ -51,19 +52,6 @@ App.views.MoipForm.addChild('PaymentCard', _.extend({
|
|
51
52
|
},
|
52
53
|
|
53
54
|
getCardFlag: function(number) {
|
54
|
-
|
55
|
-
|
56
|
-
if ((/^(34|37)/).test(cc) && cc.length == 15) {
|
57
|
-
return 'AMEX'; //AMEX begins with 34 or 37, and length is 15.
|
58
|
-
} else if ((/^(51|52|53|54|55)/).test(cc) && cc.length == 16) {
|
59
|
-
return 'MASTER'; //MasterCard beigins with 51-55, and length is 16.
|
60
|
-
} else if ((/^(4)/).test(cc) && (cc.length == 13 || cc.length == 16)) {
|
61
|
-
return 'VISA'; //VISA begins with 4, and length is 13 or 16.
|
62
|
-
} else if ((/^(300|301|302|303|304|305|36|38)/).test(cc) && cc.length == 14) {
|
63
|
-
return 'DINERS'; //Diners Club begins with 300-305 or 36 or 38, and length is 14.
|
64
|
-
} else if ((/^(38)/).test(cc) && cc.length == 19) {
|
65
|
-
return 'HIPER';
|
66
|
-
}
|
67
|
-
return '';
|
55
|
+
return $.payment.cardType(number).toUpperCase();
|
68
56
|
}
|
69
57
|
}, App.views.MoipForm.UserDocument));
|
@@ -14,6 +14,11 @@ App.views.MoipForm.addChild('PaymentSlip', _.extend({
|
|
14
14
|
onBuildBoletoClick: function(e){
|
15
15
|
var that = this;
|
16
16
|
e.preventDefault();
|
17
|
+
|
18
|
+
if(!that.moipForm.validate()){
|
19
|
+
return false;
|
20
|
+
}
|
21
|
+
|
17
22
|
$(e.currentTarget).hide();
|
18
23
|
this.$('#payment-slip-instructions').slideUp('slow');
|
19
24
|
that.moipForm.loader.show();
|
@@ -23,18 +23,18 @@
|
|
23
23
|
| Por favor digite o nome escrito no cartão
|
24
24
|
.w-col.w-col-6.cpf
|
25
25
|
= label_tag :payment_card_cpf, "CPF", class: 'field-label fontweight-semibold'
|
26
|
-
= text_field_tag :payment_card_cpf, nil, class: 'w-input text-field', data: {
|
26
|
+
= text_field_tag :payment_card_cpf, nil, class: 'w-input text-field', data: {fixed_mask: '999.999.999-99'}, required: true
|
27
27
|
.fontsize-smaller.text-error.u-marginbottom-20.fa.fa-exclamation-triangle.w-hidden[data-error-for="payment_card_cpf"]
|
28
28
|
| Verifique o CPF do titular do cartão
|
29
29
|
.w-row
|
30
30
|
.w-col.w-col-6.w-col-small-6.w-col-tiny-6.w-sub-col-middle.phone
|
31
31
|
= label_tag :payment_card_phone, "Telefone", class: 'field-label fontweight-semibold'
|
32
|
-
= text_field_tag :payment_card_phone, nil, class: 'w-input text-field', data: {
|
32
|
+
= text_field_tag :payment_card_phone, nil, class: 'w-input text-field', data: {fixed_mask: '(99) 9999-99999'}, required: true
|
33
33
|
.fontsize-smaller.text-error.u-marginbottom-20.fa.fa-exclamation-triangle.w-hidden[data-error-for="payment_card_phone"]
|
34
34
|
| Por favor digite o telefone de contato do titular
|
35
35
|
.w-col.w-col-6.w-col-small-6.w-col-tiny-6.birth
|
36
36
|
= label_tag :payment_card_birth, "Data de Nascimento", class: 'field-label fontweight-semibold'
|
37
|
-
= text_field_tag :payment_card_birth, nil, class: 'w-input text-field', data: {
|
37
|
+
= text_field_tag :payment_card_birth, nil, class: 'w-input text-field', data: {fixed_mask: '99/99/9999'}, required: true
|
38
38
|
.fontsize-smaller.text-error.u-marginbottom-20.fa.fa-exclamation-triangle.w-hidden[data-error-for="payment_card_birth"]
|
39
39
|
| Por favor digite a data de nascimento do titular
|
40
40
|
.w-row
|
@@ -57,7 +57,7 @@
|
|
57
57
|
| Veja o código de segurança do cartão abaixo da tarja magnética
|
58
58
|
.w-col.w-col-6.w-col-small-6.w-col-tiny-6.date
|
59
59
|
= label_tag :payment_card_date, 'Expiração', class: 'field-label fontweight-semibold'
|
60
|
-
= text_field_tag :payment_card_date, nil, class: 'w-input text-field', data: {
|
60
|
+
= text_field_tag :payment_card_date, nil, class: 'w-input text-field', data: {fixed_mask: '99/99'}, required: true
|
61
61
|
.fontsize-smaller.text-error.u-marginbottom-20.fa.fa-exclamation-triangle.w-hidden[data-error-for="payment_card_date"]
|
62
62
|
| Qual a data de expiração no cartão?
|
63
63
|
|
data/lib/catarse_moip/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: catarse_moip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antônio Roberto Silva
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-11-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|