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(router): add accept-language from request headers into browser-info #7074

Merged
merged 6 commits into from
Jan 29, 2025

Conversation

sai-harsha-vardhan
Copy link
Contributor

@sai-harsha-vardhan sai-harsha-vardhan commented Jan 20, 2025

Type of Change

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

Description

  • add accept-language from request headers into browser-info
  • propagate the value to netcetera

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?

Tested Manually
Perform a sanity external authentication payment through Netcetera
CURL

curl --location '{{baseURL}}/payments/{{PAYMENT_ID}}/3ds/authentication' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: {{API_KEY}}' \
--data '{
    "client_secret": "pay_ushmApvG7K7IGxZ0qCmy_secret_8xIk7n11c5p5JSQSG0Vp",
    "device_channel": "BRW",
    "threeds_method_comp_ind": "Y"
}'

Raw connector Request
image

Browser Info in Database
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

@sai-harsha-vardhan sai-harsha-vardhan added A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement labels Jan 20, 2025
@sai-harsha-vardhan sai-harsha-vardhan self-assigned this Jan 20, 2025
@sai-harsha-vardhan sai-harsha-vardhan requested review from a team as code owners January 20, 2025 10:22
Copy link

semanticdiff-com bot commented Jan 20, 2025

srujanchikke
srujanchikke previously approved these changes Jan 20, 2025
Narayanbhat166
Narayanbhat166 previously approved these changes Jan 21, 2025
@@ -1022,6 +1022,7 @@ impl Default for BrowserInfoType {
device_model: Some("Apple IPHONE 7".to_string()),
os_type: Some("IOS or ANDROID".to_string()),
os_version: Some("IOS 14.5".to_string()),
accept_language: None,
Copy link
Contributor

@ShankarSinghC ShankarSinghC Jan 21, 2025

Choose a reason for hiding this comment

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

Same here

@@ -52,6 +52,7 @@ fn get_default_browser_info() -> BrowserInformation {
os_type: None,
os_version: None,
device_model: None,
accept_language: None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Since we are considering "en" as the default language. You can add the same here.

srujanchikke
srujanchikke previously approved these changes Jan 21, 2025
ShankarSinghC
ShankarSinghC previously approved these changes Jan 21, 2025
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Jan 22, 2025
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jan 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jan 24, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Jan 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jan 24, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Jan 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jan 24, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Jan 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jan 27, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Jan 29, 2025
Merged via the queue into main with commit 5381eb9 Jan 29, 2025
18 of 20 checks passed
@likhinbopanna likhinbopanna deleted the add-accept-language-in-browser-info branch January 29, 2025 08:33
pixincreate added a commit that referenced this pull request Jan 30, 2025
…ress

* 'main' of github.com:juspay/hyperswitch:
  chore(version): 2025.01.30.0
  Documentation edits made through Mintlify web editor
  feat(connector): add template code for chargebee (#7036)
  chore: run clippy with default number of jobs in github workflows (#7088)
  feat(router): add accept-language from request headers into browser-info (#7074)
  refactor(euclid): update proto file for elimination routing (#7032)
  chore(version): 2025.01.29.0
  refactor(router): prioritise `connector_mandate_id` over `network_transaction_id` during MITs (#7081)
  chore: add stripe to network transaction id support (#7096)
  fix(multitenancy): add a fallback for get commands in redis (#7043)
  refactor(currency_conversion): re frame the currency_conversion crate to make api calls on background thread (#6906)
  chore: fix `toml` format to address wasm build failure (#6967)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement M-api-contract-changes Metadata: This PR involves API contract changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants