nexio_activemerchant 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dfb690b171aa84d521a855689a86cc301b580820564b6d510d800cda2bdd686f
4
- data.tar.gz: e8328d6c3d67a4bae931833627ee611722b0dfd3c29f288c6e50bd34aeefba4f
3
+ metadata.gz: 0f44a453d72f2121e52164b85b924aa086d441558aa3f22cc7d2241511010032
4
+ data.tar.gz: dc4d091cdfa3c9bb022a8c14174e6cf90f475269064d318fc22c3f7f77bc5b51
5
5
  SHA512:
6
- metadata.gz: 9db4a030573f29a2e6e94a7f9a3d4c44022741a4d792bc2d04f55c1fe84ef72f5e54088670ac88502456ff21f04f599cd06a1d1981b0575f50cc5443e6f0c8e7
7
- data.tar.gz: b865b5f47ab674b4dc1e823887bb1461f2fd8c3b90aa791776da518dec9feb729b13949aeb0767269fe6bf0b0b248272ba4eee33d85203bd22c1390abf0db431
6
+ metadata.gz: 1a2ec833d7ccfb02324d692692a748ab6d800119b4fe8601c17df38f8c8bafad80afb07a1531a69155d33785f7361d9ba63535ae2e70e326977a6607eb1be665
7
+ data.tar.gz: 5915f09f6038a1861d103e4dcdfdb8b961eb518f4f8dfbacc2139f4607f8d8f963256a2b79f211b0bf127c0d623c3e86adedd06e4c8f385dfbd1c0d2bc0eeda9
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Whitespectre
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -38,6 +38,8 @@ module ActiveMerchant
38
38
 
39
39
  def purchase(money, payment, options = {})
40
40
  post = build_payload(options)
41
+ post[:processingOptions] ||= {}
42
+ post[:processingOptions][:verboseResponse] = true if test?
41
43
  add_invoice(post, money, options)
42
44
  add_payment(post, payment, options)
43
45
  add_order_data(post, options)
@@ -48,16 +50,17 @@ module ActiveMerchant
48
50
  purchase(money, payment, options.merge(payload: options.fetch(:payload, {}).merge(isAuthOnly: true)))
49
51
  end
50
52
 
51
- def capture(_money, _authorization, _options = {})
52
- commit('capture', post)
53
+ def capture(money, authorization, _options = {})
54
+ commit('capture', { id: authorization, data: { amount: amount(money).to_f } })
53
55
  end
54
56
 
55
- def refund(_money, _authorization, _options = {})
56
- commit('refund', post)
57
+ def refund(money, authorization, _options = {})
58
+ commit('refund', { id: authorization, data: { amount: amount(money).to_f } })
57
59
  end
60
+ alias credit refund
58
61
 
59
- def void(_authorization, _options = {})
60
- commit('void', post)
62
+ def void(authorization, _options = {})
63
+ commit('void', { id: authorization })
61
64
  end
62
65
 
63
66
  def verify(credit_card, options = {})
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NexioActivemerchant
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
@@ -7,6 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.version = NexioActivemerchant::VERSION
8
8
  spec.authors = %w[Whitespectre]
9
9
  spec.email = %w[hello@whitespectre.com]
10
+ spec.licenses = %w[MIT]
10
11
 
11
12
  spec.summary = 'ActiveMechant gateway for Nexio'
12
13
  spec.homepage = 'https://github.com/whitespectre/nexio_activemerchant'
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.1.0
4
+ version: 0.1.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-07-15 00:00:00.000000000 Z
11
+ date: 2021-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -51,6 +51,7 @@ files:
51
51
  - ".travis.yml"
52
52
  - CHANGELOG
53
53
  - Gemfile
54
+ - LICENSE
54
55
  - README.md
55
56
  - Rakefile
56
57
  - bin/console
@@ -61,7 +62,8 @@ files:
61
62
  - lib/nexio_activemerchant/version.rb
62
63
  - nexio_activemerchant.gemspec
63
64
  homepage: https://github.com/whitespectre/nexio_activemerchant
64
- licenses: []
65
+ licenses:
66
+ - MIT
65
67
  metadata:
66
68
  homepage_uri: https://github.com/whitespectre/nexio_activemerchant
67
69
  source_code_uri: https://github.com/whitespectre/nexio_activemerchant