catarse_pagarme 2.14.11 → 2.14.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/controllers/catarse_pagarme/credit_cards_controller.rb +2 -0
- data/app/models/catarse_pagarme/credit_card_transaction.rb +2 -0
- data/lib/catarse_pagarme/version.rb +1 -1
- data/spec/models/catarse_pagarme/credit_card_transaction_spec.rb +12 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c52bfe0429ba2976126325031d6c5372a549e0e054e7b210d0771be827f6322a
|
4
|
+
data.tar.gz: 72f750266694d8661a6b807c9331f0ac1263679c743b0bb01b99ca9bbebf453b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 914fcfc46b1cb2a8a78ca6875552d6ef8de296449ef36033a0312661ec3dabf60028d20e42d75dc2112d3149964e368afa26f0e2b62be2a1cb56b961a689c3f7
|
7
|
+
data.tar.gz: 979286b6207d4af8d9cf93a4ee14099bc79a03361e02f8bf1825387e97c28d9a6380d7a0f0ead484b649f7676f5a147c6f36f9b714f319805bab483f0249a373
|
data/Gemfile.lock
CHANGED
@@ -76,7 +76,7 @@ describe CatarsePagarme::CreditCardTransaction do
|
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
79
|
-
context 'when
|
79
|
+
context 'when antifraud recommends decline transaction' do
|
80
80
|
let(:antifraud_outcome) { double(recommendation: :DECLINE) }
|
81
81
|
|
82
82
|
it 'refunds transaction' do
|
@@ -85,6 +85,16 @@ describe CatarsePagarme::CreditCardTransaction do
|
|
85
85
|
card_transaction.process!
|
86
86
|
end
|
87
87
|
end
|
88
|
+
|
89
|
+
context 'when antifraud recommends review transaction' do
|
90
|
+
let(:antifraud_outcome) { double(recommendation: :REVIEW) }
|
91
|
+
|
92
|
+
it 'notifies about pending review' do
|
93
|
+
expect(card_transaction.payment).to receive(:notify_about_pending_review)
|
94
|
+
|
95
|
+
card_transaction.process!
|
96
|
+
end
|
97
|
+
end
|
88
98
|
end
|
89
99
|
end
|
90
100
|
|
@@ -269,7 +279,7 @@ describe CatarsePagarme::CreditCardTransaction do
|
|
269
279
|
let(:antifraud_wrapper) { double }
|
270
280
|
|
271
281
|
context 'when @antifraud_wrapper isn`t nil' do
|
272
|
-
it 'returns @
|
282
|
+
it 'returns @antifraud_wrapper' do
|
273
283
|
card_transaction.instance_variable_set('@antifraud_wrapper', antifraud_wrapper)
|
274
284
|
expect(card_transaction.antifraud_wrapper).to eq antifraud_wrapper
|
275
285
|
end
|
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.14.
|
4
|
+
version: 2.14.12
|
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: 2020-
|
12
|
+
date: 2020-04-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: countries
|