workarea-authorize_cim 2.1.1 → 2.1.2

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: 98ad3cc3e60ada0ea06874e4812e8662025b835164ae125021cf871fd3297283
4
- data.tar.gz: ca368555567dd8e872ecea930cae55299611c32944ba91b9abf5a6b9e87c49cb
3
+ metadata.gz: e0ada37d925b0c0b57593307b63aa8d0d9a9748db08a11432e096b283bf17302
4
+ data.tar.gz: 8724b723d44c984162533525232d04b57ef43eef8072fda70f754db6d3a4bb9e
5
5
  SHA512:
6
- metadata.gz: 609df8ecaec28dda3f8ac786c341968f0cc0b81a33897aeea7f6f255a8519c2c69dc0bf33d3a8919f1cf1a9fa6f2b928f9a4c15bd8f8317561133958c2f498b4
7
- data.tar.gz: 07664126c865c13bdf42bc81769f930e2695eff2003cae548004180fe50abfbb3010a835dcad1b514370df47921d9c3efba93c9857b67c21896dc7f762cad8a8
6
+ metadata.gz: c0a9aecace831f976166d832b8286d8cb955e4e7dc6745baf5c274d2cc9581d2a20d4143f041d09b13e3a2ab668ecf4b517352f1472f2108269ab9812219fba5
7
+ data.tar.gz: 285d3146cf7487cebdcbef11e031482c3c5dfddcfcb1daae4687692935b9952fb353cacdfaf47166e4db482d40dbe0b742309be827738bfd7c18ccfdbe0fde6d
@@ -0,0 +1,35 @@
1
+ {
2
+ "extends": "eslint:recommended",
3
+ "rules": {
4
+ "semi": ["error", "always"],
5
+ "eqeqeq": ["error", "always"]
6
+ },
7
+ "globals": {
8
+ "window": true,
9
+ "document": true,
10
+ "WORKAREA": true,
11
+ "$": true,
12
+ "jQuery": true,
13
+ "_": true,
14
+ "feature": true,
15
+ "JST": true,
16
+ "Turbolinks": true,
17
+ "I18n": true,
18
+ "Chart": true,
19
+ "Dropzone": true,
20
+ "strftime": true,
21
+ "Waypoint": true,
22
+ "wysihtml": true,
23
+ "LocalTime": true,
24
+ "describe": true,
25
+ "after": true,
26
+ "afterEach": true,
27
+ "before": true,
28
+ "beforeEach": true,
29
+ "it": true,
30
+ "expect": true,
31
+ "sinon": true,
32
+ "fixture": true,
33
+ "chai": true
34
+ }
35
+ }
@@ -0,0 +1,57 @@
1
+ name: CI
2
+ on: [push]
3
+
4
+ jobs:
5
+ static_analysis:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v1
9
+ - uses: workarea-commerce/ci/bundler-audit@v1
10
+ - uses: workarea-commerce/ci/rubocop@v1
11
+ - uses: workarea-commerce/ci/eslint@v1
12
+ with:
13
+ args: '**/*.js'
14
+
15
+ admin_tests:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v1
19
+ - uses: actions/setup-ruby@v1
20
+ with:
21
+ ruby-version: 2.6.x
22
+ - uses: workarea-commerce/ci/test@v1
23
+ with:
24
+ command: bin/rails app:workarea:test:admin
25
+
26
+ core_tests:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v1
30
+ - uses: actions/setup-ruby@v1
31
+ with:
32
+ ruby-version: 2.6.x
33
+ - uses: workarea-commerce/ci/test@v1
34
+ with:
35
+ command: bin/rails app:workarea:test:core
36
+
37
+ storefront_tests:
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v1
41
+ - uses: actions/setup-ruby@v1
42
+ with:
43
+ ruby-version: 2.6.x
44
+ - uses: workarea-commerce/ci/test@v1
45
+ with:
46
+ command: bin/rails app:workarea:test:storefront
47
+
48
+ plugins_tests:
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - uses: actions/checkout@v1
52
+ - uses: actions/setup-ruby@v1
53
+ with:
54
+ ruby-version: 2.6.x
55
+ - uses: workarea-commerce/ci/test@v1
56
+ with:
57
+ command: bin/rails app:workarea:test:plugins
data/.gitignore CHANGED
@@ -11,3 +11,4 @@ Gemfile.lock
11
11
  .DS_STORE
12
12
  coverage
13
13
  test/reports
14
+ .rubocop-http*
@@ -1,13 +1,3 @@
1
- inherit_from: .rails-rubocop.yml
1
+ inherit_from:
2
+ - https://raw.githubusercontent.com/workarea-commerce/workarea/master/.rubocop.yml
2
3
 
3
- AllCops:
4
- Exclude:
5
- - 'vendor/bundle/**/*'
6
- - 'test/dummy/**/*'
7
- - 'bin/**/*'
8
-
9
- Style/StringLiterals:
10
- Enabled: false
11
-
12
- Style/FrozenStringLiteralComment:
13
- Enabled: false
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "stylelint-config-recommended-scss",
3
+ "rules": {
4
+ "block-no-empty": null,
5
+ "no-descending-specificity": null,
6
+ "property-no-unknown": [true, { "ignoreProperties": ["mso-hide"] }]
7
+ }
8
+ }
@@ -1,3 +1,54 @@
1
+ Workarea Authorize Cim 2.1.2 (2020-06-01)
2
+ --------------------------------------------------------------------------------
3
+
4
+ * Fixed use of variables
5
+
6
+
7
+ daniel
8
+
9
+ * Updated to grab IP from Order model instead
10
+
11
+
12
+ daniel
13
+
14
+ * Added fields to include IP in transactions IP address is stored on tender while the order is being placed. It is then passed along as an argument when submitting the transaction to Authorize.net
15
+
16
+
17
+ daniel
18
+
19
+ * V3.5 compatibility updates
20
+
21
+ AUTHNET-1
22
+
23
+ Jeff Yucis
24
+
25
+ * Update README
26
+
27
+
28
+ Matt Duffy
29
+
30
+ * Update README
31
+
32
+
33
+ Matt Duffy
34
+
35
+ * Complete post-migration tasks
36
+
37
+
38
+ Curt Howard
39
+
40
+ * Update gemspec to add license
41
+
42
+
43
+ Curt Howard
44
+
45
+ * Update LICENSE
46
+
47
+
48
+ Curt Howard
49
+
50
+
51
+
1
52
  Workarea Authorize Cim 2.1.1 (2019-08-22)
2
53
  --------------------------------------------------------------------------------
3
54
 
data/Gemfile CHANGED
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  source 'https://rubygems.org'
4
- git_source(:github) { |repo| "git@github.com:#{repo}.git" }
4
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
5
 
6
6
  gemspec
7
7
 
8
- gem 'workarea'
8
+ gem 'workarea', github: 'workarea-commerce/workarea', branch: 'v3.5-stable'
9
9
 
10
10
  group :test do
11
11
  gem 'simplecov', require: false
data/README.md CHANGED
@@ -1,22 +1,31 @@
1
- # WorkArea Authorize.Net CIM Integration
1
+ WorkArea Authorize.Net CIM Integration
2
+ ================================================================================
2
3
 
3
4
  Integrates the `ActiveMerchant::Billing::AuthorizeNetCimGateway` with
4
- the WebLinc platform. Designed to be dropped in to the project as the
5
+ the Workarea platform. Designed to be dropped in to the project as the
5
6
  primary payment gateway. Uses a bogus gateway until secrets are
6
7
  configured.
7
8
 
8
- ## Installation
9
+ Getting Started
10
+ --------------------------------------------------------------------------------
9
11
 
10
- The latest version of this gem supports **Workarea 3.x**.
11
-
12
- Add this to Gemfile in your `source` block for
13
- **https://gems.workarea.com**:
12
+ Add the gem to your application's Gemfile:
14
13
 
15
14
  ```ruby
15
+ # ...
16
16
  gem 'workarea-authorize_cim'
17
+ # ...
17
18
  ```
18
19
 
19
- ## Usage
20
+ Update your application's bundle.
21
+
22
+ ```bash
23
+ cd path/to/application
24
+ bundle
25
+ ```
26
+
27
+ Usage
28
+ --------------------------------------------------------------------------------
20
29
 
21
30
  The gem will automatically load the `BogusAuthorizeNetCimGateway` when
22
31
  installed, but you can load the real-life gateway by configuring the
@@ -29,12 +38,12 @@ authorize:
29
38
  test: true # ONLY FOR STAGING!! Uses the auth.net sandbox
30
39
  ```
31
40
 
32
- ## WebLinc Platform Documentation
33
-
34
- See https://developer.workarea.com for WebLinc platform documentation.
41
+ Workarea Commerce Documentation
42
+ --------------------------------------------------------------------------------
35
43
 
36
- ## Copyright & Licensing
44
+ See [https://developer.workarea.com](https://developer.workarea.com) for Workarea Commerce documentation.
37
45
 
38
- Copyright WebLinc 2016-2018. All rights reserved.
46
+ License
47
+ --------------------------------------------------------------------------------
39
48
 
40
- For licensing, contact sales@workarea.com.
49
+ Workarea Authorize.net CIM is released under the [Business Software License](LICENSE)
data/Rakefile CHANGED
@@ -35,13 +35,12 @@ desc "Release version #{Workarea::AuthorizeCim::VERSION} of the gem"
35
35
  task :release do
36
36
  host = "https://#{ENV['BUNDLE_GEMS__WEBLINC__COM']}@gems.weblinc.com"
37
37
 
38
- #Rake::Task["workarea:changelog"].execute
39
- #system "git add CHANGELOG.md"
40
- #system 'git commit -m "Update CHANGELOG"'
41
- #system "git push origin HEAD"
38
+ Rake::Task["workarea:changelog"].execute
39
+ system "git add CHANGELOG.md"
40
+ system 'git commit -m "Update CHANGELOG"'
42
41
 
43
42
  system "git tag -a v#{Workarea::AuthorizeCim::VERSION} -m 'Tagging #{Workarea::AuthorizeCim::VERSION}'"
44
- system 'git push --tags'
43
+ system 'git push origin HEAD --follow-tags'
45
44
 
46
45
  system 'gem build workarea-authorize_cim.gemspec'
47
46
  system "gem push workarea-authorize_cim-#{Workarea::AuthorizeCim::VERSION}.gem"
@@ -0,0 +1,15 @@
1
+ module Workarea
2
+ decorate Checkout::Steps::Payment, with: :cim do
3
+
4
+ private
5
+
6
+ def set_credit_card(params)
7
+ super
8
+
9
+ return unless payment.credit_card.present?
10
+ payment.credit_card.tap do |card|
11
+ card.update_attributes(ip_address: order.ip_address)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -29,6 +29,9 @@ module Workarea
29
29
  order: {
30
30
  invoice_number: tender.payment.id.first(20) # auth net has max length 20 for this field
31
31
  }
32
+ },
33
+ extra_options: {
34
+ x_customer_ip: customer_ip_address
32
35
  }
33
36
  }
34
37
  end
@@ -44,6 +47,10 @@ module Workarea
44
47
  }
45
48
  end
46
49
 
50
+ def customer_ip_address
51
+ tender.ip_address
52
+ end
53
+
47
54
  def customer_profile_id
48
55
  tender.gateway_profile_id
49
56
  end
@@ -28,6 +28,9 @@ module Workarea
28
28
  amount: auth_amount,
29
29
  order: {
30
30
  invoice_number: tender.payment.id.first(20) # auth net has max length 20 for this field
31
+ },
32
+ extra_options: {
33
+ x_customer_ip: customer_ip_address
31
34
  }
32
35
  }
33
36
  }
@@ -44,6 +47,10 @@ module Workarea
44
47
  }
45
48
  end
46
49
 
50
+ def customer_ip_address
51
+ tender.ip_address
52
+ end
53
+
47
54
  def customer_profile_id
48
55
  tender.gateway_profile_id
49
56
  end
data/bin/rake CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
+
3
4
  #
4
5
  # This file was generated by Bundler.
5
6
  #
data/bin/rspec CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
+
3
4
  #
4
5
  # This file was generated by Bundler.
5
6
  #
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
+
3
4
  #
4
5
  # This file was generated by Bundler.
5
6
  #
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Workarea
4
4
  module AuthorizeCim
5
- VERSION = '2.1.1'
5
+ VERSION = '2.1.2'
6
6
  end
7
7
  end
@@ -23,5 +23,5 @@ Gem::Specification.new do |s|
23
23
 
24
24
  s.add_dependency 'workarea', '~> 3.x'
25
25
 
26
- s.add_development_dependency 'rubocop', '~> 0'
26
+ s.add_development_dependency 'rubocop', '~> 0.49'
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-authorize_cim
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Scott
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-22 00:00:00.000000000 Z
11
+ date: 2020-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '0.49'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '0.49'
41
41
  description: Authorize.Net CIM Integration for WorkArea
42
42
  email:
43
43
  - tscott@workarea.com
@@ -46,12 +46,15 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - ".editorconfig"
49
+ - ".eslintrc.json"
49
50
  - ".github/ISSUE_TEMPLATE/bug_report.md"
50
51
  - ".github/ISSUE_TEMPLATE/documentation-request.md"
51
52
  - ".github/ISSUE_TEMPLATE/feature_request.md"
53
+ - ".github/workflows/ci.yml"
52
54
  - ".gitignore"
53
55
  - ".rails-rubocop.yml"
54
56
  - ".rubocop.yml"
57
+ - ".stylelintrc.json"
55
58
  - CHANGELOG.md
56
59
  - CODE_OF_CONDUCT.md
57
60
  - CONTRIBUTING.md
@@ -61,6 +64,7 @@ files:
61
64
  - README.md
62
65
  - Rakefile
63
66
  - app/errors/workarea/payment/create_profile_error.rb
67
+ - app/models/workarea/checkout/steps/payment.decorator
64
68
  - app/models/workarea/payment.decorator
65
69
  - app/models/workarea/payment/authorize/credit_card.decorator
66
70
  - app/models/workarea/payment/capture/credit_card.decorator
@@ -116,7 +120,6 @@ files:
116
120
  - test/dummy/config/initializers/inflections.rb
117
121
  - test/dummy/config/initializers/mime_types.rb
118
122
  - test/dummy/config/initializers/new_framework_defaults.rb
119
- - test/dummy/config/initializers/session_store.rb
120
123
  - test/dummy/config/initializers/workarea.rb
121
124
  - test/dummy/config/initializers/wrap_parameters.rb
122
125
  - test/dummy/config/locales/en.yml
@@ -180,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
183
  - !ruby/object:Gem::Version
181
184
  version: '0'
182
185
  requirements: []
183
- rubygems_version: 3.0.4
186
+ rubygems_version: 3.0.3
184
187
  signing_key:
185
188
  specification_version: 4
186
189
  summary: Authorize.Net CIM Integration for WorkArea
@@ -1,3 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails.application.config.session_store :cookie_store, key: '_dummy_session'