paysafe 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.env.sample +5 -4
- data/.github/dependabot.yml +16 -0
- data/.github/workflows/ci.yml +29 -19
- data/CHANGELOG.md +4 -0
- data/Gemfile +6 -1
- data/Gemfile.lock +37 -24
- data/codecov.yml +5 -0
- 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
- data/paysafe.gemspec +1 -1
- metadata +12 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1bbfde0dd2895a82c9adc48a6f6c9d6042d0df1bc0c66178757b6294d0ac7b2
|
4
|
+
data.tar.gz: dbcfa29e11a150101372cd477958e0bb0f5cbada85634de107f924493324123f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6252b51e47585cd89fc225c3af1a5b943ef3c1989ab64ef9e093f973fe988129db2b46d2c64bfe45ae0dfdee068e58fbc93d5a99007c513322d47d80e56fba7
|
7
|
+
data.tar.gz: 37f20a7402ed60e2b51757c55326b275e4103962cfa44b58ae0e6400a598f552d7955966fe4e954a8e0a38c3e129877c499e70f2b21696a67234fe9d25c49f38
|
data/.env.sample
CHANGED
@@ -2,14 +2,15 @@ PAYSAFE_ACCOUNT_NUMBER="YOUR_ACCOUNT_NUMBER"
|
|
2
2
|
PAYSAFE_API_KEY="YOUR_API_KEY"
|
3
3
|
PAYSAFE_API_SECRET="YOUR_API_SECRET"
|
4
4
|
|
5
|
-
#
|
6
|
-
# Use Tokens which utilize a different API key and secret.
|
5
|
+
# Optional. For generating your own Single Use Tokens.
|
7
6
|
PAYSAFE_SUT_API_KEY="YOUR_SUT_API_KEY"
|
8
7
|
PAYSAFE_SUT_API_SECRET="YOUR_SUT_API_SECRET"
|
9
8
|
|
10
|
-
#
|
11
|
-
#
|
9
|
+
# For the Paysafe "Payments API" (aka Unity platform). This will
|
10
|
+
# very likely be the same values as the first set at the top.
|
12
11
|
PAYSAFE_UNITY_API_KEY="YOUR_UNITY_API_KEY"
|
13
12
|
PAYSAFE_UNITY_API_SECRET="YOUR_UNITY_API_SECRET"
|
13
|
+
|
14
|
+
# Optional. Nothing is using this out of the box.
|
14
15
|
PAYSAFE_UNITY_SUT_API_KEY="YOUR_UNITY_SUT_API_KEY"
|
15
16
|
PAYSAFE_UNITY_SUT_API_SECRET="YOUR_UNITY_SUT_API_SECRET"
|
@@ -0,0 +1,16 @@
|
|
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
|
10
|
+
- package-ecosystem: github-actions
|
11
|
+
directory: "/"
|
12
|
+
schedule:
|
13
|
+
interval: daily
|
14
|
+
time: "08:30"
|
15
|
+
timezone: America/New_York
|
16
|
+
open-pull-requests-limit: 99
|
data/.github/workflows/ci.yml
CHANGED
@@ -11,24 +11,34 @@ jobs:
|
|
11
11
|
runs-on: ubuntu-latest
|
12
12
|
strategy:
|
13
13
|
matrix:
|
14
|
-
ruby: [ '
|
14
|
+
ruby: [ '3.0', '3.1', '3.2' ]
|
15
|
+
env:
|
16
|
+
CODECOV_UPLOAD_TAG: ${{ matrix.ruby }}
|
15
17
|
name: Ruby ${{ matrix.ruby }}
|
16
18
|
steps:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
19
|
+
- uses: actions/checkout@v3
|
20
|
+
- uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
23
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
24
|
+
- name: Run Tests
|
25
|
+
env:
|
26
|
+
COVERAGE: true
|
27
|
+
RUBYOPT: "-W:deprecated"
|
28
|
+
PAYSAFE_ACCOUNT_NUMBER: test
|
29
|
+
PAYSAFE_API_KEY: test
|
30
|
+
PAYSAFE_API_SECRET: test
|
31
|
+
PAYSAFE_SUT_API_KEY: test
|
32
|
+
PAYSAFE_SUT_API_SECRET: test
|
33
|
+
PAYSAFE_UNITY_API_KEY: test
|
34
|
+
PAYSAFE_UNITY_API_SECRET: test
|
35
|
+
PAYSAFE_UNITY_SUT_API_KEY: test
|
36
|
+
PAYSAFE_UNITY_SUT_API_SECRET: test
|
37
|
+
run: |
|
38
|
+
bundle exec rake
|
39
|
+
- name: Upload coverage to Codecov
|
40
|
+
uses: codecov/codecov-action@v3
|
41
|
+
with:
|
42
|
+
env_vars: CODECOV_UPLOAD_TAG
|
43
|
+
fail_ci_if_error: true
|
44
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
## 0.15.0 (2023-07-20)
|
5
|
+
|
6
|
+
* Updated the `create_single_use_customer_token` method to account for more fields in the response object.
|
7
|
+
|
4
8
|
## 0.14.0 (2021-01-19)
|
5
9
|
|
6
10
|
* No code changes - moved repository to Jackpocket organization and updated URLs
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,53 +1,64 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
paysafe (0.
|
5
|
-
http (>= 4, <
|
4
|
+
paysafe (0.15.0)
|
5
|
+
http (>= 4, < 6)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.
|
11
|
-
public_suffix (>= 2.0.2, <
|
10
|
+
addressable (2.8.4)
|
11
|
+
public_suffix (>= 2.0.2, < 6.0)
|
12
12
|
ansi (1.5.0)
|
13
13
|
builder (3.2.4)
|
14
14
|
crack (0.4.5)
|
15
15
|
rexml
|
16
|
+
docile (1.4.0)
|
16
17
|
domain_name (0.5.20190701)
|
17
18
|
unf (>= 0.0.5, < 1.0.0)
|
18
|
-
dotenv (2.
|
19
|
-
ffi (1.
|
19
|
+
dotenv (2.8.1)
|
20
|
+
ffi (1.15.5)
|
20
21
|
ffi-compiler (1.0.1)
|
21
22
|
ffi (>= 1.0.0)
|
22
23
|
rake
|
23
24
|
hashdiff (1.0.1)
|
24
|
-
http (
|
25
|
-
addressable (~> 2.
|
25
|
+
http (5.1.1)
|
26
|
+
addressable (~> 2.8)
|
26
27
|
http-cookie (~> 1.0)
|
27
28
|
http-form_data (~> 2.2)
|
28
|
-
|
29
|
-
http-cookie (1.0.
|
29
|
+
llhttp-ffi (~> 0.4.0)
|
30
|
+
http-cookie (1.0.5)
|
30
31
|
domain_name (~> 0.5)
|
31
32
|
http-form_data (2.3.0)
|
32
|
-
|
33
|
-
ffi-compiler (
|
34
|
-
|
35
|
-
minitest
|
36
|
-
minitest-
|
33
|
+
llhttp-ffi (0.4.0)
|
34
|
+
ffi-compiler (~> 1.0)
|
35
|
+
rake (~> 13.0)
|
36
|
+
minitest (5.18.1)
|
37
|
+
minitest-mock_expectations (1.2.0)
|
38
|
+
minitest-reporters (1.6.0)
|
37
39
|
ansi
|
38
40
|
builder
|
39
41
|
minitest (>= 5.0)
|
40
42
|
ruby-progressbar
|
41
|
-
public_suffix (
|
42
|
-
rake (13.0.
|
43
|
-
rexml (3.2.
|
44
|
-
ruby-progressbar (1.
|
43
|
+
public_suffix (5.0.3)
|
44
|
+
rake (13.0.6)
|
45
|
+
rexml (3.2.5)
|
46
|
+
ruby-progressbar (1.13.0)
|
47
|
+
simplecov (0.22.0)
|
48
|
+
docile (~> 1.1)
|
49
|
+
simplecov-html (~> 0.11)
|
50
|
+
simplecov_json_formatter (~> 0.1)
|
51
|
+
simplecov-cobertura (2.1.0)
|
52
|
+
rexml
|
53
|
+
simplecov (~> 0.19)
|
54
|
+
simplecov-html (0.12.3)
|
55
|
+
simplecov_json_formatter (0.1.4)
|
45
56
|
unf (0.1.4)
|
46
57
|
unf_ext
|
47
|
-
unf_ext (0.0.
|
48
|
-
vcr (6.
|
49
|
-
webmock (3.
|
50
|
-
addressable (>= 2.
|
58
|
+
unf_ext (0.0.8.2)
|
59
|
+
vcr (6.2.0)
|
60
|
+
webmock (3.18.1)
|
61
|
+
addressable (>= 2.8.0)
|
51
62
|
crack (>= 0.3.2)
|
52
63
|
hashdiff (>= 0.4.0, < 2.0.0)
|
53
64
|
|
@@ -62,8 +73,10 @@ DEPENDENCIES
|
|
62
73
|
minitest-reporters
|
63
74
|
paysafe!
|
64
75
|
rake
|
76
|
+
simplecov
|
77
|
+
simplecov-cobertura
|
65
78
|
vcr
|
66
79
|
webmock
|
67
80
|
|
68
81
|
BUNDLED WITH
|
69
|
-
2.
|
82
|
+
2.3.10
|
data/codecov.yml
ADDED
@@ -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"
|
data/paysafe.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.required_ruby_version = '>= 2.5'
|
23
23
|
|
24
|
-
spec.add_dependency "http", '>= 4', '<
|
24
|
+
spec.add_dependency "http", '>= 4', '< 6'
|
25
25
|
|
26
26
|
spec.add_development_dependency "rake"
|
27
27
|
spec.add_development_dependency "bundler", "~> 2.0"
|
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.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Julio
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-20 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,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '6'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rake
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +150,7 @@ extensions: []
|
|
150
150
|
extra_rdoc_files: []
|
151
151
|
files:
|
152
152
|
- ".env.sample"
|
153
|
+
- ".github/dependabot.yml"
|
153
154
|
- ".github/workflows/ci.yml"
|
154
155
|
- ".gitignore"
|
155
156
|
- CHANGELOG.md
|
@@ -161,6 +162,7 @@ files:
|
|
161
162
|
- Rakefile
|
162
163
|
- bin/console
|
163
164
|
- bin/setup
|
165
|
+
- codecov.yml
|
164
166
|
- lib/paysafe.rb
|
165
167
|
- lib/paysafe/address.rb
|
166
168
|
- lib/paysafe/api/base_api.rb
|
@@ -176,6 +178,7 @@ files:
|
|
176
178
|
- lib/paysafe/error.rb
|
177
179
|
- lib/paysafe/gateway_response.rb
|
178
180
|
- lib/paysafe/payment.rb
|
181
|
+
- lib/paysafe/payment_handle.rb
|
179
182
|
- lib/paysafe/payment_method.rb
|
180
183
|
- lib/paysafe/payment_methods.rb
|
181
184
|
- lib/paysafe/payment_processor.rb
|
@@ -184,6 +187,7 @@ files:
|
|
184
187
|
- lib/paysafe/refinements/snake_case.rb
|
185
188
|
- lib/paysafe/rest/client.rb
|
186
189
|
- lib/paysafe/result.rb
|
190
|
+
- lib/paysafe/single_use_customer_token.rb
|
187
191
|
- lib/paysafe/single_use_token.rb
|
188
192
|
- lib/paysafe/standalone_credit.rb
|
189
193
|
- lib/paysafe/verification.rb
|
@@ -193,7 +197,7 @@ homepage: https://github.com/jackpocket/paysafe
|
|
193
197
|
licenses:
|
194
198
|
- MIT
|
195
199
|
metadata: {}
|
196
|
-
post_install_message:
|
200
|
+
post_install_message:
|
197
201
|
rdoc_options: []
|
198
202
|
require_paths:
|
199
203
|
- lib
|
@@ -208,8 +212,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
212
|
- !ruby/object:Gem::Version
|
209
213
|
version: '0'
|
210
214
|
requirements: []
|
211
|
-
rubygems_version: 3.
|
212
|
-
signing_key:
|
215
|
+
rubygems_version: 3.4.13
|
216
|
+
signing_key:
|
213
217
|
specification_version: 4
|
214
218
|
summary: A Ruby interface to the Paysafe REST API.
|
215
219
|
test_files: []
|