solidus_paypal_commerce_platform 0.6.0 → 0.7.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/.gem_release.yml +1 -1
- data/CHANGELOG.md +17 -12
- data/README.md +2 -1
- data/app/controllers/solidus_paypal_commerce_platform/paypal_orders_controller.rb +1 -1
- data/app/models/solidus_paypal_commerce_platform/payment_method.rb +18 -1
- data/config/locales/en.yml +1 -0
- data/lib/solidus_paypal_commerce_platform/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b52bbb8e31d082c1202fc2ffa6a587492ecedfd6f975dba8523619cab84831d1
|
4
|
+
data.tar.gz: c4b0684da1b34c7612688d3fe64af5f9abfe2045a5d68b453dc6b64ee5d7f2d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a7f24f611ed07c49285287aede4c9de8436b3374249c6611b024f5bbeab98e332d7c3123aab53998c74190333d088884901a88c67100e7849493ab21b4c0a0c
|
7
|
+
data.tar.gz: 16fea0636664456280fc3e92de96110750dc81e6d7121a027c93b00a8b15c0b9ed940b51d98e4aa4dab6f429866adb3128005cab28d039e8f9d2e439089f2dee
|
data/.gem_release.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,21 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [v0.
|
3
|
+
## [v0.7.0](https://github.com/solidusio/solidus_paypal_commerce_platform/tree/v0.7.0) (2023-01-18)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/solidusio/solidus_paypal_commerce_platform/compare/v0.6.0...v0.
|
5
|
+
[Full Changelog](https://github.com/solidusio/solidus_paypal_commerce_platform/compare/v0.6.0...v0.7.0)
|
6
6
|
|
7
7
|
**Merged pull requests:**
|
8
8
|
|
9
|
-
-
|
10
|
-
|
11
|
-
* require the payment_method_id param when loading the payment method
|
12
|
-
* mark the javascript_sdk_url as HTML safe
|
13
|
-
* ensure amounts are presented with 2 decimals for the PayPal API
|
14
|
-
* fixed the sign in requests
|
15
|
-
- Reorganize the install generator and deprecate `--skip-migrations` [\#167](https://github.com/solidusio/solidus_paypal_commerce_platform/pull/167) ([elia](https://github.com/elia))
|
16
|
-
- Move 'shipping\_preference' preference under PaypalOrder\#to\_json [\#152](https://github.com/solidusio/solidus_paypal_commerce_platform/pull/152) ([retsef](https://github.com/retsef))
|
17
|
-
- Truncate the product name to 127 characters [\#139](https://github.com/solidusio/solidus_paypal_commerce_platform/pull/139) ([DanielePalombo](https://github.com/DanielePalombo))
|
18
|
-
- Fix issue on international transactions [\#129](https://github.com/solidusio/solidus_paypal_commerce_platform/pull/129) ([jtapia](https://github.com/jtapia))
|
9
|
+
- Allow to use the auto\_capture global preference [\#185](https://github.com/solidusio/solidus_paypal_commerce_platform/pull/185) ([kennyadsl](https://github.com/kennyadsl))
|
10
|
+
- Allow cancelling orders [\#180](https://github.com/solidusio/solidus_paypal_commerce_platform/pull/180) ([kennyadsl](https://github.com/kennyadsl))
|
19
11
|
|
20
12
|
## [v0.6.0](https://github.com/solidusio/solidus_paypal_commerce_platform/tree/v0.6.0) (2022-11-25)
|
21
13
|
|
@@ -30,6 +22,19 @@
|
|
30
22
|
- Invalid string length error [\#135](https://github.com/solidusio/solidus_paypal_commerce_platform/issues/135)
|
31
23
|
- PayPal SDK JS Error: Disallowed query param: shipping\_preference [\#133](https://github.com/solidusio/solidus_paypal_commerce_platform/issues/133)
|
32
24
|
|
25
|
+
**Merged pull requests:**
|
26
|
+
|
27
|
+
- More fixes and improvements extracted from SSF support [\#168](https://github.com/solidusio/solidus_paypal_commerce_platform/pull/168) ([elia](https://github.com/elia))
|
28
|
+
* inline the load_order before action
|
29
|
+
* require the payment_method_id param when loading the payment method
|
30
|
+
* mark the javascript_sdk_url as HTML safe
|
31
|
+
* ensure amounts are presented with 2 decimals for the PayPal API
|
32
|
+
* fixed the sign in requests
|
33
|
+
- Reorganize the install generator and deprecate `--skip-migrations` [\#167](https://github.com/solidusio/solidus_paypal_commerce_platform/pull/167) ([elia](https://github.com/elia))
|
34
|
+
- Move 'shipping\_preference' preference under PaypalOrder\#to\_json [\#152](https://github.com/solidusio/solidus_paypal_commerce_platform/pull/152) ([retsef](https://github.com/retsef))
|
35
|
+
- Truncate the product name to 127 characters [\#139](https://github.com/solidusio/solidus_paypal_commerce_platform/pull/139) ([DanielePalombo](https://github.com/DanielePalombo))
|
36
|
+
- Fix issue on international transactions [\#129](https://github.com/solidusio/solidus_paypal_commerce_platform/pull/129) ([jtapia](https://github.com/jtapia))
|
37
|
+
|
33
38
|
## [v0.5.0](https://github.com/solidusio/solidus_paypal_commerce_platform/tree/v0.5.0) (2022-10-07)
|
34
39
|
|
35
40
|
[Full Changelog](https://github.com/solidusio/solidus_paypal_commerce_platform/compare/v0.4.0...v0.5.0)
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ module SolidusPaypalCommercePlatform
|
|
7
7
|
|
8
8
|
def show
|
9
9
|
authorize! :show, @order, order_token
|
10
|
-
order_request = @payment_method.gateway.create_order(@order, @payment_method.auto_capture)
|
10
|
+
order_request = @payment_method.gateway.create_order(@order, @payment_method.auto_capture?)
|
11
11
|
|
12
12
|
render json: order_request, status: order_request.status_code
|
13
13
|
end
|
@@ -83,7 +83,7 @@ module SolidusPaypalCommercePlatform
|
|
83
83
|
|
84
84
|
parameters = {
|
85
85
|
'client-id': client_id,
|
86
|
-
intent: auto_capture ? "capture" : "authorize",
|
86
|
+
intent: auto_capture? ? "capture" : "authorize",
|
87
87
|
commit: commit_immediately ? "false" : "true",
|
88
88
|
components: options[:display_credit_messaging] ? "buttons,messages" : "buttons",
|
89
89
|
currency: currency,
|
@@ -97,5 +97,22 @@ module SolidusPaypalCommercePlatform
|
|
97
97
|
|
98
98
|
"https://www.paypal.com/sdk/js?#{parameters.compact.to_query}".html_safe # rubocop:disable Rails/OutputSafety
|
99
99
|
end
|
100
|
+
|
101
|
+
# Will void the payment depending on its state or return false
|
102
|
+
#
|
103
|
+
# If the payment has not yet been captured, we can void the transaction.
|
104
|
+
# Otherwise, we return false so Solidus creates a refund instead.
|
105
|
+
#
|
106
|
+
# https://developer.paypal.com/docs/api/payments/v2/#authorizations_void
|
107
|
+
#
|
108
|
+
# @api public
|
109
|
+
# @param payment [Spree::Payment] the payment to void
|
110
|
+
# @return [Response|FalseClass]
|
111
|
+
def try_void(payment)
|
112
|
+
void_attempt = void(nil, { originator: payment })
|
113
|
+
return void_attempt if void_attempt.success?
|
114
|
+
|
115
|
+
false
|
116
|
+
end
|
100
117
|
end
|
101
118
|
end
|
data/config/locales/en.yml
CHANGED
@@ -40,6 +40,7 @@ en:
|
|
40
40
|
success: "Payment refunded for %{amount}"
|
41
41
|
pay_pal_checkout_sdk/payments/authorizations_void_request:
|
42
42
|
success: "Payment voided"
|
43
|
+
failure: "This payment can't be voided"
|
43
44
|
payment_method:
|
44
45
|
gold_button_message: "cannot be 'gold' when Venmo standalone is enabled."
|
45
46
|
paypal_funding_sources:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Denny
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-01-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: deface
|
@@ -258,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
258
258
|
- !ruby/object:Gem::Version
|
259
259
|
version: '0'
|
260
260
|
requirements: []
|
261
|
-
rubygems_version: 3.3.
|
261
|
+
rubygems_version: 3.3.7
|
262
262
|
signing_key:
|
263
263
|
specification_version: 4
|
264
264
|
summary: Integrate Solidus with Paypal Commerce Platform
|