catarse_pagarme 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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 +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61c2bf782aeacdeb0c93a5e06a862b5b02bb7e5b
|
4
|
+
data.tar.gz: 41a402486183b89177923e381485c0fcab589f6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca9ecb21c70b6ade346eb16d61f9bdd59358b501461fed872321d00246f7f9f7bc3532421579d2e74f7b6e57acdec56873f2b69a2119a1994968903d24b8f9b4
|
7
|
+
data.tar.gz: 7a58d56542cf54bafc8d26ee660cff4a5e37774caf077690cfb050eed7dbda30c206376ea43a1d873b02d40aa76d9288f2cf65d3c73111d43135ad4cb34914cb
|
@@ -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
|
}
|
@@ -30,7 +30,8 @@
|
|
30
30
|
.fontsize-small.fontweight-semibold.u-marginbottom-20
|
31
31
|
= "XXXX.XXXX.XXXX.#{credit_card.last_digits}"
|
32
32
|
.w-col.w-col-4
|
33
|
-
|
33
|
+
- if @contribution.value >= CatarsePagarme.configuration.minimum_value_for_installment
|
34
|
+
= select_tag :payment_card_installments, options_for_select(installments_for_select(@contribution)), class: 'w-select text-field text-field-creditcard'
|
34
35
|
.w-row.creditcard-records
|
35
36
|
.w-col.w-col-1
|
36
37
|
.w-radio.w-clearfix.back-payment-credit-card-radio-field
|
@@ -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
|
|