Skip to content
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 psync for multiple partial captures #1934

Merged
merged 59 commits into from
Aug 23, 2023

Conversation

hrithikesh026
Copy link
Contributor

@hrithikesh026 hrithikesh026 commented Aug 15, 2023

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Currently there is no implementation for syncing payments with multiple partial captures.
In this pr I have added support for the same.
For any payment involving multiple partial captures, we will sync each capture with the connector and then update the attempt_status based on all capture status and total captured amount.

  • Some connectors can fetch all captures for a payment in a single get request. For such connectors the status update for each pending captures should be made at the connector side.
  • For connector that can only do sync on individual captures, That logic is handled at core.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Manual
Screenshot 2023-08-16 at 1 36 53 AM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@hrithikesh026 hrithikesh026 added M-database-changes Metadata: This PR involves database schema changes M-api-contract-changes Metadata: This PR involves API contract changes labels Aug 21, 2023
Narayanbhat166
Narayanbhat166 previously approved these changes Aug 22, 2023
@Narayanbhat166 Narayanbhat166 added this pull request to the merge queue Aug 23, 2023
Merged via the queue into main with commit 5657ad6 Aug 23, 2023
12 checks passed
@Narayanbhat166 Narayanbhat166 deleted the psync_for_multiple_partial_captures branch August 23, 2023 05:01
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants