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: add support for 3ds and surcharge decision through routing rules #2869

Merged
merged 46 commits into from
Nov 21, 2023

Conversation

hrithikesh026
Copy link
Contributor

@hrithikesh026 hrithikesh026 commented Nov 13, 2023

Type of Change

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

Description

added support for deriving 3ds and surcharge decisions through routing rules set by merchant.

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?

Steps to test : https://github.com/juspay/hyperswitch-cloud/issues/2731#issuecomment-1770147086

To test 3DS,

  1. Create a merchant with stripe connector
  2. Configure some 3ds rules for that merchant
  3. Make a payment without the authentication_type field and verify that payment goes through 3ds or no 3ds according to the rule.

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 and others added 30 commits October 26, 2023 01:34
Narayanbhat166
Narayanbhat166 previously approved these changes Nov 17, 2023
Copy link
Member

@jarnura jarnura left a comment

Choose a reason for hiding this comment

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

Add instruments to the function which does external calls like database and redis,etc.

Add instruments to the functions which invoked in payments core flows.

use super::{
errors::StorageErrorExt,
payment_methods::surcharge_decision_configs::perform_surcharge_decision_management_for_session_flow,
utils::persist_individual_surcharge_details_in_redis,
Copy link
Member

Choose a reason for hiding this comment

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

Remove here and add self in utils and use utils::fn directly, for payment_method also follow the same method.

Copy link
Member

@vspecky vspecky left a comment

Choose a reason for hiding this comment

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

Overall LGTM.
@hrithikesh026 Please test the surcharge flow in this PR once
@Aprabhat19 Please test the 3DS decision manager flow in this PR once.

Aprabhat19
Aprabhat19 previously approved these changes Nov 21, 2023
Copy link
Contributor

@Aprabhat19 Aprabhat19 left a comment

Choose a reason for hiding this comment

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

I checked the 3ds flow , its working as expected.

@hrithikesh026
Copy link
Contributor Author

hrithikesh026 commented Nov 21, 2023

Overall LGTM. @hrithikesh026 Please test the surcharge flow in this PR once @Aprabhat19 Please test the 3DS decision manager flow in this PR once.

Tested surcharge feature and found out the surcharge was getting updated in DB from confirm request. Fixed it. Everything else works fine.

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Nov 21, 2023
Merged via the queue into main with commit f8618e0 Nov 21, 2023
12 of 14 checks passed
@Gnanasundari24 Gnanasundari24 deleted the move-surcharge-and-3ds-to-oss 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-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants