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

fix: status goes from pending to partially captured in psync #2915

Merged
merged 10 commits into from
Nov 21, 2023

Conversation

hrithikesh026
Copy link
Contributor

@hrithikesh026 hrithikesh026 commented Nov 17, 2023

Type of Change

  • Bugfix

Description

Status would always go from Processing to PartiallyCaptured if force sync is done. Fixed it.

Other fixes and changes:

  1. In payment_create, with confirm = true and capture_method = manual, if some amount_to_capture is sent in request body, it is updated in DB but the amount sent to connector will always be amount. So it is possible that amount_to_capture can be less than original amount but the original amount is sent to connector. Fixed it by requiring amount_to_capture to be equal to amount if confirm = true and automatic capture

  2. surcharge amount wouldn't get updated in DB if connector returns error response. Fixed it.

  3. amount_to_capture was not getting updated in DB if sent in payment_capture call. Fixed it.

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

Before PSync
Screenshot 2023-11-20 at 7 34 48 PM

After PSync
Screenshot 2023-11-20 at 7 34 59 PM

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 C-bug Category: Bug S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Nov 17, 2023
@hrithikesh026 hrithikesh026 added this to the November 2023 Release milestone Nov 17, 2023
@hrithikesh026 hrithikesh026 self-assigned this Nov 17, 2023
@hrithikesh026 hrithikesh026 requested review from a team as code owners November 17, 2023 13:16
jarnura
jarnura previously approved these changes Nov 20, 2023
prasunna09
prasunna09 previously approved these changes Nov 20, 2023
@hrithikesh026 hrithikesh026 dismissed stale reviews from prasunna09 and jarnura via 1c97eb0 November 20, 2023 11:50
@hrithikesh026 hrithikesh026 requested a review from a team as a code owner November 20, 2023 11:50
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Nov 21, 2023
Merged via the queue into main with commit 3f3b797 Nov 21, 2023
10 of 12 checks passed
@Gnanasundari24 Gnanasundari24 deleted the fix-psync-flow-status-issue branch November 21, 2023 15:17
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants