Skip to content
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: Bankofamerica addition in prod #69

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 27 additions & 28 deletions src/screens/HyperSwitch/Connectors/ConnectorPreview.res
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module InfoField = {
<UIUtils.RenderIf condition={str->Js.String2.length > 0}>
<div>
<h2 className="text-lg font-semibold"> {label->React.string} </h2>
<h3 className="truncate"> {str->React.string} </h3>
<h3 className=" break-words"> {str->React.string} </h3>
</div>
</UIUtils.RenderIf>
}
Expand Down Expand Up @@ -129,9 +129,9 @@ module ConnectorSummaryGrid = {
let webhooksUrl = ConnectorUtils.getWebhooksUrl(~connectorName=connector, ~merchantId)

<div className="p-2 md:px-10">
<div className="grid grid-cols-2 w-1/2 my-12">
<div className="grid grid-cols-4 my-12">
<h4 className="text-lg font-semibold"> {"Processor Mode"->React.string} </h4>
<div>
<div className="col-span-3">
{if connectorInfo.test_mode {
<span className="font-semibold p-2 px-3 bg-orange-200 rounded-full">
{"TEST MODE"->React.string}
Expand All @@ -143,13 +143,13 @@ module ConnectorSummaryGrid = {
}}
</div>
</div>
<div className="grid grid-cols-2 w-1/2 my-12">
<div className="grid grid-cols-4 my-12">
<h4 className="text-lg font-semibold"> {"Profile Id"->React.string} </h4>
<div> {connectorInfo.profile_id->React.string} </div>
<div className="col-span-3"> {connectorInfo.profile_id->React.string} </div>
</div>
<div className="grid grid-cols-2 w-1/2 my-12">
<div className="grid grid-cols-4 my-12">
<h4 className="text-lg font-semibold"> {"API Keys"->React.string} </h4>
<div className="flex flex-col gap-6">
<div className="flex flex-col gap-6 col-span-3">
{connectorAccountFields
->Js.Dict.keys
->Array.mapWithIndex((field, index) => {
Expand All @@ -164,31 +164,30 @@ module ConnectorSummaryGrid = {
->React.array}
</div>
</div>
<div className="grid grid-cols-4 w-full my-12">
<div className="grid grid-cols-4 my-12">
<h4 className="text-lg font-semibold"> {"Webhooks"->React.string} </h4>
<div className="flex flex-col col-span-3">
<div className="flex">
<div> {webhooksUrl->React.string} </div>
<div
className="px-4 flex gap-2 items-center cursor-pointer"
onClick={_ => {
Clipboard.writeText(webhooksUrl)
showToast(~message="Copied to Clipboard!", ~toastType=ToastSuccess, ())
hyperswitchMixPanel(
~pageName=`${url.path->LogicUtils.getListHead}`,
~contextName="webhook_processor",
~actionName="hs_webhookcopied",
(),
)
}}>
<img src={`/assets/CopyToClipboard.svg`} />
</div>
</div>
// <div className="flex flex-col ">
<div className="flex col-span-3">
<div> {webhooksUrl->React.string} </div>
<img
src={`/assets/CopyToClipboard.svg`}
onClick={_ => {
Clipboard.writeText(webhooksUrl)
showToast(~message="Copied to Clipboard!", ~toastType=ToastSuccess, ())
hyperswitchMixPanel(
~pageName=`${url.path->LogicUtils.getListHead}`,
~contextName="webhook_processor",
~actionName="hs_webhookcopied",
(),
)
}}
/>
// </div>
</div>
</div>
<div className="grid grid-cols-2 w-1/2 my-12">
<div className="grid grid-cols-4 my-12">
<h4 className="text-lg font-semibold"> {"PMTs"->React.string} </h4>
<div className="flex flex-col gap-6">
<div className="flex flex-col gap-6 col-span-3">
{connectorInfo.payment_methods_enabled
->Array.mapWithIndex((field, index) => {
<InfoField
Expand Down
11 changes: 6 additions & 5 deletions src/screens/HyperSwitch/Connectors/ConnectorUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,15 @@ let connectorList: array<connectorName> = [
let connectorListForLive: array<connectorName> = [
STRIPE,
ADYEN,
CHECKOUT,
ZEN,
BLUESNAP,
TRUSTPAY,
PAYME,
PAYPAL,
BANKOFAMERICA,
BLUESNAP,
CHECKOUT,
CRYPTOPAY,
IATAPAY,
PAYME,
TRUSTPAY,
ZEN,
]

let getPaymentMethodFromString = paymentMethod => {
Expand Down