Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note about payment-related events #15290

Merged
merged 1 commit into from Sep 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/book/orders/payments.rst
Expand Up @@ -158,6 +158,15 @@ You have most likely changed the PayPal credentials during the checkout process.
Payment complete events
-----------------------

.. warning::

The following events are not a universal way to listen for a completed payment, as they are only dispatched by `ResourceController` at specific places, like completing the payment for a given order in the Admin Panel.
It means that `pre_complete` and `post_complete` events won't be triggered when a customer completes the payment by using, e.g., a payment gateway.

.. tip::

If you are looking for a way to listen for completing the payment, consider :doc:`adding a new callback </customization/state_machine>` for a `sylius_order_payment` state machine on the `pay` transition.

There are two events that are triggered on the payment complete action:

+-------------------------------------+
Expand Down