State Machine

Danger

We’re sorry but this documentation section is outdated. Please have that in mind when trying to use it. You can help us making documentation up to date via Sylius Github. Thank you!

Payment States

The following payment states are available by default:

Related constant State Description
STATE_CART cart Initial; Before the subject of payment is completed
STATE_NEW new After completion of the payment subject
STATE_PROCESSING processing Payment which is in process of verification
STATE_COMPLETED completed Completed payment
STATE_FAILED failed Payment has failed
STATE_CANCELLED cancelled Cancelled by a customer or manager
STATE_REFUNDED refunded A completed payment which has been refunded
STATE_UNKNOWN unknown Auxiliary state for handling external states

Note

All the above states are constant fields in the PaymentInterface.

Payment Transitions

The following payment transitions are available by default:

Related constant Transition
SYLIUS_CREATE create
SYLIUS_PROCESS process
SYLIUS_COMPLETE complete
SYLIUS_FAIL fail
SYLIUS_CANCEL cancel
SYLIUS_REFUND refund

There’s also the default graph name included:

Related constant Name
GRAPH sylius_payment

Note

All of above transitions and the graph are constant fields in the PaymentTransitions class.