Skip to content

Canceling an authorization silently fails if there was a previous authorization #9033

Open
@csmcneill

Description

@csmcneill

Describe the bug

If an authorization is canceled, and another authorization is subsequently made for the same order, an attempt to cancel the second authorization fails silently.

The use case here would be a merchant who uses authorize and capture, and the merchant cancels the original authorization to add an additional product to the order.

Workaround

In order to cancel this second authorization, the cancelation needs to be attempted an additional time.

To Reproduce

  1. Enable auth and capture
  2. Purchase a product to authorize a payment
  3. Cancel the auth from the Order actions metabox
  4. Note the auth cancels without issue
  5. Change the order status to Pending payment
  6. Update the order
  7. Add an additional product to the order
  8. Update the order
  9. Authorize a payment again via the customer payment page (pay for order flow)
  10. Cancel the auth from step 9
  11. The page reloads, but nothing happens on the order
  12. Repeat step 10
  13. Note the auth cancels without issue
  14. Repeat steps 5–13 if desired

Actual behavior

An authorization cannot be canceled if a previous authorization for the order was also canceled.

Screenshots

CleanShot.2024-06-28.at.16.26.35.mp4

Expected behavior

Canceling an authorization should cancel an authorization, even if a previous authorization was canceled. If there is an issue canceling the authorization, an error should be displayed that provides the admin with more information or what actions they need to take.

Additional context

p1719587220969729-slack-C3NCP7ZJ6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions