In the Ecommerce bundle how do I abort an order (say customer has chaged her mind between confirmation an payment)?
depends, if order object already has been created.
If yes, you can just change order state in order object:
$order->setOrderState(AbstractOrder::ORDER_STATE_ABORTED); $order->save(['versionNote' => 'CommitOrderProcessor::cleanUpPendingOrders - set state to aborted.']);
If payment is already started, you probably want to cancel payment too.
This can be done with
Great thanks - I’ll give that a go.