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

refactor(dynamic_routing): remove tenant-id prefixed in id field of dynamic routing grpc requests #6949

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Chethan-rao
Copy link
Contributor

Type of Change

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

Description

Since hyperswitch started sending tenant-id in headers of dynamic routing grpc requests, we can safely remove the tenant-id prefixed in id field

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?

  1. Create merchant_account, api_key and mca (any connector)
  2. Toggle dynamic routing
curl --location --request POST 'http://localhost:8080/account/merchant_1734609410/business_profile/pro_gPTjn9jLm0CxI8ZD1omL/dynamic_routing/success_based/toggle?enable=metrics' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_K70Wr6zqJLbPECg8eEXrnZ43TW41JNUuXYHzRB50geiG0lViLExjxNUld6sgdNd0' \
--data ''
  1. Create a payment
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_K70Wr6zqJLbPECg8eEXrnZ43TW41JNUuXYHzRB50geiG0lViLExjxNUld6sgdNd0' \
--data '{
    "amount": 6540,
    "authentication_type": "no_three_ds",
    "confirm": true,
    "currency": "USD",
    "customer_acceptance": {
        "acceptance_type": "online"
    },
    "customer_id": "cus_uYakn3OQTUtAgetLDOE1",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "card_cvc": "123",
            "card_exp_month": "10",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_number": "4242424242424242"
        }
    }
}'

Need to ssh into redis server for validating the key inserted from dynamo

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

@Chethan-rao Chethan-rao added S-waiting-on-review Status: This PR has been implemented and needs to be reviewed C-refactor Category: Refactor A-routing Area: Routing labels Dec 26, 2024
@Chethan-rao Chethan-rao added this to the December 2024 Release milestone Dec 26, 2024
@Chethan-rao Chethan-rao self-assigned this Dec 26, 2024
@Chethan-rao Chethan-rao requested a review from a team as a code owner December 26, 2024 12:53
Copy link

semanticdiff-com bot commented Dec 26, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/payments/routing.rs  0% smaller
  crates/router/src/core/routing.rs  0% smaller
  crates/router/src/core/routing/helpers.rs  0% smaller

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-routing Area: Routing C-refactor Category: Refactor 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.

[REFACTOR] remove tenant_id prefix from id field in dynamic routing grpc requests
3 participants