Skip to content

After PaymentCreatedEventHandler state mistakes should be how to deal with? #273

Open
@zhangzw218

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions