@spree/docs 0.1.146 → 0.1.148
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.
|
@@ -80,10 +80,6 @@ erDiagram
|
|
|
80
80
|
integer refund_reason_id
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
LogEntry {
|
|
84
|
-
text details
|
|
85
|
-
}
|
|
86
|
-
|
|
87
83
|
Order ||--o{ Payment : "has many"
|
|
88
84
|
Order ||--o{ PaymentSession : "has many"
|
|
89
85
|
Payment }o--|| PaymentMethod : "belongs to"
|
|
@@ -91,7 +87,6 @@ erDiagram
|
|
|
91
87
|
Payment }o--o| PaymentSource : "source"
|
|
92
88
|
Payment }o--o| StoreCredit : "source"
|
|
93
89
|
Payment ||--o| PaymentSession : "linked via response_code"
|
|
94
|
-
Payment ||--o{ LogEntry : "has many"
|
|
95
90
|
Payment ||--o{ Refund : "has many"
|
|
96
91
|
PaymentMethod ||--o{ PaymentSession : "has many"
|
|
97
92
|
PaymentMethod ||--o{ PaymentSetupSession : "has many"
|
|
@@ -509,11 +504,7 @@ Each payment update also recalculates the order's `payment_state`:
|
|
|
509
504
|
| `credit_owed` | This order has been paid for in excess of its total |
|
|
510
505
|
| `paid` | This order has been paid for in full |
|
|
511
506
|
|
|
512
|
-
> **WARNING:** You may want to keep tabs on the number of orders with a `payment_state` of `failed`. A sudden increase could indicate a problem with your payment gateway and most likely a serious problem affecting customer satisfaction. Check
|
|
513
|
-
|
|
514
|
-
### Log Entries
|
|
515
|
-
|
|
516
|
-
Responses from payment gateways are stored as log entries for debugging purposes. These can be viewed in the Admin Panel on the payment detail page.
|
|
507
|
+
> **WARNING:** You may want to keep tabs on the number of orders with a `payment_state` of `failed`. A sudden increase could indicate a problem with your payment gateway and most likely a serious problem affecting customer satisfaction. Check your payment gateway's dashboard for the most recent transactions if this is happening.
|
|
517
508
|
|
|
518
509
|
## Payment Sources
|
|
519
510
|
|
|
@@ -344,6 +344,16 @@ Also note:
|
|
|
344
344
|
- Localized number parsing still happens: `Spree::Price#amount=` runs `Spree::LocalizedNumber.parse`, so `set_price(currency, '1,599.99')` works as `price=` did.
|
|
345
345
|
- The variant validation that inferred a missing price from the product's default variant is gone. Set prices explicitly (the product and variant factories already do).
|
|
346
346
|
|
|
347
|
+
### `StateChange` and `LogEntry` are gone
|
|
348
|
+
|
|
349
|
+
`Spree::StateChange` and `Spree::LogEntry` are removed — the models, the `state_changes` associations on `Order`, `Payment` and `Fulfillment`, the `log_entries` associations on `Payment` and `Refund`, and everything that wrote to them. Both were write-only: nothing in Spree read the rows back, and the admin screens that displayed them are gone.
|
|
350
|
+
|
|
351
|
+
**Events are the audit trail now.** Instead of querying state-change rows, subscribe to the lifecycle events that already fire on every meaningful transition: `order.placed`, `order.canceled`, `payment.completed`, `payment.voided`, `fulfillment.ready`, `fulfillment.fulfilled`, `fulfillment.canceled`, `fulfillment.resumed`, and the rest. If you need a persistent history, write it from a subscriber.
|
|
352
|
+
|
|
353
|
+
**Gateway responses are no longer stored in your database.** `LogEntry` kept every gateway response as serialized YAML. For transaction forensics, use your payment provider's dashboard — `Payment#gateway_dashboard_payment_url` links straight to the transaction — or `Spree::PaymentSession`, which holds the gateway-side state for session-based providers.
|
|
354
|
+
|
|
355
|
+
The `spree_state_changes` and `spree_log_entries` tables are **not dropped until 6.1**, so your existing rows survive the upgrade. If you want the history long-term, export it before upgrading to 6.1.
|
|
356
|
+
|
|
347
357
|
## Deprecated in 6.0, removed in 6.1
|
|
348
358
|
|
|
349
359
|
Every rename keeps the legacy name working for one release with a deprecation warning. The notable ones:
|