catarse_pagarme 2.14.1 → 2.14.2
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 -2
- data/app/models/catarse_pagarme/antifraud_order_wrapper.rb +1 -1
- data/lib/catarse_pagarme/version.rb +1 -1
- data/spec/models/catarse_pagarme/antifraud_order_wrapper_spec.rb +2 -2
- 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: 53d7da14773e31bafc649c63b69a07de310dc842
|
4
|
+
data.tar.gz: 52984f3ffdc3550323314c35951eadf950568bb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a3909bb2232c566560c9fef2d6838ac02fc8598707b98bc5b6c55ae21417f725f99b2fbd817db0fcf387d7f62cc546a081573d723771d0e4efbd70cad5c2d52
|
7
|
+
data.tar.gz: 5d3024b3a4f507a81eb9b7e83e9c0235dc969bfff0320597c2cda049fbcbd454728837cc97ed6457fa6845498345c5e079ef1e5fdeb271871c7e6e0d905dd6a1
|
data/Gemfile.lock
CHANGED
@@ -78,11 +78,11 @@ module CatarsePagarme
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def document_number
|
81
|
-
card_owner_document = contribution.card_owner_document.try(:gsub, /[-.\/_\s]/, '')
|
82
81
|
user_document = contribution.user.cpf.try(:gsub, /[-.\/_\s]/, '')
|
82
|
+
card_owner_document = contribution.card_owner_document.try(:gsub, /[-.\/_\s]/, '')
|
83
83
|
fallback_document = '00000000000'
|
84
84
|
|
85
|
-
|
85
|
+
user_document || card_owner_document || fallback_document
|
86
86
|
end
|
87
87
|
|
88
88
|
def phone_matches
|
@@ -93,7 +93,7 @@ module CatarsePagarme
|
|
93
93
|
def billing_address_attributes
|
94
94
|
billing_data = self.attributes.dig(:antifraud_metadata, :billing)
|
95
95
|
{
|
96
|
-
name: self.
|
96
|
+
name: self.transaction.card.holder_name,
|
97
97
|
address1: billing_data.dig(:address, :street),
|
98
98
|
city: billing_data.dig(:address, :city),
|
99
99
|
state: billing_data.dig(:address, :state),
|
@@ -250,7 +250,7 @@ describe CatarsePagarme::AntifraudOrderWrapper do
|
|
250
250
|
}
|
251
251
|
end
|
252
252
|
|
253
|
-
let(:transaction) { double(card: double(country: 'BRAZIL')) }
|
253
|
+
let(:transaction) { double(card: double(country: 'BRAZIL', holder_name: 'holder name')) }
|
254
254
|
|
255
255
|
before do
|
256
256
|
subject.attributes = attributes
|
@@ -260,7 +260,7 @@ describe CatarsePagarme::AntifraudOrderWrapper do
|
|
260
260
|
it 'builds customer attributes' do
|
261
261
|
billing_address_attributes = subject.__send__(:billing_address_attributes)
|
262
262
|
|
263
|
-
expect(billing_address_attributes[:name]).to eq '
|
263
|
+
expect(billing_address_attributes[:name]).to eq 'holder name'
|
264
264
|
expect(billing_address_attributes[:address1]).to eq 'R. A'
|
265
265
|
expect(billing_address_attributes[:city]).to eq 'New City'
|
266
266
|
expect(billing_address_attributes[:state]).to eq 'NC'
|
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.2
|
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-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: countries
|