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 routing support for v2 sdk session flow #6763

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

hrithikesh026
Copy link
Contributor

@hrithikesh026 hrithikesh026 commented Dec 6, 2024

Type of Change

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

Description

Added session routing support for session call in v2. And store the prerouting results in the payment_intent tabled prerouting_algorithm column.

Other changes:

  • used MerchantConnectorAccounts Wrapper instead of Vec<MerchantConnectorAccount> across the codebase.

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?

follow the steps mentioned in this PR.
#6502

In addition to that check if prerouting_algorithm column in payment_intent is updated.
use this query.

select prerouting_algorithm from payment_intent where id ='payment_id';

image

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

@hrithikesh026 hrithikesh026 added A-core Area: Core flows C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed api-v2 labels Dec 6, 2024
@hrithikesh026 hrithikesh026 added this to the December 2024 Release milestone Dec 6, 2024
@hrithikesh026 hrithikesh026 self-assigned this Dec 6, 2024
@hrithikesh026 hrithikesh026 requested review from a team as code owners December 6, 2024 06:34
Copy link

semanticdiff-com bot commented Dec 6, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/utils.rs  68% smaller
  crates/router/src/core/payments/operations/payment_session.rs  65% smaller
  crates/router/src/core/payment_methods/cards.rs  64% smaller
  crates/router/src/core/admin.rs  60% smaller
  crates/router/src/core/payout_link.rs  51% smaller
  crates/router/src/db/merchant_connector_account.rs  48% smaller
  crates/common_utils/src/macros.rs  21% smaller
  crates/router/src/core/payments/operations/payment_session_intent.rs  16% smaller
  crates/router/src/core/payments/helpers.rs  15% smaller
  crates/router/src/core/payments/routing.rs  9% smaller
  crates/router/src/core/payments.rs  8% smaller
  crates/hyperswitch_domain_models/src/merchant_connector_account.rs  3% smaller
  .typos.toml Unsupported file format
  crates/diesel_models/src/payment_intent.rs  0% smaller
  crates/hyperswitch_domain_models/src/payments/payment_intent.rs  0% smaller
  crates/router/src/consts.rs  0% smaller
  crates/router/src/core/payment_methods.rs  0% smaller
  crates/router/src/core/payments/session_operation.rs  0% smaller
  crates/router/src/core/routing.rs  0% smaller
  crates/router/src/core/routing/helpers.rs  0% smaller
  crates/router/src/db/kafka_store.rs  0% smaller
  crates/router/src/services/connector_integration_interface.rs Unsupported file format
  crates/router/src/types/api.rs  0% smaller
  crates/router/src/types/api/fraud_check.rs  0% smaller

@hrithikesh026 hrithikesh026 added M-database-changes Metadata: This PR involves database schema changes and removed M-database-changes Metadata: This PR involves database schema changes labels Dec 9, 2024
crates/router/src/core/payment_methods/cards.rs Outdated Show resolved Hide resolved
crates/router/src/core/payment_methods/cards.rs Outdated Show resolved Hide resolved
crates/router/src/core/payments.rs Outdated Show resolved Hide resolved
crates/router/src/core/payments.rs Outdated Show resolved Hide resolved
crates/router/src/types/api.rs Outdated Show resolved Hide resolved
crates/router/src/core/payments.rs Outdated Show resolved Hide resolved
crates/router/src/core/payments.rs Outdated Show resolved Hide resolved
crates/router/src/core/payments.rs Show resolved Hide resolved
crates/router/src/core/payments.rs Outdated Show resolved Hide resolved
crates/router/src/core/payments.rs Outdated Show resolved Hide resolved
crates/router/src/core/payments.rs Outdated Show resolved Hide resolved
@hrithikesh026 hrithikesh026 requested a review from a team as a code owner December 17, 2024 11:52
jarnura
jarnura previously approved these changes Dec 19, 2024
@hrithikesh026 hrithikesh026 requested review from a team as code owners December 24, 2024 10:08
@hyperswitch-bot hyperswitch-bot bot added M-database-changes Metadata: This PR involves database schema changes M-api-contract-changes Metadata: This PR involves API contract changes labels Dec 24, 2024
@hyperswitch-bot hyperswitch-bot bot removed M-database-changes Metadata: This PR involves database schema changes M-api-contract-changes Metadata: This PR involves API contract changes labels Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows api-v2 C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants