Sent Attention state when Pending payments fail

We are working with Adyen payment provider and some payment methods return payment state Pending.

Initial order state is Init.

  • We want set order state to Attention if payment state move from Pending to ReserverFailed.
  • We want to keep order state Init if payment state move from ExecuteReserve to ReserverFailed.

What is the best way to achieve this?

Litium version: 7.02

Check this documentation:
https://docs.litium.com/documentation/litium-documentation/sales/working_with_state_transitions/customizing-states-and-transitions

You need to add related states:

https://docs.litium.com/documentation/litium-documentation/sales/working_with_state_transitions/customizing-states-and-transitions/add-related-state

More examples can be found in the Accelerator in StateTransitionBuilder.BuildStateTransitions(...)