nexio_activemerchant 0.2.4 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_merchant/billing/gateways/nexio.rb +11 -13
- data/lib/nexio_activemerchant/version.rb +1 -1
- 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: b4be2109f95bb02681d52e4eba82df056b917147789135cddd63a9c824305e20
|
4
|
+
data.tar.gz: d12fb306b4071d6b6edace569875566da64a4aee4e639e8d8bca21ea80656f7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc116a66f2c7365cbcd784fd81219b33566356bd558746048d47a5edad75f15467530eb80ed8052b7d601e629400a2740b5321a4c77570620918bc9b0cbf6e47
|
7
|
+
data.tar.gz: e96a8b271d7a9d95dc545e91cd03a09b7cf91f3e242840236ae5dd1bd54a8f3dc945de117b02fe5bf3f59fcf0bd4cad34dab683e8500d7ee54841c4ab3dd35db
|
@@ -172,15 +172,12 @@ module ActiveMerchant
|
|
172
172
|
def add_address(post, data, prefix)
|
173
173
|
return post if data.blank?
|
174
174
|
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
"#{prefix}Postal": data[:zip],
|
182
|
-
"#{prefix}State": data[:state]
|
183
|
-
})
|
175
|
+
{
|
176
|
+
AddressOne: :address1, AddressTwo: :address2, City: :city,
|
177
|
+
Country: :country, Phone: :phone, Postal: :zip, State: :state
|
178
|
+
}.each do |suffix, key|
|
179
|
+
post[:data][:customer]["#{prefix}#{suffix}"] = data[key].to_s
|
180
|
+
end
|
184
181
|
end
|
185
182
|
|
186
183
|
def add_payment(post, payment, options)
|
@@ -189,7 +186,7 @@ module ActiveMerchant
|
|
189
186
|
post[:card] = {
|
190
187
|
cardHolderName: payment.name,
|
191
188
|
cardType: payment.brand
|
192
|
-
}
|
189
|
+
}.merge!(post.fetch(:card, {}))
|
193
190
|
end
|
194
191
|
post[:processingOptions] ||= {}
|
195
192
|
post[:processingOptions][:merchantId] = self.options[:merchant_id].to_s
|
@@ -254,6 +251,7 @@ module ActiveMerchant
|
|
254
251
|
network_transaction_id: payload['id']
|
255
252
|
)
|
256
253
|
rescue ResponseError => e
|
254
|
+
logger&.error e.response.body
|
257
255
|
error_payload = parse(e.response.body)
|
258
256
|
Response.new(
|
259
257
|
false,
|
@@ -277,7 +275,7 @@ module ActiveMerchant
|
|
277
275
|
end
|
278
276
|
|
279
277
|
def post_data(_action, parameters = {})
|
280
|
-
parameters.to_json
|
278
|
+
{ merchantId: options[:merchant_id] }.merge(parameters).to_json
|
281
279
|
end
|
282
280
|
|
283
281
|
def commit_action_url(action, _parameters)
|
@@ -306,8 +304,8 @@ module ActiveMerchant
|
|
306
304
|
CVVResult.new(data.fetch('gatewayMessage', {}).fetch('cvvresponse', nil))
|
307
305
|
end
|
308
306
|
|
309
|
-
def build_payload(
|
310
|
-
{ data: { customer: {} } }.merge!(
|
307
|
+
def build_payload(params)
|
308
|
+
{ data: { customer: {} } }.merge!(params.fetch(:payload, {}))
|
311
309
|
end
|
312
310
|
|
313
311
|
def base_headers(custom = {})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexio_activemerchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Whitespectre
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|