Description
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
- Enable auth and capture
- Purchase a product to authorize a payment
- Cancel the auth from the Order actions metabox
- Note the auth cancels without issue
- Change the order status to
Pending payment
- Update the order
- Add an additional product to the order
- Update the order
- Authorize a payment again via the customer payment page (pay for order flow)
- Cancel the auth from step 9
- The page reloads, but n
othing happens on the order Repeat step 10Note the auth cancels without issueRepeat 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