solidus_paypal_commerce_platform 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +23 -4
- data/.rubocop.yml +2 -1
- data/CHANGELOG.md +159 -145
- data/Gemfile +14 -1
- data/README.md +2 -2
- data/app/controllers/solidus_paypal_commerce_platform/orders_controller.rb +1 -1
- data/app/models/solidus_paypal_commerce_platform/gateway.rb +0 -2
- data/app/models/solidus_paypal_commerce_platform/payment_method.rb +1 -1
- data/app/models/solidus_paypal_commerce_platform/payment_source.rb +1 -1
- data/app/models/solidus_paypal_commerce_platform/paypal_order.rb +6 -21
- data/lib/paypal/access_token.rb +22 -0
- data/lib/paypal/lib.rb +19 -0
- data/lib/paypal/paypal_checkout_sdk/orders/orders_authorize_request.rb +44 -0
- data/lib/paypal/paypal_checkout_sdk/orders/orders_capture_request.rb +42 -0
- data/lib/paypal/paypal_checkout_sdk/orders/orders_create_request.rb +36 -0
- data/lib/paypal/paypal_checkout_sdk/orders/orders_get_request.rb +26 -0
- data/lib/paypal/paypal_checkout_sdk/orders/orders_patch_request.rb +77 -0
- data/lib/paypal/paypal_checkout_sdk/orders/orders_validate_request.rb +34 -0
- data/lib/paypal/paypal_checkout_sdk/payments/authorizations_capture_request.rb +38 -0
- data/lib/paypal/paypal_checkout_sdk/payments/authorizations_get_request.rb +26 -0
- data/lib/paypal/paypal_checkout_sdk/payments/authorizations_reauthorize_request.rb +45 -0
- data/lib/paypal/paypal_checkout_sdk/payments/authorizations_void_request.rb +27 -0
- data/lib/paypal/paypal_checkout_sdk/payments/captures_get_request.rb +26 -0
- data/lib/paypal/paypal_checkout_sdk/payments/captures_refund_request.rb +40 -0
- data/lib/paypal/paypal_checkout_sdk/payments/refunds_get_request.rb +26 -0
- data/lib/paypal/paypal_environment.rb +39 -0
- data/lib/paypal/paypal_http_client.rb +56 -0
- data/lib/paypal/token_requests.rb +42 -0
- data/lib/solidus_paypal_commerce_platform/access_token_authorization_request.rb +1 -1
- data/lib/solidus_paypal_commerce_platform/client.rb +1 -1
- data/lib/solidus_paypal_commerce_platform/configuration.rb +1 -1
- data/lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/orders/orders_authorize_request.rb +48 -0
- data/lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/orders/orders_capture_request.rb +46 -0
- data/lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/orders/orders_patch_request.rb +80 -0
- data/lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/orders/orders_validate_request.rb +36 -0
- data/lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/payments/authorizations_reauthorize_request.rb +50 -0
- data/lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/payments/captures_refund_request.rb +43 -0
- data/lib/solidus_paypal_commerce_platform/version.rb +1 -1
- data/lib/solidus_paypal_commerce_platform.rb +1 -0
- data/solidus_paypal_commerce_platform.gemspec +8 -7
- metadata +54 -28
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
|
3
|
+
require 'paypalhttp'
|
4
|
+
require 'openssl'
|
5
|
+
|
6
|
+
module PayPal
|
7
|
+
class PayPalHttpClient < PayPalHttp::HttpClient
|
8
|
+
attr_accessor :refresh_token
|
9
|
+
|
10
|
+
def initialize(environment, refresh_token = nil)
|
11
|
+
super(environment)
|
12
|
+
@refresh_token = refresh_token
|
13
|
+
|
14
|
+
add_injector(&:_sign_request)
|
15
|
+
add_injector(&:_add_headers)
|
16
|
+
end
|
17
|
+
|
18
|
+
def user_agent
|
19
|
+
library_details ||= "ruby #{RUBY_VERSION}p#{RUBY_PATCHLEVEL}-#{RUBY_PLATFORM}"
|
20
|
+
begin
|
21
|
+
library_details << ";#{OpenSSL::OPENSSL_LIBRARY_VERSION}"
|
22
|
+
rescue NameError
|
23
|
+
library_details << ";OpenSSL #{OpenSSL::OPENSSL_VERSION}"
|
24
|
+
end
|
25
|
+
|
26
|
+
"PayPalSDK-FORK/rest-sdk-ruby (#{library_details})"
|
27
|
+
end
|
28
|
+
|
29
|
+
def _sign_request(request)
|
30
|
+
return if !_has_auth_header(request) && !_is_auth_request(request)
|
31
|
+
|
32
|
+
if !@access_token || @access_token.expired?
|
33
|
+
access_token_request = PayPal.access_token_request.new(@environment, @refresh_token)
|
34
|
+
token_response = execute(access_token_request)
|
35
|
+
@access_token = PayPal::AccessToken.new(token_response.result)
|
36
|
+
end
|
37
|
+
request.headers["Authorization"] = @access_token.authorization_string
|
38
|
+
end
|
39
|
+
|
40
|
+
def _add_headers(request)
|
41
|
+
request.headers["Accept-Encoding"] = "gzip"
|
42
|
+
request.headers["sdk_name"] = "Checkout SDK"
|
43
|
+
request.headers["sdk_tech_stack"] = "Ruby#{RUBY_VERSION}"
|
44
|
+
request.headers["api_integration_type"] = "PAYPALSDK"
|
45
|
+
end
|
46
|
+
|
47
|
+
def _is_auth_request(request)
|
48
|
+
request.path == '/v1/oauth2/token' ||
|
49
|
+
request.path == '/v1/identity/openidconnect/tokenservice'
|
50
|
+
end
|
51
|
+
|
52
|
+
def _has_auth_header(request)
|
53
|
+
request.headers.key?("Authorization")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
|
3
|
+
module PayPal
|
4
|
+
class AccessTokenRequest
|
5
|
+
attr_accessor :path, :body, :headers, :verb
|
6
|
+
|
7
|
+
def initialize(environment, refresh_token = nil)
|
8
|
+
@path = "/v1/oauth2/token"
|
9
|
+
@body = {
|
10
|
+
grant_type: "client_credentials",
|
11
|
+
}
|
12
|
+
|
13
|
+
if refresh_token
|
14
|
+
@body[:grant_type] = "refresh_token"
|
15
|
+
@body[:refresh_token] = refresh_token
|
16
|
+
end
|
17
|
+
|
18
|
+
@headers = {
|
19
|
+
"Content-Type" => "application/x-www-form-urlencoded",
|
20
|
+
"Authorization" => environment.authorization_string,
|
21
|
+
}
|
22
|
+
@verb = "POST"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class RefreshTokenRequest
|
27
|
+
attr_accessor :path, :body, :headers, :verb
|
28
|
+
|
29
|
+
def initialize(environment, authorization_code)
|
30
|
+
@path = "/v1/identity/openidconnect/tokenservice"
|
31
|
+
@body = {
|
32
|
+
grant_type: "authorization_code",
|
33
|
+
code: authorization_code,
|
34
|
+
}
|
35
|
+
@headers = {
|
36
|
+
"Content-Type" => "application/x-www-form-urlencoded",
|
37
|
+
"Authorization" => environment.authorization_string,
|
38
|
+
}
|
39
|
+
@verb = "POST"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -9,7 +9,7 @@ module SolidusPaypalCommercePlatform
|
|
9
9
|
@path = "/v1/oauth2/token"
|
10
10
|
@headers = {
|
11
11
|
"Content-Type" => "application/x-www-form-urlencoded",
|
12
|
-
"Authorization" => environment.
|
12
|
+
"Authorization" => environment.authorization_string,
|
13
13
|
}
|
14
14
|
@body = {
|
15
15
|
grant_type: "authorization_code",
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'solidus_paypal_commerce_platform/access_token_authorization_request'
|
4
4
|
require 'solidus_paypal_commerce_platform/fetch_merchant_credentials_request'
|
5
5
|
|
6
|
-
require '
|
6
|
+
require 'paypalhttp'
|
7
7
|
|
8
8
|
module SolidusPaypalCommercePlatform
|
9
9
|
class Client
|
data/lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/orders/orders_authorize_request.rb
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# frozen_string_literal :true
|
4
|
+
|
5
|
+
# This module was automatically generated from paypal_checkout_sdk 1.0.1
|
6
|
+
|
7
|
+
require 'cgi'
|
8
|
+
|
9
|
+
module SolidusPaypalCommercePlatform
|
10
|
+
module PayPalCheckoutSdk
|
11
|
+
module Orders
|
12
|
+
#
|
13
|
+
# Authorizes payment for an order. The response shows details of authorizations.
|
14
|
+
# You can make this call only if you specified `intent=AUTHORIZE` in the
|
15
|
+
# create order call.
|
16
|
+
#
|
17
|
+
class OrdersAuthorizeRequest
|
18
|
+
attr_accessor :path, :body, :headers, :verb
|
19
|
+
|
20
|
+
def initialize(order_id)
|
21
|
+
@headers = {}
|
22
|
+
@body = nil
|
23
|
+
@verb = "POST"
|
24
|
+
@path = "/v2/checkout/orders/{order_id}/authorize?"
|
25
|
+
|
26
|
+
@path = @path.gsub("{order_id}", CGI.escape(order_id.to_s))
|
27
|
+
@headers["Content-Type"] = "application/json"
|
28
|
+
end
|
29
|
+
|
30
|
+
def pay_pal_client_metadata_id(pay_pal_client_metadata_id)
|
31
|
+
@headers["PayPal-Client-Metadata-Id"] = pay_pal_client_metadata_id
|
32
|
+
end
|
33
|
+
|
34
|
+
def pay_pal_request_id(pay_pal_request_id)
|
35
|
+
@headers["PayPal-Request-Id"] = pay_pal_request_id
|
36
|
+
end
|
37
|
+
|
38
|
+
def prefer(prefer)
|
39
|
+
@headers["Prefer"] = prefer
|
40
|
+
end
|
41
|
+
|
42
|
+
def request_body(order_action_request)
|
43
|
+
@body = order_action_request
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/orders/orders_capture_request.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# frozen_string_literal :true
|
4
|
+
|
5
|
+
# This module was automatically generated from paypal_checkout_sdk 1.0.1
|
6
|
+
|
7
|
+
require 'cgi'
|
8
|
+
|
9
|
+
module SolidusPaypalCommercePlatform
|
10
|
+
module PayPalCheckoutSdk
|
11
|
+
module Orders
|
12
|
+
#
|
13
|
+
# Captures a payment for an order.
|
14
|
+
#
|
15
|
+
class OrdersCaptureRequest
|
16
|
+
attr_accessor :path, :body, :headers, :verb
|
17
|
+
|
18
|
+
def initialize(order_id)
|
19
|
+
@headers = {}
|
20
|
+
@body = nil
|
21
|
+
@verb = "POST"
|
22
|
+
@path = "/v2/checkout/orders/{order_id}/capture?"
|
23
|
+
|
24
|
+
@path = @path.gsub("{order_id}", CGI.escape(order_id.to_s))
|
25
|
+
@headers["Content-Type"] = "application/json"
|
26
|
+
end
|
27
|
+
|
28
|
+
def pay_pal_client_metadata_id(pay_pal_client_metadata_id)
|
29
|
+
@headers["PayPal-Client-Metadata-Id"] = pay_pal_client_metadata_id
|
30
|
+
end
|
31
|
+
|
32
|
+
def pay_pal_request_id(pay_pal_request_id)
|
33
|
+
@headers["PayPal-Request-Id"] = pay_pal_request_id
|
34
|
+
end
|
35
|
+
|
36
|
+
def prefer(prefer)
|
37
|
+
@headers["Prefer"] = prefer
|
38
|
+
end
|
39
|
+
|
40
|
+
def request_body(order_action_request)
|
41
|
+
@body = order_action_request
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# frozen_string_literal :true
|
4
|
+
|
5
|
+
# This module was automatically generated from paypal_checkout_sdk 1.0.1
|
6
|
+
require 'cgi'
|
7
|
+
|
8
|
+
module SolidusPaypalCommercePlatform
|
9
|
+
module PayPalCheckoutSdk
|
10
|
+
module Orders
|
11
|
+
#
|
12
|
+
# Updates an order that has the `CREATED` or `APPROVED` status. You cannot update
|
13
|
+
# an order with `COMPLETED` status. You can patch these attributes and objects:
|
14
|
+
# <table>
|
15
|
+
# <thead>
|
16
|
+
# <tr>
|
17
|
+
# <th align="left">Attribute or object</th>
|
18
|
+
# <th align="left">Operations</th>
|
19
|
+
# </tr>
|
20
|
+
# </thead>
|
21
|
+
# <tbody>
|
22
|
+
# <tr>
|
23
|
+
# <td><code>intent</code></td>
|
24
|
+
# <td align="left">Replace</td>
|
25
|
+
# </tr>
|
26
|
+
# <tr>
|
27
|
+
# <td><code>purchase_units</code></td>
|
28
|
+
# <td align="left">Replace, add</td>
|
29
|
+
# </tr>
|
30
|
+
# <tr>
|
31
|
+
# <td><code>purchase_units[].custom_id</code></td>
|
32
|
+
# <td align="left">Replace, add, remove</td>
|
33
|
+
# </tr>
|
34
|
+
# <tr>
|
35
|
+
# <td><code>purchase_units[].description</code></td>
|
36
|
+
# <td align="left">Replace, add, remove</td>
|
37
|
+
# </tr>
|
38
|
+
# <tr>
|
39
|
+
# <td><code>purchase_units[].payee.email</code></td>
|
40
|
+
# <td align="left">Replace, add</td>
|
41
|
+
# </tr>
|
42
|
+
# <tr>
|
43
|
+
# <td><code>purchase_units[].shipping</code></td>
|
44
|
+
# <td align="left">Replace, add, remove</td>
|
45
|
+
# </tr>
|
46
|
+
# <tr>
|
47
|
+
# <td><code>purchase_units[].soft_descriptor</code></td>
|
48
|
+
# <td align="left">Replace, add, remove</td>
|
49
|
+
# </tr>
|
50
|
+
# <tr>
|
51
|
+
# <td><code>purchase_units[].amount</code></td>
|
52
|
+
# <td align="left">Replace</td>
|
53
|
+
# </tr>
|
54
|
+
# <tr>
|
55
|
+
# <td><code>purchase_units[].invoice_id</code></td>
|
56
|
+
# <td align="left">Replace, add, remove</td>
|
57
|
+
# </tr>
|
58
|
+
# </tbody>
|
59
|
+
# </table>
|
60
|
+
#
|
61
|
+
class OrdersPatchRequest
|
62
|
+
attr_accessor :path, :body, :headers, :verb
|
63
|
+
|
64
|
+
def initialize(order_id)
|
65
|
+
@headers = {}
|
66
|
+
@body = nil
|
67
|
+
@verb = "PATCH"
|
68
|
+
@path = "/v2/checkout/orders/{order_id}?"
|
69
|
+
|
70
|
+
@path = @path.gsub("{order_id}", CGI.escape(order_id.to_s))
|
71
|
+
@headers["Content-Type"] = "application/json"
|
72
|
+
end
|
73
|
+
|
74
|
+
def request_body(patch_request)
|
75
|
+
@body = patch_request
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
data/lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/orders/orders_validate_request.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# frozen_string_literal :true
|
4
|
+
|
5
|
+
# This module was automatically generated from paypal_checkout_sdk 1.0.1
|
6
|
+
require 'cgi'
|
7
|
+
module SolidusPaypalCommercePlatform
|
8
|
+
module PayPalCheckoutSdk
|
9
|
+
module Orders
|
10
|
+
#
|
11
|
+
# Validates a payment method and checks it for contingencies.
|
12
|
+
#
|
13
|
+
class OrdersValidateRequest
|
14
|
+
attr_accessor :path, :body, :headers, :verb
|
15
|
+
|
16
|
+
def initialize(order_id)
|
17
|
+
@headers = {}
|
18
|
+
@body = nil
|
19
|
+
@verb = "POST"
|
20
|
+
@path = "/v2/checkout/orders/{order_id}/validate-payment-method?"
|
21
|
+
|
22
|
+
@path = @path.gsub("{order_id}", CGI.escape(order_id.to_s))
|
23
|
+
@headers["Content-Type"] = "application/json"
|
24
|
+
end
|
25
|
+
|
26
|
+
def pay_pal_client_metadata_id(pay_pal_client_metadata_id)
|
27
|
+
@headers["PayPal-Client-Metadata-Id"] = pay_pal_client_metadata_id
|
28
|
+
end
|
29
|
+
|
30
|
+
def request_body(order_action_request)
|
31
|
+
@body = order_action_request
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# frozen_string_literal :true
|
4
|
+
|
5
|
+
# This module was automatically generated from paypal_checkout_sdk 1.0.1
|
6
|
+
require 'cgi'
|
7
|
+
|
8
|
+
module SolidusPaypalCommercePlatform
|
9
|
+
module PayPalCheckoutSdk
|
10
|
+
module Payments
|
11
|
+
#
|
12
|
+
# Reauthorizes an authorized PayPal account payment, by ID. To ensure
|
13
|
+
# that funds are still available, reauthorize a payment after its
|
14
|
+
# initial three-day honor period expires. You can reauthorize a payment
|
15
|
+
# only once from days four to 29.<br/><br/>If 30 days have transpired since
|
16
|
+
# the date of the original authorization, you must create an authorized
|
17
|
+
# payment instead of reauthorizing the original authorized payment.<br/><br/>
|
18
|
+
# A reauthorized payment itself has a new honor period of three days.
|
19
|
+
# <br/><br/>You can reauthorize an authorized payment once for up to 115%
|
20
|
+
# of the original authorized amount, not to exceed an increase of
|
21
|
+
# $75 USD.<br/><br/>Supports only the `amount` request parameter.
|
22
|
+
#
|
23
|
+
class AuthorizationsReauthorizeRequest
|
24
|
+
attr_accessor :path, :body, :headers, :verb
|
25
|
+
|
26
|
+
def initialize(authorization_id)
|
27
|
+
@headers = {}
|
28
|
+
@body = nil
|
29
|
+
@verb = "POST"
|
30
|
+
@path = "/v2/payments/authorizations/{authorization_id}/reauthorize?"
|
31
|
+
|
32
|
+
@path = @path.gsub("{authorization_id}", CGI.escape(authorization_id.to_s))
|
33
|
+
@headers["Content-Type"] = "application/json"
|
34
|
+
end
|
35
|
+
|
36
|
+
def pay_pal_request_id(pay_pal_request_id)
|
37
|
+
@headers["PayPal-Request-Id"] = pay_pal_request_id
|
38
|
+
end
|
39
|
+
|
40
|
+
def prefer(prefer)
|
41
|
+
@headers["Prefer"] = prefer
|
42
|
+
end
|
43
|
+
|
44
|
+
def request_body(reauthorize_request)
|
45
|
+
@body = reauthorize_request
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
data/lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/payments/captures_refund_request.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# frozen_string_literal :true
|
4
|
+
|
5
|
+
# This module was automatically generated from paypal_checkout_sdk 1.0.1
|
6
|
+
require 'cgi'
|
7
|
+
|
8
|
+
module SolidusPaypalCommercePlatform
|
9
|
+
module PayPalCheckoutSdk
|
10
|
+
module Payments
|
11
|
+
#
|
12
|
+
# Refunds a captured payment, by ID. For a full refund, include an
|
13
|
+
# empty payload in the JSON request body. For a partial refund,
|
14
|
+
# include an <code>amount</code> object in the JSON request body.
|
15
|
+
#
|
16
|
+
class CapturesRefundRequest
|
17
|
+
attr_accessor :path, :body, :headers, :verb
|
18
|
+
|
19
|
+
def initialize(capture_id)
|
20
|
+
@headers = {}
|
21
|
+
@body = nil
|
22
|
+
@verb = "POST"
|
23
|
+
@path = "/v2/payments/captures/{capture_id}/refund?"
|
24
|
+
|
25
|
+
@path = @path.gsub("{capture_id}", CGI.escape(capture_id.to_s))
|
26
|
+
@headers["Content-Type"] = "application/json"
|
27
|
+
end
|
28
|
+
|
29
|
+
def pay_pal_request_id(pay_pal_request_id)
|
30
|
+
@headers["PayPal-Request-Id"] = pay_pal_request_id
|
31
|
+
end
|
32
|
+
|
33
|
+
def prefer(prefer)
|
34
|
+
@headers["Prefer"] = prefer
|
35
|
+
end
|
36
|
+
|
37
|
+
def request_body(refund_request)
|
38
|
+
@body = refund_request
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -7,6 +7,7 @@ require 'solidus_paypal_commerce_platform/client'
|
|
7
7
|
require 'solidus_paypal_commerce_platform/configuration'
|
8
8
|
require 'solidus_paypal_commerce_platform/version'
|
9
9
|
require 'solidus_paypal_commerce_platform/engine'
|
10
|
+
require 'paypal/lib'
|
10
11
|
|
11
12
|
module SolidusPaypalCommercePlatform
|
12
13
|
class << self
|
@@ -9,15 +9,15 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = 'contact@solidus.io'
|
10
10
|
|
11
11
|
spec.summary = 'Integrate Solidus with Paypal Commerce Platform'
|
12
|
-
spec.homepage = 'https://github.com/solidusio
|
12
|
+
spec.homepage = 'https://github.com/solidusio/solidus_paypal_commerce_platform'
|
13
13
|
spec.license = 'BSD-3-Clause'
|
14
14
|
|
15
15
|
spec.metadata['homepage_uri'] = spec.homepage
|
16
|
-
spec.metadata['source_code_uri'] = 'https://github.com/solidusio
|
17
|
-
spec.metadata['changelog_uri'] = 'https://github.com/solidusio
|
16
|
+
spec.metadata['source_code_uri'] = 'https://github.com/solidusio/solidus_paypal_commerce_platform'
|
17
|
+
spec.metadata['changelog_uri'] = 'https://github.com/solidusio/solidus_paypal_commerce_platform/releases'
|
18
18
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
19
19
|
|
20
|
-
spec.required_ruby_version = Gem::Requirement.new('
|
20
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.7')
|
21
21
|
|
22
22
|
# Specify which files should be added to the gem when it is released.
|
23
23
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -29,11 +29,12 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
31
|
spec.add_dependency 'deface', '~> 1.5'
|
32
|
-
spec.add_dependency '
|
33
|
-
spec.add_dependency '
|
32
|
+
spec.add_dependency 'solidus_api'
|
33
|
+
spec.add_dependency 'solidus_core', '~> 3.0'
|
34
|
+
spec.add_dependency 'solidus_support', '>= 0.8.0'
|
34
35
|
spec.add_dependency 'solidus_webhooks', '~> 0.2'
|
35
36
|
|
36
|
-
spec.add_dependency '
|
37
|
+
spec.add_dependency 'paypalhttp'
|
37
38
|
|
38
39
|
spec.add_development_dependency 'cuprite'
|
39
40
|
spec.add_development_dependency 'solidus_dev_support', '~> 2.5'
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_paypal_commerce_platform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Denny
|
8
8
|
- Elia Schito
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-10-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: deface
|
@@ -26,25 +26,33 @@ dependencies:
|
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.5'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: solidus_api
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
35
|
-
- - "<"
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '4'
|
34
|
+
version: '0'
|
38
35
|
type: :runtime
|
39
36
|
prerelease: false
|
40
37
|
version_requirements: !ruby/object:Gem::Requirement
|
41
38
|
requirements:
|
42
39
|
- - ">="
|
43
40
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
45
|
-
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: solidus_core
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '3.0'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
46
54
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
55
|
+
version: '3.0'
|
48
56
|
- !ruby/object:Gem::Dependency
|
49
57
|
name: solidus_support
|
50
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,9 +60,6 @@ dependencies:
|
|
52
60
|
- - ">="
|
53
61
|
- !ruby/object:Gem::Version
|
54
62
|
version: 0.8.0
|
55
|
-
- - "<"
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: '1'
|
58
63
|
type: :runtime
|
59
64
|
prerelease: false
|
60
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -62,9 +67,6 @@ dependencies:
|
|
62
67
|
- - ">="
|
63
68
|
- !ruby/object:Gem::Version
|
64
69
|
version: 0.8.0
|
65
|
-
- - "<"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '1'
|
68
70
|
- !ruby/object:Gem::Dependency
|
69
71
|
name: solidus_webhooks
|
70
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,7 +82,7 @@ dependencies:
|
|
80
82
|
- !ruby/object:Gem::Version
|
81
83
|
version: '0.2'
|
82
84
|
- !ruby/object:Gem::Dependency
|
83
|
-
name:
|
85
|
+
name: paypalhttp
|
84
86
|
requirement: !ruby/object:Gem::Requirement
|
85
87
|
requirements:
|
86
88
|
- - ">="
|
@@ -121,7 +123,7 @@ dependencies:
|
|
121
123
|
- - "~>"
|
122
124
|
- !ruby/object:Gem::Version
|
123
125
|
version: '2.5'
|
124
|
-
description:
|
126
|
+
description:
|
125
127
|
email: contact@solidus.io
|
126
128
|
executables: []
|
127
129
|
extensions: []
|
@@ -189,12 +191,36 @@ files:
|
|
189
191
|
- db/migrate/20211220133406_add_paypal_funding_source_to_paypal_commerce_platform_sources.rb
|
190
192
|
- lib/generators/solidus_paypal_commerce_platform/install/install_generator.rb
|
191
193
|
- lib/generators/solidus_paypal_commerce_platform/install/templates/initializer.rb
|
194
|
+
- lib/paypal/access_token.rb
|
195
|
+
- lib/paypal/lib.rb
|
196
|
+
- lib/paypal/paypal_checkout_sdk/orders/orders_authorize_request.rb
|
197
|
+
- lib/paypal/paypal_checkout_sdk/orders/orders_capture_request.rb
|
198
|
+
- lib/paypal/paypal_checkout_sdk/orders/orders_create_request.rb
|
199
|
+
- lib/paypal/paypal_checkout_sdk/orders/orders_get_request.rb
|
200
|
+
- lib/paypal/paypal_checkout_sdk/orders/orders_patch_request.rb
|
201
|
+
- lib/paypal/paypal_checkout_sdk/orders/orders_validate_request.rb
|
202
|
+
- lib/paypal/paypal_checkout_sdk/payments/authorizations_capture_request.rb
|
203
|
+
- lib/paypal/paypal_checkout_sdk/payments/authorizations_get_request.rb
|
204
|
+
- lib/paypal/paypal_checkout_sdk/payments/authorizations_reauthorize_request.rb
|
205
|
+
- lib/paypal/paypal_checkout_sdk/payments/authorizations_void_request.rb
|
206
|
+
- lib/paypal/paypal_checkout_sdk/payments/captures_get_request.rb
|
207
|
+
- lib/paypal/paypal_checkout_sdk/payments/captures_refund_request.rb
|
208
|
+
- lib/paypal/paypal_checkout_sdk/payments/refunds_get_request.rb
|
209
|
+
- lib/paypal/paypal_environment.rb
|
210
|
+
- lib/paypal/paypal_http_client.rb
|
211
|
+
- lib/paypal/token_requests.rb
|
192
212
|
- lib/solidus_paypal_commerce_platform.rb
|
193
213
|
- lib/solidus_paypal_commerce_platform/access_token_authorization_request.rb
|
194
214
|
- lib/solidus_paypal_commerce_platform/client.rb
|
195
215
|
- lib/solidus_paypal_commerce_platform/configuration.rb
|
196
216
|
- lib/solidus_paypal_commerce_platform/engine.rb
|
197
217
|
- lib/solidus_paypal_commerce_platform/fetch_merchant_credentials_request.rb
|
218
|
+
- lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/orders/orders_authorize_request.rb
|
219
|
+
- lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/orders/orders_capture_request.rb
|
220
|
+
- lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/orders/orders_patch_request.rb
|
221
|
+
- lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/orders/orders_validate_request.rb
|
222
|
+
- lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/payments/authorizations_reauthorize_request.rb
|
223
|
+
- lib/solidus_paypal_commerce_platform/paypal_checkout_sdk/payments/captures_refund_request.rb
|
198
224
|
- lib/solidus_paypal_commerce_platform/testing_support/factories.rb
|
199
225
|
- lib/solidus_paypal_commerce_platform/version.rb
|
200
226
|
- lib/views/api/spree/api/payments/source_views/_paypal_commerce_platform.json.jbuilder
|
@@ -209,31 +235,31 @@ files:
|
|
209
235
|
- lib/views/frontend/spree/orders/payment/_paypal_commerce_platform.html.erb
|
210
236
|
- lib/views/frontend/spree/products/payment/_paypal_commerce_platform.html.erb
|
211
237
|
- solidus_paypal_commerce_platform.gemspec
|
212
|
-
homepage: https://github.com/solidusio
|
238
|
+
homepage: https://github.com/solidusio/solidus_paypal_commerce_platform
|
213
239
|
licenses:
|
214
240
|
- BSD-3-Clause
|
215
241
|
metadata:
|
216
|
-
homepage_uri: https://github.com/solidusio
|
217
|
-
source_code_uri: https://github.com/solidusio
|
218
|
-
changelog_uri: https://github.com/solidusio
|
242
|
+
homepage_uri: https://github.com/solidusio/solidus_paypal_commerce_platform
|
243
|
+
source_code_uri: https://github.com/solidusio/solidus_paypal_commerce_platform
|
244
|
+
changelog_uri: https://github.com/solidusio/solidus_paypal_commerce_platform/releases
|
219
245
|
rubygems_mfa_required: 'true'
|
220
|
-
post_install_message:
|
246
|
+
post_install_message:
|
221
247
|
rdoc_options: []
|
222
248
|
require_paths:
|
223
249
|
- lib
|
224
250
|
required_ruby_version: !ruby/object:Gem::Requirement
|
225
251
|
requirements:
|
226
|
-
- - "
|
252
|
+
- - ">="
|
227
253
|
- !ruby/object:Gem::Version
|
228
|
-
version: '2.
|
254
|
+
version: '2.7'
|
229
255
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
230
256
|
requirements:
|
231
257
|
- - ">="
|
232
258
|
- !ruby/object:Gem::Version
|
233
259
|
version: '0'
|
234
260
|
requirements: []
|
235
|
-
rubygems_version: 3.
|
236
|
-
signing_key:
|
261
|
+
rubygems_version: 3.3.21
|
262
|
+
signing_key:
|
237
263
|
specification_version: 4
|
238
264
|
summary: Integrate Solidus with Paypal Commerce Platform
|
239
265
|
test_files: []
|