After PaymentCreatedEventHandler state mistakes should be how to deal with? #273
Open
Description
if (order.PaymentId.HasValue || order.OrderStatus != OrderStatus.Pending)
{
// Todo: should cancel the payment?
throw new OrderIsInWrongStageException(order.Id);
}
In a certain scenario, order.orderstatus = Canceled, the order has been canceled and the payment has been canceled.
Then the payment transaction side is still subscribed to the event, triggering this progress exception issue.
How do I discard this event? Is to make sure that this mistake never happens again?
Metadata
Assignees
Labels
No labels