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(core): return surcharge in payment method list response if passed in create request #3363

Merged
merged 4 commits into from
Jan 25, 2024

Conversation

hrithikesh026
Copy link
Contributor

@hrithikesh026 hrithikesh026 commented Jan 16, 2024

Type of Change

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

Description

If merchant sends surcharge details in payment create call(to override surcharge calculation), we wouldn't send any surcharge details in list payment method call since surcharge won't be generated in this case.

In this PR, I have made some refactors to return surcharge_details against each payment method type in list payment method call even if merchant chooses to override surcharge calculation by sending surcharge details in payments create call.

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
Payment Create with surcharge
Screenshot 2024-01-19 at 7 19 46 PM

Payment method list
Screenshot 2024-01-19 at 7 19 33 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 Jan 16, 2024
@hrithikesh026 hrithikesh026 self-assigned this Jan 16, 2024
@hrithikesh026 hrithikesh026 requested review from a team as code owners January 16, 2024 14:47
Copy link
Contributor

@deepanshu-iiitu deepanshu-iiitu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed only the connector changes on behalf of hyperswitch-connector

@likhinbopanna likhinbopanna added this pull request to the merge queue Jan 23, 2024
@likhinbopanna likhinbopanna removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jan 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 23, 2024
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jan 25, 2024
Merged via the queue into main with commit 3507ad6 Jan 25, 2024
10 checks passed
@Gnanasundari24 Gnanasundari24 deleted the return-surcharge-details-when-overiden branch January 25, 2024 07:23
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