paysafe 0.14.0 → 0.16.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/lib/paysafe/api/payments_api.rb +1 -1
- data/lib/paysafe/payment_handle.rb +14 -0
- data/lib/paysafe/refinements/camel_case.rb +1 -8
- data/lib/paysafe/refinements/snake_case.rb +1 -8
- data/lib/paysafe/result.rb +0 -2
- data/lib/paysafe/single_use_customer_token.rb +12 -0
- data/lib/paysafe/version.rb +1 -1
- data/lib/paysafe.rb +2 -0
- metadata +11 -132
- data/.env.sample +0 -15
- data/.github/workflows/ci.yml +0 -34
- data/.gitignore +0 -9
- data/CHANGELOG.md +0 -81
- data/CODE_OF_CONDUCT.md +0 -13
- data/Gemfile +0 -4
- data/Gemfile.lock +0 -69
- data/Rakefile +0 -10
- data/bin/console +0 -37
- data/bin/setup +0 -41
- data/paysafe.gemspec +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d85cc1bf28867ba28dee2cb5016eccc02c1585fd326a6bdd7cc4d065d816ac06
|
4
|
+
data.tar.gz: 4e5272a9218e6ce3e667e895a4ab213a4a9474fa9eca4da1ac191b24b9cc74e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe6724cea168d8c9a1389057c6471990ef2f4c94a7e1e9d3c446006702134b8776a6fd6950e47bdd7131e945bbb6934f28a9eb1a4fd07406675f40a69cff98cb
|
7
|
+
data.tar.gz: fccb380fdbdc4d61de5f3a4a977a71e330b8ce7ae4ed9504e6d6807b6dbf3a7814ed474dac9e723bf89c9392a9b68fe26796517c3e20b187df2c70e7a5466952
|
@@ -11,7 +11,7 @@ module Paysafe
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def create_single_use_customer_token(id:)
|
14
|
-
perform_post_with_object("/paymenthub/v1/customers/#{id}/singleusecustomertokens", {},
|
14
|
+
perform_post_with_object("/paymenthub/v1/customers/#{id}/singleusecustomertokens", {}, SingleUseCustomerToken)
|
15
15
|
end
|
16
16
|
|
17
17
|
def create_payment(**data)
|
data/lib/paysafe/result.rb
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'paysafe/result'
|
2
|
+
|
3
|
+
module Paysafe
|
4
|
+
class SingleUseCustomerToken < Result
|
5
|
+
attributes :id, :payment_token, :time_to_live_seconds, :customer_id,
|
6
|
+
:status, :single_use_customer_token, :locale, :first_name, :last_name,
|
7
|
+
:email
|
8
|
+
|
9
|
+
object_attribute :Address, :addresses
|
10
|
+
object_attribute :PaymentHandle, :payment_handles
|
11
|
+
end
|
12
|
+
end
|
data/lib/paysafe/version.rb
CHANGED
data/lib/paysafe.rb
CHANGED
@@ -3,10 +3,12 @@ require "json"
|
|
3
3
|
require "paysafe/version"
|
4
4
|
require "paysafe/error"
|
5
5
|
require "paysafe/single_use_token"
|
6
|
+
require "paysafe/single_use_customer_token"
|
6
7
|
require "paysafe/profile"
|
7
8
|
require "paysafe/customer"
|
8
9
|
require "paysafe/payment"
|
9
10
|
require "paysafe/gateway_response"
|
11
|
+
require "paysafe/payment_handle"
|
10
12
|
require "paysafe/payment_processor"
|
11
13
|
require "paysafe/payment_methods"
|
12
14
|
require "paysafe/payment_method"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paysafe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Julio
|
8
|
-
autorequire:
|
9
|
-
bindir:
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '6'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,119 +29,7 @@ dependencies:
|
|
29
29
|
version: '4'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: rake
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - ">="
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '0'
|
40
|
-
type: :development
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '0'
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: bundler
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '2.0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '2.0'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: dotenv
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - ">="
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '0'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - ">="
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '0'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: minitest
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - ">="
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '0'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '0'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: minitest-reporters
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - ">="
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '0'
|
96
|
-
type: :development
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '0'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: minitest-mock_expectations
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - ">="
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - ">="
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '0'
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
name: vcr
|
119
|
-
requirement: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - ">="
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '0'
|
124
|
-
type: :development
|
125
|
-
prerelease: false
|
126
|
-
version_requirements: !ruby/object:Gem::Requirement
|
127
|
-
requirements:
|
128
|
-
- - ">="
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '0'
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: webmock
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - ">="
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '0'
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - ">="
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '0'
|
32
|
+
version: '6'
|
145
33
|
description: A Ruby interface to the Paysafe REST API.
|
146
34
|
email:
|
147
35
|
- javier@jackpocket.com
|
@@ -149,18 +37,8 @@ executables: []
|
|
149
37
|
extensions: []
|
150
38
|
extra_rdoc_files: []
|
151
39
|
files:
|
152
|
-
- ".env.sample"
|
153
|
-
- ".github/workflows/ci.yml"
|
154
|
-
- ".gitignore"
|
155
|
-
- CHANGELOG.md
|
156
|
-
- CODE_OF_CONDUCT.md
|
157
|
-
- Gemfile
|
158
|
-
- Gemfile.lock
|
159
40
|
- LICENSE.txt
|
160
41
|
- README.md
|
161
|
-
- Rakefile
|
162
|
-
- bin/console
|
163
|
-
- bin/setup
|
164
42
|
- lib/paysafe.rb
|
165
43
|
- lib/paysafe/address.rb
|
166
44
|
- lib/paysafe/api/base_api.rb
|
@@ -176,6 +54,7 @@ files:
|
|
176
54
|
- lib/paysafe/error.rb
|
177
55
|
- lib/paysafe/gateway_response.rb
|
178
56
|
- lib/paysafe/payment.rb
|
57
|
+
- lib/paysafe/payment_handle.rb
|
179
58
|
- lib/paysafe/payment_method.rb
|
180
59
|
- lib/paysafe/payment_methods.rb
|
181
60
|
- lib/paysafe/payment_processor.rb
|
@@ -184,16 +63,16 @@ files:
|
|
184
63
|
- lib/paysafe/refinements/snake_case.rb
|
185
64
|
- lib/paysafe/rest/client.rb
|
186
65
|
- lib/paysafe/result.rb
|
66
|
+
- lib/paysafe/single_use_customer_token.rb
|
187
67
|
- lib/paysafe/single_use_token.rb
|
188
68
|
- lib/paysafe/standalone_credit.rb
|
189
69
|
- lib/paysafe/verification.rb
|
190
70
|
- lib/paysafe/version.rb
|
191
|
-
- paysafe.gemspec
|
192
71
|
homepage: https://github.com/jackpocket/paysafe
|
193
72
|
licenses:
|
194
73
|
- MIT
|
195
74
|
metadata: {}
|
196
|
-
post_install_message:
|
75
|
+
post_install_message:
|
197
76
|
rdoc_options: []
|
198
77
|
require_paths:
|
199
78
|
- lib
|
@@ -208,8 +87,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
87
|
- !ruby/object:Gem::Version
|
209
88
|
version: '0'
|
210
89
|
requirements: []
|
211
|
-
rubygems_version: 3.
|
212
|
-
signing_key:
|
90
|
+
rubygems_version: 3.5.11
|
91
|
+
signing_key:
|
213
92
|
specification_version: 4
|
214
93
|
summary: A Ruby interface to the Paysafe REST API.
|
215
94
|
test_files: []
|
data/.env.sample
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
PAYSAFE_ACCOUNT_NUMBER="YOUR_ACCOUNT_NUMBER"
|
2
|
-
PAYSAFE_API_KEY="YOUR_API_KEY"
|
3
|
-
PAYSAFE_API_SECRET="YOUR_API_SECRET"
|
4
|
-
|
5
|
-
# This is only needed if you want to generate your own Single
|
6
|
-
# Use Tokens which utilize a different API key and secret.
|
7
|
-
PAYSAFE_SUT_API_KEY="YOUR_SUT_API_KEY"
|
8
|
-
PAYSAFE_SUT_API_SECRET="YOUR_SUT_API_SECRET"
|
9
|
-
|
10
|
-
# These are for the Paysafe Payments API which are part of
|
11
|
-
# what Paysafe refers to as the Unity platform.
|
12
|
-
PAYSAFE_UNITY_API_KEY="YOUR_UNITY_API_KEY"
|
13
|
-
PAYSAFE_UNITY_API_SECRET="YOUR_UNITY_API_SECRET"
|
14
|
-
PAYSAFE_UNITY_SUT_API_KEY="YOUR_UNITY_SUT_API_KEY"
|
15
|
-
PAYSAFE_UNITY_SUT_API_SECRET="YOUR_UNITY_SUT_API_SECRET"
|
data/.github/workflows/ci.yml
DELETED
@@ -1,34 +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
|
-
env:
|
24
|
-
PAYSAFE_ACCOUNT_NUMBER: test
|
25
|
-
PAYSAFE_API_KEY: test
|
26
|
-
PAYSAFE_API_SECRET: test
|
27
|
-
PAYSAFE_SUT_API_KEY: test
|
28
|
-
PAYSAFE_SUT_API_SECRET: test
|
29
|
-
PAYSAFE_UNITY_API_KEY: test
|
30
|
-
PAYSAFE_UNITY_API_SECRET: test
|
31
|
-
PAYSAFE_UNITY_SUT_API_KEY: test
|
32
|
-
PAYSAFE_UNITY_SUT_API_SECRET: test
|
33
|
-
run: |
|
34
|
-
bundle exec rake
|
data/.gitignore
DELETED
data/CHANGELOG.md
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
Changelog
|
2
|
-
=========
|
3
|
-
|
4
|
-
## 0.14.0 (2021-01-19)
|
5
|
-
|
6
|
-
* No code changes - moved repository to Jackpocket organization and updated URLs
|
7
|
-
|
8
|
-
## 0.13.0 (2021-01-14)
|
9
|
-
|
10
|
-
* Renamed client `timeouts` option to `timeout`.
|
11
|
-
* Requires Ruby 2.5 and up.
|
12
|
-
* Added Ruby 3.0 build to CI.
|
13
|
-
|
14
|
-
## 0.12.0 (2020-05-14)
|
15
|
-
|
16
|
-
* Added customers and single use tokens support for Payments API:
|
17
|
-
* `client.payments.create_single_use_customer_token`
|
18
|
-
* `client.payments.create_customer`
|
19
|
-
* `client.payments.get_customer`
|
20
|
-
* Removed deprecated methods on `Client` object. Please use API scoped methods defined on `payments`, `customer_vault`, or `card_payments`.
|
21
|
-
|
22
|
-
## 0.11.0 (2020-04-08)
|
23
|
-
|
24
|
-
* Added standalone credits support for Payments API:
|
25
|
-
* `client.payments.create_standalone_credit`
|
26
|
-
* `client.payments.get_standalone_credit`
|
27
|
-
|
28
|
-
## 0.10.0 (2020-02-24)
|
29
|
-
|
30
|
-
* Removed client configuration using a block.
|
31
|
-
* Deprecated `Client` object API methods.
|
32
|
-
* All API methods are now grouped by API objects, for example:
|
33
|
-
* Customer Vault API: `client.create_profile` is now `client.customer_vault.create_profile`
|
34
|
-
* Card Payments API: `client.create_verification` is now `client.card_payments.create_verification`
|
35
|
-
* Includes some methods for new Payments API through `client.payments` (aka Paysafe Unity Platform)
|
36
|
-
* Requires http gem v4.
|
37
|
-
* Requires Ruby 2.4 and up.
|
38
|
-
* Added Ruby 2.7 build to CI.
|
39
|
-
|
40
|
-
## 0.9.4 (2019-09-24)
|
41
|
-
|
42
|
-
* Relax http gem dependency to allow v2 through v4.
|
43
|
-
|
44
|
-
## 0.9.3 (2017-12-19)
|
45
|
-
|
46
|
-
* Relax http gem dependency to allow v2 or v3.
|
47
|
-
* Use additional args for `purchase` method.
|
48
|
-
|
49
|
-
## 0.9.2 (2017-04-27)
|
50
|
-
|
51
|
-
* Added predicate methods for checking CVV and AVS status on a verification request, e.g. `cvv_match?`, `avs_no_match?`, etc.
|
52
|
-
|
53
|
-
## 0.9.1 (2017-04-24)
|
54
|
-
|
55
|
-
* Added `card.brand` method that converts `card_type` value (VI) to brand name (visa).
|
56
|
-
|
57
|
-
## 0.9.0 (2017-04-19)
|
58
|
-
|
59
|
-
This is a major update with breaking changes so moving the version up quite a bit since I'd also like to move to a 1.0 release soon after.
|
60
|
-
|
61
|
-
* Requires Ruby 2.3 and up.
|
62
|
-
* All API methods now accept params in snake_case and are converted to camelCase.
|
63
|
-
* Responses are now typed with classes using snake_case properties (converted from camelCase) handling nested complex objects and lazily loaded. No more hashes.
|
64
|
-
* Field names match Paysafe API docs except when making requests and working with responses, its all in snake_case.
|
65
|
-
* Renamed config `timeout_options` renamed to `timeouts`.
|
66
|
-
* Removed default value for `timeouts` config.
|
67
|
-
* Added new methods to work with single use tokens:
|
68
|
-
* `create_single_use_token` (requires different API key and secret)
|
69
|
-
* `create_verification_from_token`
|
70
|
-
* `create_profile_from_token`
|
71
|
-
* `create_card_from_token`
|
72
|
-
* Updated `bin/setup` script.
|
73
|
-
* Updated API base domain to paysafe.com.
|
74
|
-
|
75
|
-
## 0.6.2 (2016-04-25)
|
76
|
-
|
77
|
-
* Upgrade http gem to v2.0
|
78
|
-
|
79
|
-
## 0.6.1 (2016-03-02)
|
80
|
-
|
81
|
-
* Add `update_profile` method to client
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# Contributor Code of Conduct
|
2
|
-
|
3
|
-
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
-
|
5
|
-
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
-
|
7
|
-
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
-
|
9
|
-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
-
|
11
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
-
|
13
|
-
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
paysafe (0.14.0)
|
5
|
-
http (>= 4, < 5)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
addressable (2.7.0)
|
11
|
-
public_suffix (>= 2.0.2, < 5.0)
|
12
|
-
ansi (1.5.0)
|
13
|
-
builder (3.2.4)
|
14
|
-
crack (0.4.5)
|
15
|
-
rexml
|
16
|
-
domain_name (0.5.20190701)
|
17
|
-
unf (>= 0.0.5, < 1.0.0)
|
18
|
-
dotenv (2.7.6)
|
19
|
-
ffi (1.14.2)
|
20
|
-
ffi-compiler (1.0.1)
|
21
|
-
ffi (>= 1.0.0)
|
22
|
-
rake
|
23
|
-
hashdiff (1.0.1)
|
24
|
-
http (4.4.1)
|
25
|
-
addressable (~> 2.3)
|
26
|
-
http-cookie (~> 1.0)
|
27
|
-
http-form_data (~> 2.2)
|
28
|
-
http-parser (~> 1.2.0)
|
29
|
-
http-cookie (1.0.3)
|
30
|
-
domain_name (~> 0.5)
|
31
|
-
http-form_data (2.3.0)
|
32
|
-
http-parser (1.2.3)
|
33
|
-
ffi-compiler (>= 1.0, < 2.0)
|
34
|
-
minitest (5.14.3)
|
35
|
-
minitest-mock_expectations (1.1.3)
|
36
|
-
minitest-reporters (1.4.2)
|
37
|
-
ansi
|
38
|
-
builder
|
39
|
-
minitest (>= 5.0)
|
40
|
-
ruby-progressbar
|
41
|
-
public_suffix (4.0.6)
|
42
|
-
rake (13.0.3)
|
43
|
-
rexml (3.2.4)
|
44
|
-
ruby-progressbar (1.11.0)
|
45
|
-
unf (0.1.4)
|
46
|
-
unf_ext
|
47
|
-
unf_ext (0.0.7.7)
|
48
|
-
vcr (6.0.0)
|
49
|
-
webmock (3.11.1)
|
50
|
-
addressable (>= 2.3.6)
|
51
|
-
crack (>= 0.3.2)
|
52
|
-
hashdiff (>= 0.4.0, < 2.0.0)
|
53
|
-
|
54
|
-
PLATFORMS
|
55
|
-
ruby
|
56
|
-
|
57
|
-
DEPENDENCIES
|
58
|
-
bundler (~> 2.0)
|
59
|
-
dotenv
|
60
|
-
minitest
|
61
|
-
minitest-mock_expectations
|
62
|
-
minitest-reporters
|
63
|
-
paysafe!
|
64
|
-
rake
|
65
|
-
vcr
|
66
|
-
webmock
|
67
|
-
|
68
|
-
BUNDLED WITH
|
69
|
-
2.1.4
|
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "dotenv/load"
|
5
|
-
require "paysafe"
|
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 client
|
11
|
-
Paysafe::REST::Client.new(
|
12
|
-
account_number: ENV['PAYSAFE_ACCOUNT_NUMBER'],
|
13
|
-
api_key: ENV['PAYSAFE_API_KEY'],
|
14
|
-
api_secret: ENV['PAYSAFE_API_SECRET']
|
15
|
-
)
|
16
|
-
end
|
17
|
-
|
18
|
-
def sut_client
|
19
|
-
Paysafe::REST::Client.new(
|
20
|
-
api_key: ENV['PAYSAFE_SUT_API_KEY'],
|
21
|
-
api_secret: ENV['PAYSAFE_SUT_API_SECRET']
|
22
|
-
)
|
23
|
-
end
|
24
|
-
|
25
|
-
def unity_client
|
26
|
-
Paysafe::REST::Client.new(
|
27
|
-
api_key: ENV['PAYSAFE_UNITY_API_KEY'],
|
28
|
-
api_secret: ENV['PAYSAFE_UNITY_API_SECRET']
|
29
|
-
)
|
30
|
-
end
|
31
|
-
|
32
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
33
|
-
# require "pry"
|
34
|
-
# Pry.start
|
35
|
-
|
36
|
-
require "irb"
|
37
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
set -euo pipefail
|
3
|
-
IFS=$'\n\t'
|
4
|
-
|
5
|
-
bundle install
|
6
|
-
|
7
|
-
read -r -p 'Do you have an Paysafe Developer account? (y/n) ' has_account
|
8
|
-
|
9
|
-
if [[ "$has_account" =~ ^(Yes|yes|Y|y)$ ]]; then
|
10
|
-
echo "Great! You can get your account credentials from:"
|
11
|
-
echo " https://login.test.netbanx.com/office/public/preLogin.htm"
|
12
|
-
echo
|
13
|
-
else
|
14
|
-
echo "Then you'll need to create an account first."
|
15
|
-
echo "Click the 'Sign Up' button on the following page:"
|
16
|
-
echo " https://developer.paysafe.com/"
|
17
|
-
echo
|
18
|
-
read -s -p "Press Enter key if you're ready to continue..."
|
19
|
-
echo
|
20
|
-
fi
|
21
|
-
|
22
|
-
echo "Enter your account credentials below."
|
23
|
-
read -p 'Account Number: ' account_number
|
24
|
-
read -p 'API Key: ' api_key
|
25
|
-
read -p 'API Secret: ' api_secret
|
26
|
-
read -p 'Single Use Token API Key: ' sut_api_key
|
27
|
-
read -p 'Single Use Token API Secret: ' sut_api_secret
|
28
|
-
read -p 'Unity API Key: ' unity_api_key
|
29
|
-
read -p 'Unity API Secret: ' unity_api_secret
|
30
|
-
|
31
|
-
cp .env.sample .env
|
32
|
-
|
33
|
-
sed -i '' -e "s/YOUR_ACCOUNT_NUMBER/$account_number/g" .env
|
34
|
-
sed -i '' -e "s/YOUR_API_KEY/$api_key/g" .env
|
35
|
-
sed -i '' -e "s/YOUR_API_SECRET/$api_secret/g" .env
|
36
|
-
sed -i '' -e "s/YOUR_SUT_API_KEY/$sut_api_key/g" .env
|
37
|
-
sed -i '' -e "s/YOUR_SUT_API_SECRET/$sut_api_secret/g" .env
|
38
|
-
sed -i '' -e "s/YOUR_UNITY_API_KEY/$unity_api_key/g" .env
|
39
|
-
sed -i '' -e "s/YOUR_UNITY_API_SECRET/$unity_api_secret/g" .env
|
40
|
-
|
41
|
-
echo "Done."
|
data/paysafe.gemspec
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'paysafe/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "paysafe"
|
8
|
-
spec.version = Paysafe::VERSION
|
9
|
-
spec.authors = ["Javier Julio"]
|
10
|
-
spec.email = ["javier@jackpocket.com"]
|
11
|
-
|
12
|
-
spec.summary = "A Ruby interface to the Paysafe REST API."
|
13
|
-
spec.description = "A Ruby interface to the Paysafe REST API."
|
14
|
-
spec.homepage = "https://github.com/jackpocket/paysafe"
|
15
|
-
spec.license = "MIT"
|
16
|
-
|
17
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
-
spec.bindir = "exe"
|
19
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
-
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
spec.required_ruby_version = '>= 2.5'
|
23
|
-
|
24
|
-
spec.add_dependency "http", '>= 4', '< 5'
|
25
|
-
|
26
|
-
spec.add_development_dependency "rake"
|
27
|
-
spec.add_development_dependency "bundler", "~> 2.0"
|
28
|
-
spec.add_development_dependency "dotenv"
|
29
|
-
spec.add_development_dependency "minitest"
|
30
|
-
spec.add_development_dependency "minitest-reporters"
|
31
|
-
spec.add_development_dependency "minitest-mock_expectations"
|
32
|
-
spec.add_development_dependency "vcr"
|
33
|
-
spec.add_development_dependency "webmock"
|
34
|
-
end
|