diff --git a/README.md b/README.md index 7e9073c..6906a7e 100644 --- a/README.md +++ b/README.md @@ -560,7 +560,8 @@ if ($event['type'] === EventType::SUBSCRIPTION_RENEWED) { `order.refunded` (`EventType::ORDER_REFUNDED`) is sent when money was given back for an order (a refund or a partial cancellation, with a credit note); the order carries its `refunds` and -`refunded_total`. A full refund also cancels the order, followed by `order.cancelled`. +`refunded_total`. A full refund also cancels the order, so `order.cancelled` is sent too; don't rely on the +order of the two events. ### Errors diff --git a/README.stub b/README.stub index eade3fb..51e4979 100644 --- a/README.stub +++ b/README.stub @@ -560,7 +560,8 @@ if ($event['type'] === EventType::SUBSCRIPTION_RENEWED) { `order.refunded` (`EventType::ORDER_REFUNDED`) is sent when money was given back for an order (a refund or a partial cancellation, with a credit note); the order carries its `refunds` and -`refunded_total`. A full refund also cancels the order, followed by `order.cancelled`. +`refunded_total`. A full refund also cancels the order, so `order.cancelled` is sent too; don't rely on the +order of the two events. ### Errors diff --git a/src/Id/Webhooks/EventType.php b/src/Id/Webhooks/EventType.php index 70ee0cb..9a1de68 100644 --- a/src/Id/Webhooks/EventType.php +++ b/src/Id/Webhooks/EventType.php @@ -15,8 +15,8 @@ final class EventType public const ORDER_SHIPPED = 'order.shipped'; /** * Money was given back for an order (a refund or a partial cancellation, with a credit note); - * see the order's `refunds` and `refunded_total`. A full refund also cancels the order - * (order.cancelled follows). + * see the order's `refunds` and `refunded_total`. A full refund also cancels the order, + * so order.cancelled is sent too; don't rely on the order of the two events. */ public const ORDER_REFUNDED = 'order.refunded';