spree-paypal_merchant 6.0.4 → 6.0.5
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/CHANGELOG.md +22 -0
- data/README.md +3 -2
- data/app/models/spree/paypal_merchant/gateway.rb +16 -0
- data/lib/spree/paypal_merchant/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e12905a27064c65e2edb2bac3659d837cdb40cf42ab803d8c3a10f4dae487c86
|
|
4
|
+
data.tar.gz: d16e33faf83d3216493240ece3f58be2d001f6864a1ff32b4ac8b8cb45bfdd4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '061959ff636d14011aea37b7f6a7b626e1012eb24a12bc0b5d8c01c37aeb4781b043000a5fbfa6c1920f170be52e89dd35935aeb52c6c5f76f2919dd5c8af1cc'
|
|
7
|
+
data.tar.gz: 0e0f00e7db73906f72b030a93d5fa553100f2823ed8a8a39e4b1e08418a75b96e6f7c2330d7c740280c20434daf5897028f2f49e988e53601a2911497bb4ecc9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.0.5
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- The dashboard no longer offers **Void** on a completed PayPal payment. The
|
|
8
|
+
payment is captured, so Void could only fail, telling the merchant to refund
|
|
9
|
+
instead. `Gateway#can_void?` now returns false for a completed payment;
|
|
10
|
+
Spree 6.0.2 and later ask it before showing Void. (Earlier Spree 6.0 releases
|
|
11
|
+
go by the payment's status alone, so this changes nothing there.)
|
|
12
|
+
|
|
13
|
+
A void requested through the API is now refused by Spree before it reaches
|
|
14
|
+
the gateway, with Spree's `payment_not_voidable` error. Payments PayPal may
|
|
15
|
+
still complete (checkout, pending, processing) are unchanged: Spree still
|
|
16
|
+
asks the gateway, which refuses them, so canceling their order still stops
|
|
17
|
+
and says PayPal is still processing the payment.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- The test bundle requires `ostruct`. Spree's `stringex` requires it without
|
|
22
|
+
depending on it, Ruby 4.0 no longer ships it as a default gem, and `oj`
|
|
23
|
+
stopped pulling it in with 3.17.8, so the dummy app failed to boot.
|
|
24
|
+
|
|
3
25
|
## 6.0.4
|
|
4
26
|
|
|
5
27
|
### Added
|
data/README.md
CHANGED
|
@@ -112,8 +112,9 @@ ignored.
|
|
|
112
112
|
the payment in the dashboard before canceling the order, or refund it in
|
|
113
113
|
PayPal.
|
|
114
114
|
- **Void** always fails. A PayPal payment holds captured money, so refund it
|
|
115
|
-
instead.
|
|
116
|
-
|
|
115
|
+
instead. On Spree 6.0.2 and later the dashboard doesn't offer Void on a
|
|
116
|
+
completed PayPal payment at all. One that PayPal is still processing can't be
|
|
117
|
+
voided or canceled; refund it once PayPal completes it.
|
|
117
118
|
|
|
118
119
|
## Refunds made in PayPal
|
|
119
120
|
|
|
@@ -358,6 +358,22 @@ module Spree
|
|
|
358
358
|
raise
|
|
359
359
|
end
|
|
360
360
|
|
|
361
|
+
##
|
|
362
|
+
# Whether Spree may void the payment. Spree 6.0.2 and later ask before
|
|
363
|
+
# the dashboard offers Void.
|
|
364
|
+
#
|
|
365
|
+
# A completed PayPal payment is captured, so only a refund gives the
|
|
366
|
+
# money back. Any other payment is left to {#void}, which refuses it
|
|
367
|
+
# while PayPal may still complete it, so cancelling its order stops with
|
|
368
|
+
# that reason instead of skipping it.
|
|
369
|
+
#
|
|
370
|
+
# @param payment [Spree::Payment]
|
|
371
|
+
# @return [Boolean]
|
|
372
|
+
#
|
|
373
|
+
def can_void?(payment)
|
|
374
|
+
!payment.completed?
|
|
375
|
+
end
|
|
376
|
+
|
|
361
377
|
##
|
|
362
378
|
# PayPal payments are captured at checkout, so there is never an
|
|
363
379
|
# authorization to void: a payment that holds money is refunded instead.
|