-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(core): add support for payments overcapture #6824
Open
AkshayaFoiger
wants to merge
27
commits into
main
Choose a base branch
from
over-capture
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
hyperswitch-bot
bot
added
M-database-changes
Metadata: This PR involves database schema changes
M-api-contract-changes
Metadata: This PR involves API contract changes
labels
Dec 12, 2024
AkshayaFoiger
changed the title
feat(core): Core changes for support overcapture
feat(core): Core changes to support overcapture
Dec 16, 2024
AkshayaFoiger
force-pushed
the
over-capture
branch
from
December 19, 2024 11:07
61fe94c
to
1c1510f
Compare
AkshayaFoiger
changed the title
feat(core): Core changes to support overcapture
feat(core): add core support for overcapture for manual payments
Dec 23, 2024
AkshayaFoiger
changed the title
feat(core): add core support for overcapture for manual payments
feat(core): add core support for overcapture
Dec 23, 2024
AkshayaFoiger
changed the title
feat(core): add core support for overcapture
feat(core): add support for payments overcapture
Dec 23, 2024
deepanshu-iiitu
requested changes
Dec 24, 2024
Comment on lines
1579
to
1582
println!( | ||
"$$$$$4request_overcapture: {:?}", | ||
item.router_data.request_overcapture | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please remove this?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-feature
Category: Feature request or enhancement
M-api-contract-changes
Metadata: This PR involves API contract changes
M-database-changes
Metadata: This PR involves database schema changes
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
Overcapture allows you to capture with an amount that’s higher than the authorised amount for a card payment. Unlike incremental authorisations, overcapture doesn’t result in additional authorisations with the card networks.
Additional Changes
API contract changes:
a) /payments create request to include
request_overcapture
booleanb) /payments response to include
DB changes:
a) request_overcapture boolean field to be introduced in payment_intent
b) overcapture_details struct to be introduced in payment_attempt
c) overcaptured_amount int field to be introduced in payment_attempt's net_amount field
d) always_request_overcapture boolean field to be introduced in business_profiles table
Not Handled
a) Error is not thrown, when not supported by the connector.
b)List of supported connector and payment method not maintained. These changes will be taken as a phase 2 change
How did you test it?
"always_request_overcapture": true
Response
DB - business_profile will have a field called always_request_overcapture , marked as
true
request_overcapture
in the payment request"always_request_overcapture": false
Response
Response
Checklist
cargo +nightly fmt --all
cargo clippy