[FRON-1599]: Fixed the issue of order status changing to failed when we try to capture a charge that's already been captured.#281
Merged
aashishgurung merged 4 commits intomasterfrom Jun 28, 2022
Conversation
…we try to capture a charge that's already been captured.
hpariwat
approved these changes
Jun 23, 2022
tookaa2
approved these changes
Jun 23, 2022
…'Capture failed'.
som-m
approved these changes
Jun 23, 2022
Contributor
som-m
left a comment
There was a problem hiding this comment.
I think for expired charges, the order status should be updated to Cancelled. Otherwise 👍
Contributor
Author
Updated. Thanks. |
jutinapas
approved these changes
Jun 23, 2022
kan98
approved these changes
Jun 23, 2022
|
test and verified krub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Objective
Fix the issue of order status changing from processing to failed when user tries to capture a charge that's already been captured.
Jira Ticket: #1599
2. Description of change
A logic is added to delete the capture metadata only if
failed_captureandexpired_chargeerror codes are present because we don't to delete it for 400, 401, 403, and 500 errors. The order status will be changed to failed only if the error code isexpired_charge.3. Quality assurance
Omise: Payment failed (manual capture). charge was already capturedin the order note🔧 Environments: