worldpay_cnp 0.1.1 → 1.0.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: 9a84afc796c60012b3424bdd2f6a680cc70e3a8ae22e31d3580ab066f88c3914
4
- data.tar.gz: 2d4d124b6e8ae6208f547b1112f8f0c684bb534d3ad5b6002266777118ab4fce
3
+ metadata.gz: efe9c0d58a5d3ef6293c5268f0c24623d8213bdacacbf8819a80d01e3569dace
4
+ data.tar.gz: 350d10906becd6853f4c5b68d993442b420af7b787517ba6db35c149531d6664
5
5
  SHA512:
6
- metadata.gz: 65f43672007ec1fd82810f90d3ca771e670d38c42f106c5a856f9e31cb77b1435244688f4d12e7cc3b213ec1e41b200a5d4ff4844356b26d1da78bcf1984c6c6
7
- data.tar.gz: 1a99347ada993247e14676118648801b75bc0b08278a0e1d650d4da7a246d9e7c9cf4d864c374db3697748115ec15443cbc01ee0e69795b0b0dfc99325ef1768
6
+ metadata.gz: f3406a6b4b3f57d754b41df7fd02f2f67904daef33a4ef1a74a5753cf72d7d4f0e8449fb4e0a0a5acfdf66efc0eaa3c179daa5394845d74ca73f4f4bc77120b2
7
+ data.tar.gz: bd64252e528e89ce2d070df15a6f5fb7259f6e93a9d32af52576e1eca7ef72cba516fc54a35f53d98513d9a2537232b63c500d8547bd6213a2bf0e2bc17a934a
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/worldpay_cnp.svg)][gem]
4
4
  ![Test Suite](https://github.com/jackpocket/worldpay-cnp/workflows/Tests/badge.svg)
5
5
 
6
- A Ruby library for the Worldpay cnpAPI with a simple interface for creating transactions as a Ruby hash to XML and back. So no real request objects. Since the cnpAPI uses camelCase, this library will handle converting to and from snake_case for you. While Worldpay has an official [CnpOnline Ruby SDK](https://github.com/Vantiv/cnp-sdk-for-ruby), they no longer support it.
6
+ A Ruby library for the Worldpay cnpAPI with a simple interface for creating transactions as a Ruby hash to XML and back. So no real request objects. Since the cnpAPI uses `camelCase`, this converts to and from `snake_case` for you. While Worldpay has an official [CnpOnline Ruby SDK](https://github.com/Vantiv/cnp-sdk-for-ruby), they no longer support it.
7
7
 
8
8
  ## Installation
9
9
 
@@ -65,7 +65,7 @@ client.create_transaction(
65
65
  sale: {
66
66
  "@id": "123",
67
67
  "@report_group": "Default Report Group",
68
- order_id: "456"
68
+ order_id: "456",
69
69
  amount: "1000",
70
70
  order_source: "ecommerce",
71
71
  card: {
@@ -1,3 +1,3 @@
1
1
  module WorldpayCnp
2
- VERSION = "0.1.1"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worldpay_cnp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Julio
8
- autorequire:
9
- bindir: exe
8
+ autorequire:
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-27 00:00:00.000000000 Z
11
+ date: 2024-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -44,27 +44,15 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1.0'
47
- description: A modern Ruby interface to the Worldpay cnpAPI.
47
+ description: A modern and simple Ruby interface to the Worldpay cnpAPI.
48
48
  email:
49
49
  - javier@jackpocket.com
50
50
  executables: []
51
51
  extensions: []
52
52
  extra_rdoc_files: []
53
53
  files:
54
- - ".env.sample"
55
- - ".github/dependabot.yml"
56
- - ".github/workflows/ci.yml"
57
- - ".gitignore"
58
- - ".rspec"
59
- - CHANGELOG.md
60
- - CODE_OF_CONDUCT.md
61
- - Gemfile
62
- - Gemfile.lock
63
54
  - LICENSE.txt
64
55
  - README.md
65
- - Rakefile
66
- - bin/console
67
- - bin/setup
68
56
  - lib/worldpay_cnp.rb
69
57
  - lib/worldpay_cnp/api_client.rb
70
58
  - lib/worldpay_cnp/client.rb
@@ -79,7 +67,6 @@ files:
79
67
  - lib/worldpay_cnp/xml/nokogiri.rb
80
68
  - lib/worldpay_cnp/xml/parser.rb
81
69
  - lib/worldpay_cnp/xml/serializer.rb
82
- - worldpay-cnp.gemspec
83
70
  homepage: https://github.com/jackpocket/worldpay-cnp
84
71
  licenses:
85
72
  - MIT
@@ -87,7 +74,7 @@ metadata:
87
74
  homepage_uri: https://github.com/jackpocket/worldpay-cnp
88
75
  source_code_uri: https://github.com/jackpocket/worldpay-cnp
89
76
  changelog_uri: https://github.com/jackpocket/worldpay-cnp/blob/master/CHANGELOG.md
90
- post_install_message:
77
+ post_install_message:
91
78
  rdoc_options: []
92
79
  require_paths:
93
80
  - lib
@@ -95,15 +82,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
82
  requirements:
96
83
  - - ">="
97
84
  - !ruby/object:Gem::Version
98
- version: 2.5.0
85
+ version: '0'
99
86
  required_rubygems_version: !ruby/object:Gem::Requirement
100
87
  requirements:
101
88
  - - ">="
102
89
  - !ruby/object:Gem::Version
103
90
  version: '0'
104
91
  requirements: []
105
- rubygems_version: 3.2.29
106
- signing_key:
92
+ rubygems_version: 3.5.11
93
+ signing_key:
107
94
  specification_version: 4
108
95
  summary: A modern Ruby interface to the Worldpay cnpAPI.
109
96
  test_files: []
data/.env.sample DELETED
@@ -1,3 +0,0 @@
1
- USERNAME="YOUR_API_USERNAME"
2
- PASSWORD="YOUR_API_PASSWORD"
3
- MERCHANT_ID="YOUR_MERCHANT_ID"
@@ -1,9 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: bundler
4
- directory: "/"
5
- schedule:
6
- interval: daily
7
- time: "08:30"
8
- timezone: America/New_York
9
- open-pull-requests-limit: 99
@@ -1,24 +0,0 @@
1
- name: Tests
2
-
3
- on:
4
- push:
5
- branches: [ master ]
6
- pull_request:
7
- branches: [ master ]
8
-
9
- jobs:
10
- build:
11
- runs-on: ubuntu-latest
12
- strategy:
13
- matrix:
14
- ruby: [ '2.5', '2.6', '2.7', '3.0' ]
15
- name: Ruby ${{ matrix.ruby }}
16
- steps:
17
- - uses: actions/checkout@v2
18
- - uses: ruby/setup-ruby@v1
19
- with:
20
- ruby-version: ${{ matrix.ruby }}
21
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
22
- - name: Run Tests
23
- run: |
24
- bundle exec rake
data/.gitignore DELETED
@@ -1,14 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
12
-
13
- .env
14
- Notes.rb
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/CHANGELOG.md DELETED
@@ -1,14 +0,0 @@
1
- # Changelog
2
-
3
- ## Unreleased
4
-
5
- ...
6
-
7
- ## 0.1.1 (2022-01-27)
8
-
9
- * Resolves a deprecation warning with Nokogiri 1.13.0.
10
- > Passing a Node as the second parameter to Node.new is deprecated. Please pass a Document instead, or prefer an alternative constructor like Node#add_child. This will become an error in a future release of Nokogiri.
11
-
12
- ## 0.1.0 (2020-10-30)
13
-
14
- * Initial release of worldpay_cnp gem
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at jjfutbol@gmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [https://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: https://contributor-covenant.org
74
- [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile DELETED
@@ -1,10 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in worldpay_cnp.gemspec
4
- gemspec
5
-
6
- gem "rake", "~> 13.0"
7
- gem "rspec", "~> 3.0"
8
- gem "dotenv"
9
- gem "vcr"
10
- gem "webmock"
data/Gemfile.lock DELETED
@@ -1,77 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- worldpay_cnp (0.1.1)
5
- http (>= 4, < 6)
6
- nokogiri (~> 1.0)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- addressable (2.8.0)
12
- public_suffix (>= 2.0.2, < 5.0)
13
- crack (0.4.5)
14
- rexml
15
- diff-lcs (1.5.0)
16
- domain_name (0.5.20190701)
17
- unf (>= 0.0.5, < 1.0.0)
18
- dotenv (2.7.6)
19
- ffi (1.15.5)
20
- ffi-compiler (1.0.1)
21
- ffi (>= 1.0.0)
22
- rake
23
- hashdiff (1.0.1)
24
- http (5.0.4)
25
- addressable (~> 2.8)
26
- http-cookie (~> 1.0)
27
- http-form_data (~> 2.2)
28
- llhttp-ffi (~> 0.4.0)
29
- http-cookie (1.0.4)
30
- domain_name (~> 0.5)
31
- http-form_data (2.3.0)
32
- llhttp-ffi (0.4.0)
33
- ffi-compiler (~> 1.0)
34
- rake (~> 13.0)
35
- mini_portile2 (2.7.1)
36
- nokogiri (1.13.1)
37
- mini_portile2 (~> 2.7.0)
38
- racc (~> 1.4)
39
- public_suffix (4.0.6)
40
- racc (1.6.0)
41
- rake (13.0.6)
42
- rexml (3.2.5)
43
- rspec (3.10.0)
44
- rspec-core (~> 3.10.0)
45
- rspec-expectations (~> 3.10.0)
46
- rspec-mocks (~> 3.10.0)
47
- rspec-core (3.10.1)
48
- rspec-support (~> 3.10.0)
49
- rspec-expectations (3.10.2)
50
- diff-lcs (>= 1.2.0, < 2.0)
51
- rspec-support (~> 3.10.0)
52
- rspec-mocks (3.10.2)
53
- diff-lcs (>= 1.2.0, < 2.0)
54
- rspec-support (~> 3.10.0)
55
- rspec-support (3.10.3)
56
- unf (0.1.4)
57
- unf_ext
58
- unf_ext (0.0.8)
59
- vcr (6.0.0)
60
- webmock (3.14.0)
61
- addressable (>= 2.8.0)
62
- crack (>= 0.3.2)
63
- hashdiff (>= 0.4.0, < 2.0.0)
64
-
65
- PLATFORMS
66
- ruby
67
-
68
- DEPENDENCIES
69
- dotenv
70
- rake (~> 13.0)
71
- rspec (~> 3.0)
72
- vcr
73
- webmock
74
- worldpay_cnp!
75
-
76
- BUNDLED WITH
77
- 2.2.29
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task default: :spec
7
- task test: :spec
data/bin/console DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "dotenv/load"
5
- require "worldpay_cnp"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- def authenticated_client(**options)
11
- WorldpayCnp::Client.new(
12
- username: ENV["USERNAME"],
13
- password: ENV["PASSWORD"],
14
- merchant_id: ENV["MERCHANT_ID"],
15
- environment: :prelive,
16
- **options
17
- )
18
- end
19
-
20
- def sandbox_client(**options)
21
- WorldpayCnp::Client.new(environment: :sandbox, **options)
22
- end
23
-
24
- # (If you use this, don't forget to add pry to your Gemfile!)
25
- # require "pry"
26
- # Pry.start
27
-
28
- require "irb"
29
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
-
5
- bundle install
6
-
7
- read -r -p 'Do you have a Worldpay Prelive account? (y/n) ' has_account
8
-
9
- if [[ "$has_account" =~ ^(No|no|N|n)$ ]]; then
10
- echo "Then you'll need to get credentials first or rely on"
11
- echo "the sandbox environment. No account or auth required."
12
- exit 0
13
- fi
14
-
15
- echo "Enter your Prelive credentials below."
16
- read -p 'API Username: ' username
17
- read -p 'API Password: ' password
18
- read -p 'Merchant Id: ' merchant_id
19
-
20
- cp .env.sample .env
21
-
22
- sed -i '' -e "s/YOUR_API_USERNAME/$username/g" .env
23
- sed -i '' -e "s/YOUR_API_PASSWORD/$password/g" .env
24
- sed -i '' -e "s/YOUR_MERCHANT_ID/$merchant_id/g" .env
25
-
26
- echo "Done."
data/worldpay-cnp.gemspec DELETED
@@ -1,30 +0,0 @@
1
- require_relative 'lib/worldpay_cnp/version'
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = "worldpay_cnp"
5
- spec.version = WorldpayCnp::VERSION
6
- spec.authors = ["Javier Julio"]
7
- spec.email = ["javier@jackpocket.com"]
8
-
9
- spec.summary = "A modern Ruby interface to the Worldpay cnpAPI."
10
- spec.description = "A modern Ruby interface to the Worldpay cnpAPI."
11
- spec.homepage = "https://github.com/jackpocket/worldpay-cnp"
12
- spec.license = "MIT"
13
- spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
14
-
15
- spec.add_dependency "http", '>= 4', '< 6'
16
- spec.add_dependency "nokogiri", '~> 1.0'
17
-
18
- spec.metadata["homepage_uri"] = spec.homepage
19
- spec.metadata["source_code_uri"] = spec.homepage
20
- spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
21
-
22
- # Specify which files should be added to the gem when it is released.
23
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
25
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
- end
27
- spec.bindir = "exe"
28
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
- spec.require_paths = ["lib"]
30
- end