-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow payment cancels for more statuses #1027
Merged
Merged
Conversation
This file contains 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
…uires_payment_method, requires_capture, requires_confirmation, requires_action
prajjwalkumar17
requested review from
a team,
jarnura and
ashokkjag
as code owners
May 2, 2023 10:50
prajjwalkumar17
changed the title
feat/Now we can eve cancel the payments that are in the states of req…
feat/Payments of statuses like requires_payment_method, requires_capture, requires_confirmation, requires_action can be cancelled
May 2, 2023
prajjwalkumar17
added
A-core
Area: Core flows
C-feature
Category: Feature request or enhancement
S-waiting-on-review
Status: This PR has been implemented and needs to be reviewed
R-waiting-on-L1
Review: Waiting on L1 reviewer
labels
May 2, 2023
3 tasks
prajjwalkumar17
changed the title
feat/Payments of statuses like requires_payment_method, requires_capture, requires_confirmation, requires_action can be cancelled
feat:Payments of statuses like requires_payment_method, requires_capture, requires_confirmation, requires_action can be cancelled
May 2, 2023
Narayanbhat166
requested changes
May 2, 2023
…tus instead of Option<Status>
prajjwalkumar17
changed the title
feat:Payments of statuses like requires_payment_method, requires_capture, requires_confirmation, requires_action can be cancelled
feat:Payments of different statuses made cancellable
May 2, 2023
Narayanbhat166
approved these changes
May 8, 2023
SanchithHegde
approved these changes
May 8, 2023
prajjwalkumar17
added
R-waiting-on-L2
Review: Waiting on L2 reviewer
R-L1-completed
Review: L1 Review completed
and removed
R-waiting-on-L1
Review: Waiting on L1 reviewer
labels
May 8, 2023
jarnura
approved these changes
May 8, 2023
SanchithHegde
added
S-ready-for-merge
R-L2-completed
Review: L2 Review completed
and removed
S-waiting-on-review
Status: This PR has been implemented and needs to be reviewed
R-waiting-on-L2
Review: Waiting on L2 reviewer
R-L1-completed
Review: L1 Review completed
labels
May 8, 2023
tinu-hareesswar
changed the title
feat:Payments of different statuses made cancellable
feat: Allow payment cancels for more statuses
May 9, 2023
SanchithHegde
removed
S-ready-for-merge
R-L2-completed
Review: L2 Review completed
labels
May 9, 2023
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.
requires_payment_method, requires_capture, requires_confirmation, requires_action
Type of Change
Description
Previously while cancelling payment from some of the the payment intent statuses like requires_payment_method, requires_capture, requires_confirmation, requires_action there was an error thrown that these can't be cancelled as they haven't been authorized. Hence now we can cancel these payments too.
Additional Changes
Motivation and Context
As for the above statuses we aren't involving the connector and handling the requests ourselves in update method hence having a check and voding the payment attempt and cancelling the payment_intent status in DB.
How did you test it?
Tested it by using postman as now we are able to cancel the payment in all those cases.
Checklist
cargo +nightly fmt --all
cargo clippy