catarse_pagarme 2.14.2 → 2.14.3
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/controllers/catarse_pagarme/credit_cards_controller.rb +1 -0
- data/app/models/catarse_pagarme/antifraud_order_wrapper.rb +2 -1
- data/app/models/catarse_pagarme/credit_card_transaction.rb +1 -1
- data/lib/catarse_pagarme/version.rb +1 -1
- data/spec/models/catarse_pagarme/antifraud_order_wrapper_spec.rb +3 -1
- data/spec/models/catarse_pagarme/credit_card_transaction_spec.rb +1 -1
- 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: 520199477c1059f4e458f4881b6cd4d0a8f2d168
|
|
4
|
+
data.tar.gz: 49fe125c2389cee318180307d16c65fc44aa21e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af8960a447fb8f14d4949c045f5dfa71218d400fabf608ef560fb0eea3c728222a792f9c187919088619e6a5e559c8657428bbe1a83b422c9afead42e1df6966
|
|
7
|
+
data.tar.gz: 533b29a47b7a6ee81f369c27c0d0251fba4897f092e920efd231a44b130d65312555ebd231eafb24d2e067ec2886dca66a639c64b93f2e7364cc6062dc992bda
|
data/Gemfile.lock
CHANGED
|
@@ -40,6 +40,7 @@ module CatarsePagarme
|
|
|
40
40
|
soft_descriptor: payment.project.permalink.gsub(/[\W\_]/, ' ')[0, MAX_SOFT_DESCRIPTOR_LENGTH],
|
|
41
41
|
installments: get_installment,
|
|
42
42
|
customer: {
|
|
43
|
+
id: contribution.user.id,
|
|
43
44
|
email: contribution.user.email,
|
|
44
45
|
name: contribution.user.name,
|
|
45
46
|
document_number: document_number,
|
|
@@ -72,7 +72,8 @@ module CatarsePagarme
|
|
|
72
72
|
def customer_attributes
|
|
73
73
|
customer = self.attributes.dig(:customer)
|
|
74
74
|
{
|
|
75
|
-
id: customer[:
|
|
75
|
+
id: customer[:id].to_s,
|
|
76
|
+
tax_id: customer[:document_number],
|
|
76
77
|
name: customer[:name],
|
|
77
78
|
email: customer[:email],
|
|
78
79
|
phone1: customer[:phone].to_h.values.join,
|
|
@@ -151,6 +151,7 @@ describe CatarsePagarme::AntifraudOrderWrapper do
|
|
|
151
151
|
let(:attributes) do
|
|
152
152
|
{
|
|
153
153
|
customer: {
|
|
154
|
+
id: 123,
|
|
154
155
|
document_number: '1234',
|
|
155
156
|
name: 'John Appleseed',
|
|
156
157
|
email: 'john@example.com',
|
|
@@ -169,7 +170,8 @@ describe CatarsePagarme::AntifraudOrderWrapper do
|
|
|
169
170
|
it 'builds customer attributes' do
|
|
170
171
|
customer_attributes = subject.__send__(:customer_attributes)
|
|
171
172
|
|
|
172
|
-
expect(customer_attributes[:id]).to eq '
|
|
173
|
+
expect(customer_attributes[:id]).to eq '123'
|
|
174
|
+
expect(customer_attributes[:tax_id]).to eq '1234'
|
|
173
175
|
expect(customer_attributes[:name]).to eq 'John Appleseed'
|
|
174
176
|
expect(customer_attributes[:email]).to eq 'john@example.com'
|
|
175
177
|
expect(customer_attributes[:phone1]).to eq '858585858585'
|
|
@@ -252,7 +252,7 @@ describe CatarsePagarme::CreditCardTransaction do
|
|
|
252
252
|
before { allow(card_transaction.antifraud_wrapper).to receive(:send).and_raise(exception) }
|
|
253
253
|
|
|
254
254
|
it 'captures exception with Raven' do
|
|
255
|
-
expect(Raven).to receive(:capture_exception).with(exception)
|
|
255
|
+
expect(Raven).to receive(:capture_exception).with(exception, { level: 'fatal' })
|
|
256
256
|
|
|
257
257
|
card_transaction.process_antifraud
|
|
258
258
|
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.3
|
|
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-03-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: countries
|