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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e53eda5d6ccdddcea690828e229ba3394e8e77a9
4
- data.tar.gz: e373c06e1db98242f323025d7f1c34cdaf6fa037
3
+ metadata.gz: 61c2bf782aeacdeb0c93a5e06a862b5b02bb7e5b
4
+ data.tar.gz: 41a402486183b89177923e381485c0fcab589f6d
5
5
  SHA512:
6
- metadata.gz: c83520ae92126d2e7417782200d19bfb8fdfa5f7215ba0c1fb49ca987d1027364352b8fbf6b58647552a501e65874c0ea84acac976a4747f1251847a5c112460
7
- data.tar.gz: a57c93e0422ae48a8bf58fa284c71045cc9d609db29d1f31cb4abe6b2abbdc5f6d8cd5e690223804d6908ac88dae6cc7d926d1005fd31bd06466c863cb5f1c45
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
- = select_tag :payment_card_installments, options_for_select(installments_for_select(@contribution)), class: 'w-select text-field text-field-creditcard'
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
@@ -1,3 +1,3 @@
1
1
  module CatarsePagarme
2
- VERSION = "2.1.1"
2
+ VERSION = "2.2.0"
3
3
  end
@@ -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: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antônio Roberto Silva