Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

feat(apple_pay): support Chrome on web for apple pay session token (#14553)

Shankar Singh C7afafa08e84a
diff --git a/crates/common_enums/src/enums.rs b/crates/common_enums/src/enums.rs
index 01531788ee..d62f9531dc 100644
--- a/crates/common_enums/src/enums.rs
+++ b/crates/common_enums/src/enums.rs
@@ -9310,6 +9310,7 @@ pub enum PaymentSource {
pub enum BrowserName {
#[default]
Safari,
+ Chrome,
#[serde(other)]
Unknown,
}
diff --git a/crates/router/src/core/payments/flows/session_flow.rs b/crates/router/src/core/payments/flows/session_flow.rs
index ef329b5447..e867e634e2 100644
--- a/crates/router/src/core/payments/flows/session_flow.rs
+++ b/crates/router/src/core/payments/flows/session_flow.rs
@@ -530,6 +530,7 @@ async fn create_applepay_session_token(
header_payload.x_client_platform.clone(),
) {
(Some(common_enums::BrowserName::Safari), Some(common_enums::ClientPlatform::Web))
+ | (Some(common_enums::BrowserName::Chrome), Some(common_enums::ClientPlatform::Web))
| (None, None) => {
let apple_pay_session_request = apple_pay_session_request_optional
.attach_printable("Failed to obtain apple pay session request")?;
@@ -984,6 +985,10 @@ fn create_apple_pay_session_response(
Some(common_enums::BrowserName::Safari),
Some(common_enums::ClientPlatform::Web),
)
+ | (
+ Some(common_enums::BrowserName::Chrome),
+ Some(common_enums::ClientPlatform::Web),
+ )
| (None, None) => Ok(types::PaymentsSessionRouterData {
response: Ok(types::PaymentsResponseData::SessionResponse {
session_token: payment_types::SessionToken::NoSessionTokenReceived,