-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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): skip apple pay session call if the browser is not Safari #5136
Conversation
let apple_pay_session_request = | ||
get_session_request_for_manual_apple_pay(session_token_data.clone()); | ||
let apple_pay_session_request = match header_payload.browser_name { | ||
Some(common_enums::BrowserName::Safari) | None => Some( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You tried to skip this match condition right? Didn't it work?
…b.com/juspay/hyperswitch into apple_pay/skip-apple-pay-session-call
875cf9d
to
e46d548
Compare
@@ -77,6 +77,7 @@ pub mod headers { | |||
pub const X_CLIENT_SOURCE: &str = "X-Client-Source"; | |||
pub const X_PAYMENT_CONFIRM_SOURCE: &str = "X-Payment-Confirm-Source"; | |||
pub const CONTENT_LENGTH: &str = "Content-Length"; | |||
pub const BROWSER_NAME: &str = "browsername"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you ensure that this key is case insensitive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have verified it.
38a294e
to
0836bd9
Compare
0836bd9
to
6d7f4c8
Compare
01c3e62
…ay/hyperswitch into iatapay-through-hyperswitch-cypress * 'iatapay-through-hyperswitch-cypress' of github.com:juspay/hyperswitch: feat(router): skip apple pay session call if the browser is not Safari (#5136) fix(opensearch): show search results only if user has access permission to the index (#5097) chore(version): 2024.06.27.0 feat(users): add endpoint for terminate auth select (#5135) feat(users): implemented openidconnect (#5124) feat(router): add payments manual-update api (#5045) fix(docs): open-api fix for payment response (#5103) refactor(connector): [AdyenPlatform]Throw 4xx instead of 5xx for source_balance_account (#4990) feat: realtime user analytics (#5098) refactor(connector): added amount conversion framework for cashtocode (#4857) feat(email): Add `auth_id` in email types and send `auth_id` in email URLs (#5120) refactor(connector): add amount framework to payme & Trustpay with googlePay, ApplePay for bluesnap, Noon & Trustpay (#4833) fix(connector): [BOA/CYBS] make risk information message optional (#5107) chore(version): 2024.06.25.1 fix(router): skip serialize if none for assurance_details_required in googlepay session response (#5118) refactor: separate DB queries and HTML creation for payout links (#4967) feat(router): updated `last_used_at` field for apple pay and google pay for CITs (#5087) fix(payment_methods): use existing field value of `nick_name` in db if not sent during request (#5105) chore(version): 2024.06.25.0
…ay/hyperswitch into refactor-error-handling-in-cypress * 'iatapay-through-hyperswitch-cypress' of github.com:juspay/hyperswitch: chore: clean up feat(router): skip apple pay session call if the browser is not Safari (#5136) fix(opensearch): show search results only if user has access permission to the index (#5097) chore(version): 2024.06.27.0 feat(users): add endpoint for terminate auth select (#5135) feat(users): implemented openidconnect (#5124) feat(router): add payments manual-update api (#5045) fix(docs): open-api fix for payment response (#5103) refactor(connector): [AdyenPlatform]Throw 4xx instead of 5xx for source_balance_account (#4990) feat: realtime user analytics (#5098) refactor(connector): added amount conversion framework for cashtocode (#4857) feat(email): Add `auth_id` in email types and send `auth_id` in email URLs (#5120) refactor(connector): add amount framework to payme & Trustpay with googlePay, ApplePay for bluesnap, Noon & Trustpay (#4833) fix(connector): [BOA/CYBS] make risk information message optional (#5107) chore(version): 2024.06.25.1 fix(router): skip serialize if none for assurance_details_required in googlepay session response (#5118) refactor: separate DB queries and HTML creation for payout links (#4967) feat(router): updated `last_used_at` field for apple pay and google pay for CITs (#5087) fix(payment_methods): use existing field value of `nick_name` in db if not sent during request (#5105) chore(version): 2024.06.25.0
Type of Change
Description
Currently, the Apple Pay session call is mandatory in all cases. This requirement also mandates configuring the initiative_context, which is the domain name where the Apple Pay payment is being processed. However, in the case of an iOS app, a domain is not required, so this field can be made optional. Additionally, in this case, the session call to Apple Pay can be skipped.
On the web, Apple Pay is supported only in Safari. Therefore, the session call should be skipped in web environments when the browser is not Safari.
Additional Changes
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.
-> Currently we make session call only if
x_client_platform
andbrowsername
header None or if it is web and Safari respectively.-> When mca is configured with write domain and header is not passed
-> When mca is configured with write domain and header is passed as
-> mac with write domain and wrong value in header
-> If only one header is passed
Checklist
cargo +nightly fmt --all
cargo clippy