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(router): rename the browser name header to x-browser-name #5162

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

ShankarSinghC
Copy link
Contributor

@ShankarSinghC ShankarSinghC commented Jun 28, 2024

Type of Change

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

Description

Rename the browser name header from browsername to x-browser-name
Our web sdk is currently passing browsername also, but this will be removed going forward
image

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?

-> Create merchant connector account with apple pay manual flow. Below is the metadata for the manual flow.

"session_token_data": {
                    "initiative": "web",
                    "certificate": "==",
                    "display_name": "applepay",
                    "certificate_keys": "",
                    "payment_processing_details_at": "Hyperswitch",
                    "payment_processing_certificate": "",
                    "payment_processing_certificate_key": "",
                    "initiative_context": "sdk-test-app.netlify.app",
                    "merchant_identifier": "",
                    "merchant_business_country": "US"
                }

-> Session response when only x-client-platform is passed

curl --location 'http://localhost:8080/payments/session_tokens' \
--header 'Content-Type: application/json' \
--header 'x-client-platform: web' \
--header 'api-key: pk_dev_7e0d9f48e20b430baa86eb956dc99142' \
--data '{
    "payment_id": "pay_7WAejcRN248R0Y7Kwsfh",
    "wallets": [],
    "client_secret": "pay_7WAejcRN248R0Y7Kwsfh_secret_CDL03LbGwQQnMPVA0Lq0"
}'
image

-> Session response when x-client-platform and x-browser-name are passed as web and Safari

curl --location 'http://localhost:8080/payments/session_tokens' \
--header 'Content-Type: application/json' \
--header 'x-browser-name: Safari' \
--header 'x-client-platform: web' \
--header 'api-key: pk_dev_9754f74226e84eecbe72e09dc3890360' \
--data '{
    "payment_id": "pay_aPyo8BbO9sjayVJ75O0B",
    "wallets": [],
    "client_secret": "pay_aPyo8BbO9sjayVJ75O0B_secret_IHwD3t4hMolns4eIKIep"
}'
image

-> When only is x-client-platform: ios

curl --location 'http://localhost:8080/payments/session_tokens' \
--header 'Content-Type: application/json' \
--header 'x-client-platform: ios' \
--header 'api-key: pk_dev_30a379e8af2d46f6be977b01d8b38708' \
--data '{
    "payment_id": "pay_CGA1yXcMIArRqgn9ZyuD",
    "wallets": [],
    "client_secret": "pay_CGA1yXcMIArRqgn9ZyuD_secret_A2MRtOhcSzFGhEeEukRv"
}'
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

@ShankarSinghC ShankarSinghC added A-core Area: Core flows C-bug Category: Bug A-payments Area: payments labels Jun 28, 2024
@ShankarSinghC ShankarSinghC self-assigned this Jun 28, 2024
@ShankarSinghC ShankarSinghC requested a review from a team as a code owner June 28, 2024 13:46
@ShankarSinghC ShankarSinghC linked an issue Jun 28, 2024 that may be closed by this pull request
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jul 1, 2024
Merged via the queue into main with commit ff14e79 Jul 1, 2024
23 checks passed
@Gnanasundari24 Gnanasundari24 deleted the fix/apple_pay/skip-apple-pay-session-call branch July 1, 2024 15:15
pixincreate added a commit that referenced this pull request Jul 2, 2024
…ror-handling-in-cypress

* 'main' of github.com:juspay/hyperswitch:
  fix(auth_methods): Add checks for duplicate `auth_method` in create API (#5161)
  chore(version): 2024.07.02.0
  fix(router): rename the browser name header to `x-browser-name` (#5162)
  fix(router): mark retry payment as failure if `connector_tokenization` fails (#5114)
  fix(connector): [Paypal] dispute webhook deserialization failure (#5111)
  feat(analytics): Add v2 payment analytics (payment-intents analytics) (#5150)
  feat(globalsearch): Implement tag-based filters in global search (#5151)
  refactor(connector): Add amount conversion framework to iatapay along with amount conversion code to connector template (#4866)
  feat(payment_link): add multiple custom css support in business level  (#5137)
  feat(connector): [Bambora Apac] Template for integration (#5062)
  feat(tls): add support for https in actix web (#5089)
  chore(ci): fix ci tests failing by removing them (#5167)
  chore(version): 2024.07.01.0
  chore(postman): update Postman collection files
  ci(postman): log request id for user tests (#5159)
  chore(euclid_wasm): make field domain optional wasm (#5154)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows A-payments Area: payments C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rename the browser name header to x-browser-name
4 participants