-
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(router): add support for multiple partial capture #1721
Conversation
return storage_enums::AttemptStatus::Charged; | ||
} | ||
let status_count_map = self.get_status_count(); | ||
if status_count_map.get(&storage_enums::CaptureStatus::Charged) > Some(&0) { |
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.
I see that this hashmap is used only to get the number of charged captures. Is there any reason that we are creating this hashmap, rather than just counting the status of charged captures?
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.
Just in case, in future, we might need count of other status also.
9ecda5c
Type of Change
Description
Add feature to support multiple partial capture.
Any payment created with
capture_method
asmanual_multiple
will be considered as authorization made for multiple capture.For each partial manual capture request, we will create an entry in captures table. This can be used to sync captures with the connector.
automatic capture and single manual capture will work like before.
Additional Changes
Motivation and Context
How did you test it?
Manual
This change does not interfere with existing manual capture flow.
Create a payment with capture_method: manual
Capture the payment.
Status should change to succeeded. As expected.
Checklist
cargo +nightly fmt --all
cargo clippy