Skip to content

Commit

Permalink
chore: Update klaran metadata (#762)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeevaRamu0104 authored May 30, 2024
1 parent a177c1d commit 41622fc
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
Binary file modified public/hyperswitch/wasm/euclid_bg.wasm
Binary file not shown.
42 changes: 41 additions & 1 deletion src/screens/Connectors/ConnectorAccountDetailsHelper.res
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,37 @@ let currencyField = (
(),
)

let dropDownfield = (
~name,
~label,
~buttonText="Select",
~disableSelect=false,
~toolTipText="",
~options=[],
(),
) => {
FormRenderer.makeFieldInfo(
~label,
~isRequired=true,
~name,
~description=toolTipText,
~customInput=InputFields.selectInput(
~deselectDisable=true,
~disableSelect,
~customStyle="max-h-48",
~options=options->Array.map((item): SelectBox.dropdownOption => {
{
label: item,
value: item,
}
}),
~buttonText,
(),
),
(),
)
}

let toggleField = (~name) => {
FormRenderer.makeFieldInfo(
~name,
Expand Down Expand Up @@ -119,10 +150,12 @@ module RenderConnectorInputFields = {
open ConnectorUtils
open LogicUtils
let keys = details->Dict.keysToArray->Array.filter(ele => !Array.includes(keysToIgnore, ele))

keys
->Array.mapWithIndex((field, i) => {
let label = switch field {
| "pull_mechanism_for_external_3ds_enabled" => "Pull Mechanism Enabled"
| "klarna_region" => "Region of your Klarna Merchant Account"
| _ => details->getString(field, "")
}

Expand All @@ -138,7 +171,14 @@ module RenderConnectorInputFields = {

| (ThreeDsAuthenticator(THREEDSECUREIO), "pull_mechanism_for_external_3ds_enabled") =>
toggleField(~name=formName)

| (Processors(KLARNA), "klarna_region") =>
dropDownfield(
~name=formName,
~label,
~buttonText="Select Region",
~options=details->getStrArrayFromDict(field, []),
(),
)
| _ =>
inputField(
~name=formName,
Expand Down

0 comments on commit 41622fc

Please sign in to comment.