catarse_pagarme 1.2.0 → 1.3.0
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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/models/catarse_pagarme/transaction_base.rb +1 -0
- data/app/views/catarse_pagarme/pagarme/review.html.slim +2 -1
- data/lib/catarse_pagarme/version.rb +1 -1
- data/spec/models/catarse_pagarme/credit_card_transaction_spec.rb +4 -0
- data/spec/models/catarse_pagarme/slip_transaction_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 638ed0fa16b63b057fbf99c525553c8737794bf9
|
|
4
|
+
data.tar.gz: fe77b675106d307361fb4b9928a781cab8bae64a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 66945b41c8220623f4418cfa389ad1ddee2d1f5c69846363a9385576639e310cad4a7663c36a527cc4924f2b2dcdb4a6ec3455127e657fd5619849dd41430e78
|
|
7
|
+
data.tar.gz: ca918d368c9dc1c1b5365c67830e74e7d95f5616c52f4dbb1c12a0d9ce0f8cfbe72ef64f7523b79a1be896fca83983dec2da1c98236f8460a15aa3679aca7dc7
|
data/Gemfile.lock
CHANGED
|
@@ -27,6 +27,7 @@ module CatarsePagarme
|
|
|
27
27
|
payment_method: 'Pagarme',
|
|
28
28
|
slip_url: self.transaction.boleto_url,
|
|
29
29
|
installments: (self.transaction.installments || 1),
|
|
30
|
+
installment_value: (delegator.value_with_installment_tax(self.transaction.installments || 1) / 100),
|
|
30
31
|
acquirer_name: self.transaction.acquirer_name,
|
|
31
32
|
acquirer_tid: self.transaction.tid
|
|
32
33
|
}
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
.radio_button
|
|
32
32
|
= radio_button_tag :payment_subscription_card, credit_card.subscription_id, { checked: (i == 0) }
|
|
33
33
|
.select_installments
|
|
34
|
-
|
|
34
|
+
- if @contribution.value >= CatarsePagarme.configuration.minimum_value_for_installment
|
|
35
|
+
= select_tag :payment_card_installments, options_for_select(installments_for_select(@contribution))
|
|
35
36
|
.card_info
|
|
36
37
|
= "XXXX.XXXX.XXXX.#{credit_card.last_digits}"
|
|
37
38
|
.card_brand
|
|
@@ -74,6 +74,10 @@ describe CatarsePagarme::CreditCardTransaction do
|
|
|
74
74
|
it "should update contribution acquirer_tid" do
|
|
75
75
|
expect(contribution.acquirer_tid).to eq('123123')
|
|
76
76
|
end
|
|
77
|
+
|
|
78
|
+
it "should update contribution installment_value" do
|
|
79
|
+
expect(contribution.installment_value).to_not be_nil
|
|
80
|
+
end
|
|
77
81
|
end
|
|
78
82
|
end
|
|
79
83
|
|
|
@@ -106,6 +106,10 @@ describe CatarsePagarme::SlipTransaction do
|
|
|
106
106
|
it "should update contribution acquirer_tid" do
|
|
107
107
|
expect(contribution.acquirer_tid).to eq('123123')
|
|
108
108
|
end
|
|
109
|
+
|
|
110
|
+
it "should update contribution installment_value" do
|
|
111
|
+
expect(contribution.installment_value).to_not be_nil
|
|
112
|
+
end
|
|
109
113
|
end
|
|
110
114
|
end
|
|
111
115
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: catarse_pagarme
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Antônio Roberto Silva
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-10-
|
|
12
|
+
date: 2014-10-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|