activemerchant-argus 0.1.0 → 0.4.0
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 +4 -4
- data/.github/workflows/ci.yaml +21 -0
- data/.github/workflows/daily.yaml +23 -0
- data/README.md +1 -1
- data/active_merchant-argus.gemspec +1 -1
- data/lib/active_merchant/argus/version.rb +1 -1
- data/lib/active_merchant/billing/gateways/argus.rb +31 -4
- metadata +13 -12
- data/.travis +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66e5755776db2a474e3355eee467443d973c8eeec6a0b45027364bf32120f00f
|
4
|
+
data.tar.gz: 49cd673ef854bd2891fb60b62e0d08ed29c7b0d09f1477dd91309c1cb2fcffb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a91a1572f79cdb11d886dbc7063f749fbf4faab257cb1d919d99d614f422d4a6439f0916f8204bfd7074e5951fb29e1faab520c3882b4d4d870b733999873ab
|
7
|
+
data.tar.gz: 42ce6ad9811ad39e875e1780f31cc003556bb04afaf08ff274022ff2f2c3cc48b007e7db6914a567a12b4455de1019a9cc73432ffce9f2037717804e8aeba255
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
name: ci
|
4
|
+
|
5
|
+
on: [push]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
name: test
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
|
15
|
+
- uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: 2.7.2
|
18
|
+
bundler-cache: true
|
19
|
+
|
20
|
+
- name: Run tests
|
21
|
+
run: bundle exec rake test:units
|
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
name: ci
|
4
|
+
|
5
|
+
on:
|
6
|
+
schedule:
|
7
|
+
- cron: '1 1 * * *'
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
name: test
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
|
17
|
+
- uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: 2.7.2
|
20
|
+
bundler-cache: true
|
21
|
+
|
22
|
+
- name: Run tests
|
23
|
+
run: bundle exec rake test:units
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency 'activemerchant'
|
26
26
|
|
27
27
|
spec.add_development_dependency "bundler", "~> 2.0"
|
28
|
-
spec.add_development_dependency "rake"
|
28
|
+
spec.add_development_dependency "rake"
|
29
29
|
spec.add_development_dependency('test-unit', '~> 3')
|
30
30
|
spec.add_development_dependency('mocha', '~> 1')
|
31
31
|
end
|
@@ -6,8 +6,8 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
class ArgusGateway < Gateway
|
7
7
|
include Empty
|
8
8
|
|
9
|
-
self.test_url = 'https://
|
10
|
-
self.live_url = 'https://
|
9
|
+
self.test_url = 'https://api.inoviopay.com/payment/pmt_service.cfm'
|
10
|
+
self.live_url = 'https://api.inoviopay.com/payment/pmt_service.cfm'
|
11
11
|
|
12
12
|
self.supported_countries = ['US']
|
13
13
|
self.default_currency = 'USD'
|
@@ -38,6 +38,8 @@ module ActiveMerchant #:nodoc:
|
|
38
38
|
add_payment(post, payment)
|
39
39
|
add_address(post, payment, options)
|
40
40
|
add_customer_data(post, options)
|
41
|
+
add_3ds_auth(post, options)
|
42
|
+
add_stored_credential_options(post, options)
|
41
43
|
|
42
44
|
commit('CCAUTHCAP', post)
|
43
45
|
end
|
@@ -48,6 +50,8 @@ module ActiveMerchant #:nodoc:
|
|
48
50
|
add_payment(post, payment)
|
49
51
|
add_address(post, payment, options)
|
50
52
|
add_customer_data(post, options)
|
53
|
+
add_3ds_auth(post, options)
|
54
|
+
add_stored_credential_options(post, options)
|
51
55
|
|
52
56
|
commit('CCAUTHORIZE', post)
|
53
57
|
end
|
@@ -91,6 +95,14 @@ module ActiveMerchant #:nodoc:
|
|
91
95
|
|
92
96
|
private
|
93
97
|
|
98
|
+
def add_3ds_auth(post, options)
|
99
|
+
if options[:three_d_secure]
|
100
|
+
post[:p3ds_eci] = options.dig(:three_d_secure, :eci)
|
101
|
+
post[:p3ds_cavv] = options.dig(:three_d_secure, :cavv)
|
102
|
+
post[:p3ds_xid] = options.dig(:three_d_secure, :xid)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
94
106
|
def add_customer_data(post, options)
|
95
107
|
post[:cust_email] = options[:email] unless empty?(options[:email])
|
96
108
|
post[:cust_fname] = options[:first_name]
|
@@ -134,6 +146,21 @@ module ActiveMerchant #:nodoc:
|
|
134
146
|
post[:merch_acct_id] = @options[:merch_acct_id]
|
135
147
|
end
|
136
148
|
|
149
|
+
def add_stored_credential_options(post, options)
|
150
|
+
return unless options[:stored_credential]
|
151
|
+
|
152
|
+
post[:mbshp_id_xtl] = options[:stored_credential][:network_transaction_id] if options[:stored_credential][:network_transaction_id]
|
153
|
+
|
154
|
+
post[:trans_rebill_type] = options[:stored_credential][:initial_transaction] ? 'INITIAL' : 'REBILL'
|
155
|
+
|
156
|
+
case options[:stored_credential][:reason_type]
|
157
|
+
when 'trial'
|
158
|
+
post[:trans_rebill_type] = 'TRIAL'
|
159
|
+
when 'unscheduled'
|
160
|
+
post[:trans_rebill_type] = 'NONE'
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
137
164
|
def parse(body)
|
138
165
|
JSON.parse(body)
|
139
166
|
rescue JSON::ParserError
|
@@ -189,8 +216,8 @@ module ActiveMerchant #:nodoc:
|
|
189
216
|
|
190
217
|
def post_data(action, parameters = {})
|
191
218
|
parameters[:request_action] = action
|
192
|
-
parameters[:request_api_version] =
|
193
|
-
|
219
|
+
parameters[:request_api_version] = 4.4
|
220
|
+
parameters[:request_response_format] = 'JSON'
|
194
221
|
parameters.merge!(credentials).to_post_data
|
195
222
|
end
|
196
223
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemerchant-argus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piers Chambers
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: test-unit
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,15 +80,16 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1'
|
83
|
-
description:
|
83
|
+
description:
|
84
84
|
email:
|
85
85
|
- piers@varyonic.com
|
86
86
|
executables: []
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
+
- ".github/workflows/ci.yaml"
|
91
|
+
- ".github/workflows/daily.yaml"
|
90
92
|
- ".gitignore"
|
91
|
-
- ".travis"
|
92
93
|
- ".travis.yml"
|
93
94
|
- Gemfile
|
94
95
|
- LICENSE.txt
|
@@ -105,7 +106,7 @@ homepage: https://github.com/varyonic/activemerchant-argus
|
|
105
106
|
licenses:
|
106
107
|
- MIT
|
107
108
|
metadata: {}
|
108
|
-
post_install_message:
|
109
|
+
post_install_message:
|
109
110
|
rdoc_options: []
|
110
111
|
require_paths:
|
111
112
|
- lib
|
@@ -120,8 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
121
|
- !ruby/object:Gem::Version
|
121
122
|
version: '0'
|
122
123
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
124
|
-
signing_key:
|
124
|
+
rubygems_version: 3.3.7
|
125
|
+
signing_key:
|
125
126
|
specification_version: 4
|
126
127
|
summary: Active Merchant extension to support Inovio payment gateway (f.k.a. Argus)
|
127
128
|
test_files: []
|
data/.travis
DELETED
File without changes
|