activemerchant-argus 0.3.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/lib/active_merchant/argus/version.rb +1 -1
- data/lib/active_merchant/billing/gateways/argus.rb +18 -1
- metadata +5 -4
- 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
|
|
@@ -39,6 +39,7 @@ module ActiveMerchant #:nodoc:
|
|
|
39
39
|
add_address(post, payment, options)
|
|
40
40
|
add_customer_data(post, options)
|
|
41
41
|
add_3ds_auth(post, options)
|
|
42
|
+
add_stored_credential_options(post, options)
|
|
42
43
|
|
|
43
44
|
commit('CCAUTHCAP', post)
|
|
44
45
|
end
|
|
@@ -50,6 +51,7 @@ module ActiveMerchant #:nodoc:
|
|
|
50
51
|
add_address(post, payment, options)
|
|
51
52
|
add_customer_data(post, options)
|
|
52
53
|
add_3ds_auth(post, options)
|
|
54
|
+
add_stored_credential_options(post, options)
|
|
53
55
|
|
|
54
56
|
commit('CCAUTHORIZE', post)
|
|
55
57
|
end
|
|
@@ -144,6 +146,21 @@ module ActiveMerchant #:nodoc:
|
|
|
144
146
|
post[:merch_acct_id] = @options[:merch_acct_id]
|
|
145
147
|
end
|
|
146
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
|
+
|
|
147
164
|
def parse(body)
|
|
148
165
|
JSON.parse(body)
|
|
149
166
|
rescue JSON::ParserError
|
|
@@ -199,7 +216,7 @@ module ActiveMerchant #:nodoc:
|
|
|
199
216
|
|
|
200
217
|
def post_data(action, parameters = {})
|
|
201
218
|
parameters[:request_action] = action
|
|
202
|
-
parameters[:request_api_version] =
|
|
219
|
+
parameters[:request_api_version] = 4.4
|
|
203
220
|
parameters[:request_response_format] = 'JSON'
|
|
204
221
|
parameters.merge!(credentials).to_post_data
|
|
205
222
|
end
|
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
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemerchant
|
|
@@ -87,8 +87,9 @@ 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
|
|
@@ -120,7 +121,7 @@ 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
|
+
rubygems_version: 3.3.7
|
|
124
125
|
signing_key:
|
|
125
126
|
specification_version: 4
|
|
126
127
|
summary: Active Merchant extension to support Inovio payment gateway (f.k.a. Argus)
|
data/.travis
DELETED
|
File without changes
|