From c8008650f7b4b426523f6ac30a83afac922cbe1a Mon Sep 17 00:00:00 2001 From: Riddhiagrawal001 <50551695+Riddhiagrawal001@users.noreply.github.com> Date: Mon, 18 Dec 2023 18:20:23 +0530 Subject: [PATCH] feat: enable apple pay cybersource (#109) Co-authored-by: Jeeva Ramachandran --- src/screens/HyperSwitch/Connectors/ConnectorUtils.res | 11 +++++++++++ src/screens/HyperSwitch/Connectors/Wallets/Wallet.res | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/screens/HyperSwitch/Connectors/ConnectorUtils.res b/src/screens/HyperSwitch/Connectors/ConnectorUtils.res index 043748c4f..6efda5fa1 100644 --- a/src/screens/HyperSwitch/Connectors/ConnectorUtils.res +++ b/src/screens/HyperSwitch/Connectors/ConnectorUtils.res @@ -681,6 +681,17 @@ let generateInitialValuesDict = ( dict->Js.Dict.set("disabled", dict->getBool("disabled", false)->Js.Json.boolean) dict->Js.Dict.set("test_mode", (isLiveMode ? false : true)->Js.Json.boolean) dict->Js.Dict.set("connector_label", dict->getString("connector_label", "")->Js.Json.string) + + let connectorWebHookDetails = + dict->getJsonObjectFromDict("connector_webhook_details")->getDictFromJsonObject + + dict->Js.Dict.set( + "connector_webhook_details", + connectorWebHookDetails->getOptionString("merchant_secret")->Belt.Option.isSome + ? connectorWebHookDetails->Js.Json.object_ + : Js.Json.null, + ) + dict->Js.Json.object_ } diff --git a/src/screens/HyperSwitch/Connectors/Wallets/Wallet.res b/src/screens/HyperSwitch/Connectors/Wallets/Wallet.res index 892323dbe..c5573dbb0 100644 --- a/src/screens/HyperSwitch/Connectors/Wallets/Wallet.res +++ b/src/screens/HyperSwitch/Connectors/Wallets/Wallet.res @@ -119,7 +119,7 @@ module Wallets = { }
{switch (method->getPaymentMethodTypeFromString, connector->getConnectorNameTypeFromString) { - | (ApplePay, STRIPE) | (ApplePay, BANKOFAMERICA) => + | (ApplePay, STRIPE) | (ApplePay, BANKOFAMERICA) | (ApplePay, CYBERSOURCE) => | _ =>