catarse_pagarme 2.16.2 → 2.16.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 +5 -5
- data/Gemfile.lock +1 -1
- data/app/models/catarse_pagarme/antifraud_order_wrapper.rb +22 -22
- data/lib/catarse_pagarme/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 2548a2bfc6c26f6f079bd48daec8f8c43ecb8d34
|
|
4
|
+
data.tar.gz: fb599855e3ee3eb2781435a8a593646ac65c7323
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bbe63f989ee9a0c6b0488b794cd7c74749f3e314f035e5e526b37e8a6940ee40343b6f9200211baa1a3956d28e033fa15d05c3066ac2523c24811af65bab9028
|
|
7
|
+
data.tar.gz: e8d539b1faf78690af42556e2a7b4b6440908b314b98213ff939717d9e86aeac4d117ca833c00278f254c17f657c740ac59968847f219cf7161af38a8b398e00
|
data/Gemfile.lock
CHANGED
|
@@ -59,9 +59,9 @@ module CatarsePagarme
|
|
|
59
59
|
|
|
60
60
|
def order_attributes
|
|
61
61
|
{
|
|
62
|
-
id: self.transaction.id.to_s,
|
|
62
|
+
id: self.transaction.id.to_s[0..99],
|
|
63
63
|
total_amount: self.attributes[:amount] / 100.0,
|
|
64
|
-
visitor: self.attributes.dig(:metadata, :contribution_id).to_s,
|
|
64
|
+
visitor: self.attributes.dig(:metadata, :contribution_id).to_s[0..40],
|
|
65
65
|
currency: 'BRL',
|
|
66
66
|
installments: self.attributes[:installments],
|
|
67
67
|
purchased_at: self.transaction.date_created,
|
|
@@ -74,10 +74,10 @@ module CatarsePagarme
|
|
|
74
74
|
tax_id = customer[:document_number].present? ? { tax_id: customer[:document_number] } : {}
|
|
75
75
|
|
|
76
76
|
{
|
|
77
|
-
id: customer[:id].to_s,
|
|
78
|
-
name: customer[:name],
|
|
79
|
-
email: customer[:email],
|
|
80
|
-
phone1: customer[:phone].to_h.values.join,
|
|
77
|
+
id: customer[:id].to_s[0..99],
|
|
78
|
+
name: customer[:name].to_s[0..99],
|
|
79
|
+
email: customer[:email].to_s[0..99],
|
|
80
|
+
phone1: customer[:phone].to_h.values.join.to_s[0..99],
|
|
81
81
|
created_at: self.attributes.dig(:antifraud_metadata, :register, :registered_at)
|
|
82
82
|
}.merge(tax_id)
|
|
83
83
|
end
|
|
@@ -95,33 +95,33 @@ module CatarsePagarme
|
|
|
95
95
|
def billing_address_attributes
|
|
96
96
|
billing_data = self.attributes.dig(:antifraud_metadata, :billing)
|
|
97
97
|
{
|
|
98
|
-
name: self.transaction.card.holder_name,
|
|
99
|
-
address1: billing_data.dig(:address, :street),
|
|
100
|
-
city: billing_data.dig(:address, :city),
|
|
101
|
-
state: billing_data.dig(:address, :state),
|
|
102
|
-
zip: billing_data.dig(:address, :zipcode),
|
|
103
|
-
country: billing_data.dig(:address, :country_code),
|
|
98
|
+
name: self.transaction.card.holder_name.to_s[0..99],
|
|
99
|
+
address1: billing_data.dig(:address, :street).to_s[0..254],
|
|
100
|
+
city: billing_data.dig(:address, :city).to_s[0..99],
|
|
101
|
+
state: billing_data.dig(:address, :state).to_s[0..99],
|
|
102
|
+
zip: billing_data.dig(:address, :zipcode).to_s[0..99],
|
|
103
|
+
country: billing_data.dig(:address, :country_code).to_s[0..1],
|
|
104
104
|
}
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
def shipping_address_attributes
|
|
108
108
|
shipping_data = self.attributes.dig(:antifraud_metadata, :shipping)
|
|
109
109
|
{
|
|
110
|
-
name: shipping_data.dig(:customer, :name),
|
|
111
|
-
address1: shipping_data.dig(:address, :street),
|
|
112
|
-
city: shipping_data.dig(:address, :city),
|
|
113
|
-
state: shipping_data.dig(:address, :state),
|
|
114
|
-
zip: shipping_data.dig(:address, :zipcode)
|
|
110
|
+
name: shipping_data.dig(:customer, :name).to_s[0..99],
|
|
111
|
+
address1: shipping_data.dig(:address, :street).to_s[0..254],
|
|
112
|
+
city: shipping_data.dig(:address, :city).to_s[0..99],
|
|
113
|
+
state: shipping_data.dig(:address, :state).to_s[0..99],
|
|
114
|
+
zip: shipping_data.dig(:address, :zipcode).to_s[0..99]
|
|
115
115
|
}
|
|
116
116
|
end
|
|
117
117
|
|
|
118
118
|
def item_attributes
|
|
119
119
|
shopping_cart_data = self.attributes.dig(:antifraud_metadata, :shopping_cart).first
|
|
120
120
|
{
|
|
121
|
-
sku: self.attributes.dig(:metadata, :contribution_id).to_s,
|
|
122
|
-
product_code: self.attributes.dig(:metadata, :contribution_id).to_s,
|
|
121
|
+
sku: self.attributes.dig(:metadata, :contribution_id).to_s[0..99],
|
|
122
|
+
product_code: self.attributes.dig(:metadata, :contribution_id).to_s[0..99],
|
|
123
123
|
category: 9999,
|
|
124
|
-
name: shopping_cart_data[:name],
|
|
124
|
+
name: shopping_cart_data[:name].to_s[0..99],
|
|
125
125
|
unit_cost: self.attributes[:amount] / 100.0,
|
|
126
126
|
quantity: 1,
|
|
127
127
|
created_at: self.attributes.dig(:metadata, :project_online).to_s[0..9]
|
|
@@ -131,8 +131,8 @@ module CatarsePagarme
|
|
|
131
131
|
def seller_attributes
|
|
132
132
|
event_data = self.attributes.dig(:antifraud_metadata, :events).first
|
|
133
133
|
{
|
|
134
|
-
id: event_data[:id],
|
|
135
|
-
name: event_data[:venue_name],
|
|
134
|
+
id: event_data[:id].to_s[0..99],
|
|
135
|
+
name: event_data[:venue_name].to_s[0..99],
|
|
136
136
|
created_at: event_data[:date]
|
|
137
137
|
}
|
|
138
138
|
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.16.
|
|
4
|
+
version: 2.16.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-09-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: countries
|
|
@@ -304,7 +304,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
304
304
|
- !ruby/object:Gem::Version
|
|
305
305
|
version: '0'
|
|
306
306
|
requirements: []
|
|
307
|
-
|
|
307
|
+
rubyforge_project:
|
|
308
|
+
rubygems_version: 2.6.14.1
|
|
308
309
|
signing_key:
|
|
309
310
|
specification_version: 4
|
|
310
311
|
summary: Integration with Pagar.me
|