feat(router): Add v2 payment cancellation flow#9083
Merged
likhinbopanna merged 14 commits intomainfrom Sep 22, 2025
Merged
Conversation
prasunna09
requested changes
Sep 4, 2025
crates/router/src/core/payments/operations/payment_cancel_v2.rs
Outdated
Show resolved
Hide resolved
Contributor
|
Also can we add a screenshot of connector cancel request and response in the test cases |
88f81b4 to
f2f7577
Compare
su-shivanshmathur
previously approved these changes
Sep 4, 2025
f2f7577 to
19a617f
Compare
su-shivanshmathur
previously approved these changes
Sep 8, 2025
prasunna09
requested changes
Sep 8, 2025
crates/router/src/core/payments/operations/payment_cancel_v2.rs
Outdated
Show resolved
Hide resolved
crates/router/src/core/payments/operations/payment_cancel_v2.rs
Outdated
Show resolved
Hide resolved
crates/router/src/core/payments/operations/payment_cancel_v2.rs
Outdated
Show resolved
Hide resolved
crates/router/src/core/payments/operations/payment_cancel_v2.rs
Outdated
Show resolved
Hide resolved
crates/router/src/core/payments/operations/payment_cancel_v2.rs
Outdated
Show resolved
Hide resolved
crates/router/src/core/payments/operations/payment_cancel_v2.rs
Outdated
Show resolved
Hide resolved
crates/router/src/core/payments/operations/payment_cancel_v2.rs
Outdated
Show resolved
Hide resolved
crates/router/src/core/payments/operations/payment_cancel_v2.rs
Outdated
Show resolved
Hide resolved
prasunna09
reviewed
Sep 11, 2025
prasunna09
requested changes
Sep 16, 2025
Contributor
prasunna09
left a comment
There was a problem hiding this comment.
no request response types are introduced in pr.
Are reusing the v1 structs?
then that is wrong, we need to add new structs for v2 since v1 has different type for payment id compared to v2
…t/paymentcancel_v2
…erswitch into feat/paymentcancel_v2
prasunna09
requested changes
Sep 17, 2025
crates/router/src/core/payments/operations/payment_cancel_v2.rs
Outdated
Show resolved
Hide resolved
prasunna09
requested changes
Sep 18, 2025
prasunna09
approved these changes
Sep 18, 2025
su-shivanshmathur
approved these changes
Sep 22, 2025
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.
Type of Change
Description
Add V2 payments_cancel flow by endpoint
{{baseUrl}}/v2/payments/:payment_id/cancel.A payment can be cancelled when the status is RequiresCapture, PartiallyAuthorizedAndRequiresCapture, or PartiallyCapturedAndCapturable.Additional Changes
Motivation and Context
How did you test it?
Request:
Response:
closes #9082
Checklist
cargo +nightly fmt --allcargo clippy