activemerchant-argus 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2793fae26729cb151dd4f86b71d5a2c841904fd5120c8d2e16d7c27c528408e9
4
- data.tar.gz: 59cc6da76085b5409ecd2c589d64a01d6b5ec44cc6e12e772084829805683bc4
3
+ metadata.gz: 66e5755776db2a474e3355eee467443d973c8eeec6a0b45027364bf32120f00f
4
+ data.tar.gz: 49cd673ef854bd2891fb60b62e0d08ed29c7b0d09f1477dd91309c1cb2fcffb0
5
5
  SHA512:
6
- metadata.gz: 88268731ca98162da5e403e0e88262d650e3dfd6506c3015349d39a40baa3d52ba2f444263429f07e73ebb0aad65c9dfd281b63aba5bf13967fdc5ff353dcf62
7
- data.tar.gz: 74d597b09f70cb3d4fbba77d7bcc1c9b441cece93a42c0af3a31fe77bd2415354f9b3bb8f23d1796b49009e592f9516446542b70110d8d7a26326f26c8b9a98e
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
@@ -1,5 +1,5 @@
1
1
  module ActiveMerchant
2
2
  module Argus
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -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] = 3.6
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.3.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-02-10 00:00:00.000000000 Z
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.2.15
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