catarse_pagarme 2.4.0 → 2.4.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee4dc707bf4336ffd8e4b1fd9f21101299dd576c
|
4
|
+
data.tar.gz: 767f387e062a1c4ebdcafee108fb29ff2decd0ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0031bd2ef70ac03f7f156eb0362ef7b926d8d0e147220dda7c7b6f81760201830f0e347ee4fcab61926b82e23db2263ca9af16d924e708b70b83a7a55bb1011
|
7
|
+
data.tar.gz: e8f515de2dd656db36b026a335961a224180a1c1d47ccd2186d7cc122ede091857e01c79d8f00bcb12fcacafd44ac2830a83f0fed278a0e40bf0e473aa2af835
|
@@ -10,6 +10,10 @@ module CatarsePagarme::FeeCalculatorConcern
|
|
10
10
|
if acquirer_name == 'stone'
|
11
11
|
self.contribution.installments > 1 ? tax_calc_for_installment(stone_tax) : tax_calc(stone_tax)
|
12
12
|
else
|
13
|
+
if self.transaction.card_brand == 'amex'
|
14
|
+
self.contribution.installments > 1 ? tax_calc_for_installment(cielo_installment_amex_tax) : tax_calc(cielo_installment_not_amex_tax)
|
15
|
+
end
|
16
|
+
|
13
17
|
current_tax = self.transaction.card_brand == 'diners' ? installment_diners_tax : installment_not_diners_tax
|
14
18
|
self.contribution.installments > 1 ? tax_calc_for_installment(current_tax) : tax_calc(cielo_tax)
|
15
19
|
end
|
@@ -50,5 +54,13 @@ module CatarsePagarme::FeeCalculatorConcern
|
|
50
54
|
CatarsePagarme.configuration.cielo_installment_not_diners_tax.to_f
|
51
55
|
end
|
52
56
|
|
57
|
+
def cielo_installment_amex_tax
|
58
|
+
CatarsePagarme.configuration.cielo_installment_amex_tax.to_f
|
59
|
+
end
|
60
|
+
|
61
|
+
def cielo_installment_not_amex_tax
|
62
|
+
CatarsePagarme.configuration.cielo_installment_not_amex_tax.to_f
|
63
|
+
end
|
64
|
+
|
53
65
|
end
|
54
66
|
end
|
@@ -2,7 +2,8 @@ module CatarsePagarme
|
|
2
2
|
class Configuration
|
3
3
|
attr_accessor :api_key, :slip_tax, :credit_card_tax, :interest_rate, :host, :subdomain, :protocol,
|
4
4
|
:max_installments, :minimum_value_for_installment, :credit_card_cents_fee, :pagarme_tax, :stone_tax,
|
5
|
-
:cielo_tax, :cielo_installment_diners_tax, :cielo_installment_not_diners_tax
|
5
|
+
:cielo_tax, :cielo_installment_diners_tax, :cielo_installment_not_diners_tax,
|
6
|
+
:cielo_installment_amex_tax, :cielo_installment_not_amex_tax
|
6
7
|
|
7
8
|
def initialize
|
8
9
|
self.api_key = ''
|
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.4.
|
4
|
+
version: 2.4.1
|
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:
|
12
|
+
date: 2015-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|