-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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(pm_auth): Added balance check for PM auth bank account #5054
Merged
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
2 tasks
Chethan-rao
requested changes
Jun 20, 2024
Chethan-rao
previously approved these changes
Jun 25, 2024
vspecky
requested changes
Jun 26, 2024
vspecky
requested changes
Jun 26, 2024
vspecky
approved these changes
Jul 3, 2024
Chethan-rao
reviewed
Jul 3, 2024
Comment on lines
+73
to
+76
.change_context(ApiErrorResponse::InvalidRequestData { | ||
message: "Incorrect payment_id provided in request".to_string(), | ||
}) | ||
.attach_printable("Corresponding pm_auth_key does not exist in redis")? |
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.
This should be InternalServerError
as the first error propagation is due to redis error. If the bool is false
then it should be 4xx.
Can be taken in the next PR.
Chethan-rao
approved these changes
Jul 3, 2024
pixincreate
added a commit
that referenced
this pull request
Jul 5, 2024
…ify-cypress * 'main' of github.com:juspay/hyperswitch: (22 commits) refactor: Adding millisecond to Kafka timestamp (#5202) chore(version): 2024.07.05.0 fix(user_auth_method): make id option in auth select (#5213) Docs: Updated API - ref for payments (#5172) feat(core): add merchant order reference id (#5197) feat(analytics): Refund status serialization issue for ckh analytics (#5199) fix(router): `override setup_future_usage` filed to on_session based on merchant config (#5195) feat(cypress): make tests forcefully skippable (#5176) feat(core): Added integrity framework for Authorize and Sync flow with connector as Stripe (#5109) ci(cypress): Update card number for adyen and status for paypal (#5192) refactor(cypress): error handling and add sync refunds in places where missing (#5128) feat(analytics): FRM Analytics (#4880) chore(version): 2024.07.04.0 feat(pm_auth): Added balance check for PM auth bank account (#5054) refactor(payment_methods): add appropriate missing logs (#5190) refactor(migrations): add commands to make file to run migrations for api v2 (#5169) chore(version): 2024.07.03.0 fix(event): Updated the ApiEventMetric (#5126) feat(router): add refunds manual-update api (#5094) refactor(payment_link): logs payment links logs coverage (#4918) ...
Narayanbhat166
pushed a commit
that referenced
this pull request
Jul 8, 2024
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
have added a balance check that would enable a check on the available amount in the selected bank account while doing a payment.
If the found balance is less than the intent amount, the payment would not go through.
Additional Changes
Motivation and Context
How did you test it?
Follow this for TCs - #3047
In the payment create, use amount greater then 150 USD for the check to work
Response
Checklist
cargo +nightly fmt --all
cargo clippy