Skip to content

Commit

Permalink
feat: enable apple pay cybersource (#109)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeeva Ramachandran <[email protected]>
  • Loading branch information
Riddhiagrawal001 and JeevaRamu0104 authored Dec 18, 2023
1 parent 5859497 commit c800865
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/screens/HyperSwitch/Connectors/ConnectorUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -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_
}

Expand Down
2 changes: 1 addition & 1 deletion src/screens/HyperSwitch/Connectors/Wallets/Wallet.res
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ module Wallets = {
}
<div>
{switch (method->getPaymentMethodTypeFromString, connector->getConnectorNameTypeFromString) {
| (ApplePay, STRIPE) | (ApplePay, BANKOFAMERICA) =>
| (ApplePay, STRIPE) | (ApplePay, BANKOFAMERICA) | (ApplePay, CYBERSOURCE) =>
<ApplePayWalletIntegration metadataInputs update metaData setShowWalletConfigurationModal />
| _ =>
<Form initialValues={metaData} onSubmit validate>
Expand Down

0 comments on commit c800865

Please sign in to comment.