nexio_activemerchant 0.2.0 → 0.2.1
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 +15 -2
- 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: ec3f8dfd4d750d78ce90d2df2b9c2af8d14c622812b7db61dab0c43fc333462e
|
4
|
+
data.tar.gz: 256160687602fed6e849a3e8ca5cd612fba287ca4a17354c422f44c0378d4dba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afdf43d4a69d9e31a2bc50b5d8e90015e812be6e7a21f8f81dde56391ce2612b2e61c17badc82c02813ac4c534e83d83fb392f81c8f6bd6e7cde71c5272d3c0a
|
7
|
+
data.tar.gz: 392b52af17aaa208f47f5a0c034836a9f45af7209b85b5e246c2b093c9cb0afd9f5907eecd24316be849f1a54118c1272b4eac471350f67e0eb88e9096ad16a7
|
@@ -42,6 +42,7 @@ module ActiveMerchant
|
|
42
42
|
post[:processingOptions][:verboseResponse] = true if test?
|
43
43
|
post[:processingOptions][:customerRedirectUrl] = options[:three_d_callback_url] if options.key?(:three_d_callback_url)
|
44
44
|
post[:processingOptions][:check3ds] = options[:three_d_secure]
|
45
|
+
post[:processingOptions][:paymentType] = options[:payment_type] if options.key?(:payment_type)
|
45
46
|
add_invoice(post, money, options)
|
46
47
|
add_payment(post, payment, options)
|
47
48
|
add_order_data(post, options)
|
@@ -111,6 +112,11 @@ module ActiveMerchant
|
|
111
112
|
commit('secret', { merchantId: options[:merchant_id].to_s }).params['secret']
|
112
113
|
end
|
113
114
|
|
115
|
+
def get_transaction(id)
|
116
|
+
parse(ssl_get(action_url("/transaction/v3/paymentId/#{id}"), base_headers))
|
117
|
+
rescue ResponseError => e
|
118
|
+
end
|
119
|
+
|
114
120
|
private
|
115
121
|
|
116
122
|
def add_invoice(post, money, options)
|
@@ -234,8 +240,7 @@ module ActiveMerchant
|
|
234
240
|
end
|
235
241
|
|
236
242
|
def commit(action, parameters)
|
237
|
-
payload = parse(ssl_post(commit_action_url(action, parameters), post_data(action, parameters),
|
238
|
-
Authorization: "Basic #{options[:auth_token]}"))
|
243
|
+
payload = parse(ssl_post(commit_action_url(action, parameters), post_data(action, parameters), base_headers))
|
239
244
|
|
240
245
|
Response.new(
|
241
246
|
response_status(action, payload),
|
@@ -281,6 +286,10 @@ module ActiveMerchant
|
|
281
286
|
else
|
282
287
|
"/pay/v3/#{action}"
|
283
288
|
end
|
289
|
+
action_url(path)
|
290
|
+
end
|
291
|
+
|
292
|
+
def action_url(path)
|
284
293
|
"#{test? ? test_url : live_url}#{path}"
|
285
294
|
end
|
286
295
|
|
@@ -299,6 +308,10 @@ module ActiveMerchant
|
|
299
308
|
def build_payload(options)
|
300
309
|
{ data: { customer: {} } }.merge!(options.fetch(:payload, {}))
|
301
310
|
end
|
311
|
+
|
312
|
+
def base_headers(custom = {})
|
313
|
+
{ Authorization: "Basic #{options[:auth_token]}" }
|
314
|
+
end
|
302
315
|
end
|
303
316
|
end
|
304
317
|
end
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Whitespectre
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|