diff --git a/src/Components/AddressPaymentInput.res b/src/Components/AddressPaymentInput.res
index 8e26851cb..493a6f061 100644
--- a/src/Components/AddressPaymentInput.res
+++ b/src/Components/AddressPaymentInput.res
@@ -68,12 +68,12 @@ let make = (~paymentType, ~className="") => {
let checkPostalValidity = (
postal: RecoilAtomTypes.field,
setPostal: (
- . OrcaPaymentPage.RecoilAtomTypes.field => OrcaPaymentPage.RecoilAtomTypes.field,
+ OrcaPaymentPage.RecoilAtomTypes.field => OrcaPaymentPage.RecoilAtomTypes.field
) => unit,
regex,
) => {
if RegExp.test(regex->RegExp.fromString, postal.value) && postal.value !== "" && regex !== "" {
- setPostal(.prev => {
+ setPostal(prev => {
...prev,
isValid: Some(true),
errorString: "",
@@ -81,7 +81,7 @@ let make = (~paymentType, ~className="") => {
} else if (
regex !== "" && !RegExp.test(regex->RegExp.fromString, postal.value) && postal.value !== ""
) {
- setPostal(.prev => {
+ setPostal(prev => {
...prev,
isValid: Some(false),
errorString: localeString.postalCodeInvalidText,
@@ -125,7 +125,7 @@ let make = (~paymentType, ~className="") => {
let onPostalChange = ev => {
let val = ReactEvent.Form.target(ev)["value"]
- setPostalCode(.prev => {
+ setPostalCode(prev => {
...prev,
value: val,
errorString: "",
@@ -138,13 +138,13 @@ let make = (~paymentType, ~className="") => {
let onPostalBlur = ev => {
let val = ReactEvent.Focus.target(ev)["value"]
if regex !== "" && RegExp.test(regex->RegExp.fromString, val) && val !== "" {
- setPostalCode(.prev => {
+ setPostalCode(prev => {
...prev,
isValid: Some(true),
errorString: "",
})
} else if regex !== "" && !RegExp.test(regex->RegExp.fromString, val) && val !== "" {
- setPostalCode(.prev => {
+ setPostalCode(prev => {
...prev,
isValid: Some(false),
errorString: localeString.postalCodeInvalidText,
@@ -158,7 +158,7 @@ let make = (~paymentType, ~className="") => {
}, (regex, country.value))
React.useEffect1(() => {
- setState(.prev => {
+ setState(prev => {
...prev,
value: "",
})
@@ -171,31 +171,31 @@ let make = (~paymentType, ~className="") => {
let confirm = json->Utils.getDictFromJson->ConfirmType.itemToObjMapper
if confirm.doSubmit {
if line1.value == "" {
- setLine1(.prev => {
+ setLine1(prev => {
...prev,
errorString: localeString.line1EmptyText,
})
}
if line2.value == "" {
- setLine2(.prev => {
+ setLine2(prev => {
...prev,
errorString: localeString.line2EmptyText,
})
}
if state.value == "" {
- setState(.prev => {
+ setState(prev => {
...prev,
errorString: localeString.stateEmptyText,
})
}
if postalCode.value == "" {
- setPostalCode(.prev => {
+ setPostalCode(prev => {
...prev,
errorString: localeString.postalCodeEmptyText,
})
}
if city.value == "" {
- setCity(.prev => {
+ setCity(prev => {
...prev,
errorString: localeString.cityEmptyText,
})
@@ -216,7 +216,7 @@ let make = (~paymentType, ~className="") => {
value=line1
onChange={ev => {
setShowOtherFields(_ => true)
- setLine1(.prev => {
+ setLine1(prev => {
...prev,
value: ReactEvent.Form.target(ev)["value"],
})
@@ -239,7 +239,7 @@ let make = (~paymentType, ~className="") => {
setValue={setLine2}
value=line2
onChange={ev => {
- setLine2(.prev => {
+ setLine2(prev => {
...prev,
value: ReactEvent.Form.target(ev)["value"],
})
@@ -288,7 +288,7 @@ let make = (~paymentType, ~className="") => {
className
value=city
onChange={ev => {
- setCity(.prev => {
+ setCity(prev => {
...prev,
value: ReactEvent.Form.target(ev)["value"],
})
diff --git a/src/Components/BillingNamePaymentInput.res b/src/Components/BillingNamePaymentInput.res
index 4fa3b7bbc..2676f82bd 100644
--- a/src/Components/BillingNamePaymentInput.res
+++ b/src/Components/BillingNamePaymentInput.res
@@ -18,7 +18,7 @@ let make = (~paymentType, ~customFieldName=None, ~requiredFields as optionalRequ
let changeName = ev => {
let val: string = ReactEvent.Form.target(ev)["value"]
- setBillingName(.prev => {
+ setBillingName(prev => {
value: val,
isValid: Some(val !== ""),
errorString: val !== "" ? "" : prev.errorString,
@@ -26,7 +26,7 @@ let make = (~paymentType, ~customFieldName=None, ~requiredFields as optionalRequ
}
let onBlur = ev => {
let val: string = ReactEvent.Focus.target(ev)["value"]
- setBillingName(.prev => {
+ setBillingName(prev => {
...prev,
isValid: Some(val !== ""),
})
@@ -42,7 +42,7 @@ let make = (~paymentType, ~customFieldName=None, ~requiredFields as optionalRequ
let confirm = json->getDictFromJson->ConfirmType.itemToObjMapper
if confirm.doSubmit {
if billingName.value == "" {
- setBillingName(.prev => {
+ setBillingName(prev => {
...prev,
errorString: fieldName->localeString.nameEmptyText,
})
@@ -50,7 +50,7 @@ let make = (~paymentType, ~customFieldName=None, ~requiredFields as optionalRequ
switch optionalRequiredFields {
| Some(requiredFields) =>
if !DynamicFieldsUtils.checkIfNameIsValid(requiredFields, BillingName, billingName) {
- setBillingName(.prev => {
+ setBillingName(prev => {
...prev,
errorString: fieldName->localeString.completeNameEmptyText,
})
diff --git a/src/Components/BlikCodePaymentInput.res b/src/Components/BlikCodePaymentInput.res
index 70f6c34ae..ced845885 100644
--- a/src/Components/BlikCodePaymentInput.res
+++ b/src/Components/BlikCodePaymentInput.res
@@ -23,14 +23,14 @@ let make = () => {
let changeblikCode = ev => {
let val: string = ReactEvent.Form.target(ev)["value"]
- setblikCode(.prev => {
+ setblikCode(prev => {
...prev,
value: val->formatBSB,
})
}
React.useEffect1(() => {
- setblikCode(.prev => {
+ setblikCode(prev => {
...prev,
errorString: switch prev.isValid {
| Some(val) => val ? "" : "Invalid blikCode"
@@ -45,7 +45,7 @@ let make = () => {
let confirm = json->Utils.getDictFromJson->ConfirmType.itemToObjMapper
if confirm.doSubmit {
if blikCode.value == "" {
- setblikCode(.prev => {
+ setblikCode(prev => {
...prev,
errorString: "blikCode cannot be empty",
})
diff --git a/src/Components/DynamicFields.res b/src/Components/DynamicFields.res
index ad4126d69..ac9e632d1 100644
--- a/src/Components/DynamicFields.res
+++ b/src/Components/DynamicFields.res
@@ -92,13 +92,13 @@ let make = (
let countryNames = Utils.getCountryNames(Country.getCountry(paymentMethodType))
let setCurrency = val => {
- setCurrency(. val)
+ setCurrency(val)
}
let setSelectedBank = val => {
- setSelectedBank(. val)
+ setSelectedBank(val)
}
let setCountry = val => {
- setCountry(. val)
+ setCountry(val)
}
let (
@@ -192,13 +192,13 @@ let make = (
let val = ReactEvent.Form.target(ev)["value"]
if val !== "" {
- setPostalCode(._ => {
+ setPostalCode(_ => {
isValid: Some(true),
value: val,
errorString: "",
})
} else {
- setPostalCode(._ => {
+ setPostalCode(_ => {
isValid: Some(false),
value: val,
errorString: "",
@@ -452,7 +452,7 @@ let make = (
value=city
onChange={ev => {
let value = ReactEvent.Form.target(ev)["value"]
- setCity(.prev => {
+ setCity(prev => {
isValid: value !== "" ? Some(true) : Some(false),
value,
errorString: value !== "" ? "" : prev.errorString,
@@ -460,7 +460,7 @@ let make = (
}}
onBlur={ev => {
let value = ReactEvent.Focus.target(ev)["value"]
- setCity(.prev => {
+ setCity(prev => {
...prev,
isValid: Some(value !== ""),
})
@@ -502,7 +502,7 @@ let make = (
value=postalCode
onBlur={ev => {
let value = ReactEvent.Focus.target(ev)["value"]
- setPostalCode(.prev => {
+ setPostalCode(prev => {
...prev,
isValid: Some(value !== ""),
})
@@ -522,7 +522,7 @@ let make = (
value=line1
onChange={ev => {
let value = ReactEvent.Form.target(ev)["value"]
- setLine1(.prev => {
+ setLine1(prev => {
isValid: value !== "" ? Some(true) : Some(false),
value,
errorString: value !== "" ? "" : prev.errorString,
@@ -530,7 +530,7 @@ let make = (
}}
onBlur={ev => {
let value = ReactEvent.Focus.target(ev)["value"]
- setLine1(.prev => {
+ setLine1(prev => {
...prev,
isValid: Some(value !== ""),
})
@@ -548,7 +548,7 @@ let make = (
value=line2
onChange={ev => {
let value = ReactEvent.Form.target(ev)["value"]
- setLine2(.prev => {
+ setLine2(prev => {
isValid: value !== "" ? Some(true) : Some(false),
value,
errorString: value !== "" ? "" : prev.errorString,
@@ -556,7 +556,7 @@ let make = (
}}
onBlur={ev => {
let value = ReactEvent.Focus.target(ev)["value"]
- setLine2(.prev => {
+ setLine2(prev => {
...prev,
isValid: Some(value !== ""),
})
@@ -574,7 +574,7 @@ let make = (
value=city
onChange={ev => {
let value = ReactEvent.Form.target(ev)["value"]
- setCity(.prev => {
+ setCity(prev => {
isValid: value !== "" ? Some(true) : Some(false),
value,
errorString: value !== "" ? "" : prev.errorString,
@@ -582,7 +582,7 @@ let make = (
}}
onBlur={ev => {
let value = ReactEvent.Focus.target(ev)["value"]
- setCity(.prev => {
+ setCity(prev => {
...prev,
isValid: Some(value !== ""),
})
@@ -615,7 +615,7 @@ let make = (
value=postalCode
onBlur={ev => {
let value = ReactEvent.Focus.target(ev)["value"]
- setPostalCode(.prev => {
+ setPostalCode(prev => {
...prev,
isValid: Some(value !== ""),
})
diff --git a/src/Components/EmailPaymentInput.res b/src/Components/EmailPaymentInput.res
index d1eb31c5f..2688b6c93 100644
--- a/src/Components/EmailPaymentInput.res
+++ b/src/Components/EmailPaymentInput.res
@@ -15,7 +15,7 @@ let make = (~paymentType) => {
let changeEmail = ev => {
let val: string = ReactEvent.Form.target(ev)["value"]
- setEmail(.prev => {
+ setEmail(prev => {
value: val,
isValid: val->Utils.isEmailValid,
errorString: val->Utils.isEmailValid->Option.getOr(false) ? "" : prev.errorString,
@@ -23,14 +23,14 @@ let make = (~paymentType) => {
}
let onBlur = ev => {
let val = ReactEvent.Focus.target(ev)["value"]
- setEmail(.prev => {
+ setEmail(prev => {
...prev,
isValid: val->Utils.isEmailValid,
})
}
React.useEffect1(() => {
- setEmail(.prev => {
+ setEmail(prev => {
...prev,
errorString: switch prev.isValid {
| Some(val) => val ? "" : localeString.emailInvalidText
@@ -45,7 +45,7 @@ let make = (~paymentType) => {
let confirm = json->Utils.getDictFromJson->ConfirmType.itemToObjMapper
if confirm.doSubmit {
if email.value == "" {
- setEmail(.prev => {
+ setEmail(prev => {
...prev,
errorString: localeString.emailEmptyText,
})
diff --git a/src/Components/FullNamePaymentInput.res b/src/Components/FullNamePaymentInput.res
index 661ffcaa8..975c12568 100644
--- a/src/Components/FullNamePaymentInput.res
+++ b/src/Components/FullNamePaymentInput.res
@@ -14,7 +14,7 @@ let make = (~paymentType, ~customFieldName=None, ~optionalRequiredFields=None) =
let changeName = ev => {
let val: string = ReactEvent.Form.target(ev)["value"]
- setFullName(.prev => {
+ setFullName(prev => {
value: val,
isValid: Some(val !== ""),
errorString: val !== "" ? "" : prev.errorString,
@@ -23,7 +23,7 @@ let make = (~paymentType, ~customFieldName=None, ~optionalRequiredFields=None) =
let onBlur = ev => {
let val: string = ReactEvent.Focus.target(ev)["value"]
- setFullName(.prev => {
+ setFullName(prev => {
...prev,
isValid: Some(val !== ""),
})
@@ -40,7 +40,7 @@ let make = (~paymentType, ~customFieldName=None, ~optionalRequiredFields=None) =
let confirm = json->getDictFromJson->ConfirmType.itemToObjMapper
if confirm.doSubmit {
if fullName.value == "" {
- setFullName(.prev => {
+ setFullName(prev => {
...prev,
errorString: fieldName->localeString.nameEmptyText,
})
@@ -48,7 +48,7 @@ let make = (~paymentType, ~customFieldName=None, ~optionalRequiredFields=None) =
switch optionalRequiredFields {
| Some(requiredFields) =>
if !DynamicFieldsUtils.checkIfNameIsValid(requiredFields, FullName, fullName) {
- setFullName(.prev => {
+ setFullName(prev => {
...prev,
errorString: fieldName->localeString.completeNameEmptyText,
})
diff --git a/src/Components/KountSDK.res b/src/Components/KountSDK.res
index 6eaab96ab..d167ddc11 100644
--- a/src/Components/KountSDK.res
+++ b/src/Components/KountSDK.res
@@ -3,9 +3,9 @@ type kountConfig = {
environment: string,
isSinglePageApp: bool,
}
-type sdk = {\"IsCompleted": (. unit) => bool}
-type scriptSDK = {collectData: (. unit) => unit}
+type sdk = {\"IsCompleted": unit => bool}
+type scriptSDK = {collectData: unit => unit}
@module("@kount/kount-web-client-sdk")
-external kountSDK: (. kountConfig, string) => sdk = "default"
+external kountSDK: (kountConfig, string) => sdk = "default"
@new external invokeKountSDK: unit => scriptSDK = "ka.ClientSDK"
diff --git a/src/Components/PaymentDropDownField.res b/src/Components/PaymentDropDownField.res
index ab561d4d9..17f7b6644 100644
--- a/src/Components/PaymentDropDownField.res
+++ b/src/Components/PaymentDropDownField.res
@@ -3,7 +3,7 @@ open RecoilAtoms
let make = (
~value: RecoilAtomTypes.field,
~setValue: (
- . OrcaPaymentPage.RecoilAtomTypes.field => OrcaPaymentPage.RecoilAtomTypes.field,
+ OrcaPaymentPage.RecoilAtomTypes.field => OrcaPaymentPage.RecoilAtomTypes.field
) => unit,
~fieldName,
~options,
@@ -34,7 +34,7 @@ let make = (
value.value === initialValue ||
options->Array.includes(value.value)->not
) {
- setValue(.prev => {
+ setValue(prev => {
...prev,
isValid: Some(true),
value: initialValue,
@@ -64,7 +64,7 @@ let make = (
let handleChange = ev => {
let target = ev->ReactEvent.Form.target
let value = target["value"]
- setValue(._ => {
+ setValue(_ => {
isValid: Some(true),
value,
errorString: "",
diff --git a/src/Components/PaymentField.res b/src/Components/PaymentField.res
index 625e6533e..c9bcb8b3d 100644
--- a/src/Components/PaymentField.res
+++ b/src/Components/PaymentField.res
@@ -28,7 +28,7 @@ let make = (
setInputFocused(_ => true)
switch setValue {
| Some(fn) =>
- fn(.prev => {
+ fn(prev => {
...prev,
isValid: None,
errorString: "",
diff --git a/src/Components/PaymentLoader.res b/src/Components/PaymentLoader.res
index 36a041ef4..caa0c11bf 100644
--- a/src/Components/PaymentLoader.res
+++ b/src/Components/PaymentLoader.res
@@ -1,6 +1,9 @@
@react.component
let make = () => {
- let loaderUI =
+ let loaderUI =
+
+
+
{loaderUI}
diff --git a/src/Components/PhoneNumberPaymentInput.res b/src/Components/PhoneNumberPaymentInput.res
index de70e50b3..be87ebf2b 100644
--- a/src/Components/PhoneNumberPaymentInput.res
+++ b/src/Components/PhoneNumberPaymentInput.res
@@ -25,7 +25,7 @@ let make = () => {
let changePhone = ev => {
let val: string = ReactEvent.Form.target(ev)["value"]->String.replaceRegExp(%re("/\+D+/g"), "")
- setPhone(.prev => {
+ setPhone(prev => {
...prev,
value: val->formatBSB,
})
diff --git a/src/Components/PortalCapture.res b/src/Components/PortalCapture.res
index cfb0cd1ef..568afa946 100644
--- a/src/Components/PortalCapture.res
+++ b/src/Components/PortalCapture.res
@@ -2,7 +2,7 @@
let make = React.memo((~name: string) => {
let (_, setPortalNodes) = Recoil.useRecoilState(RecoilAtoms.portalNodes)
let setDiv = React.useCallback2((elem: Nullable.t
) => {
- setPortalNodes(.
+ setPortalNodes(
prevDict => {
let clonedDict =
prevDict
diff --git a/src/Components/SavedCardItem.res b/src/Components/SavedCardItem.res
index eb5b237b1..48c0a52fd 100644
--- a/src/Components/SavedCardItem.res
+++ b/src/Components/SavedCardItem.res
@@ -30,7 +30,7 @@ let make = (
let pickerItemClass = isActive ? "PickerItem--selected" : ""
let focusCVC = () => {
- setCardBrand(._ =>
+ setCardBrand(_ =>
switch paymentItem.card.scheme {
| Some(val) => val
| None => ""
@@ -73,7 +73,7 @@ let make = (
~boxShadow="none",
(),
)}
- onClick={_ => setPaymentToken(._ => (paymentItem.paymentToken, paymentItem.customerId))}>
+ onClick={_ => setPaymentToken(_ => (paymentItem.paymentToken, paymentItem.customerId))}>
diff --git a/src/Components/SavedMethods.res b/src/Components/SavedMethods.res
index f3fb35900..29e63259e 100644
--- a/src/Components/SavedMethods.res
+++ b/src/Components/SavedMethods.res
@@ -176,7 +176,7 @@ let make = (
(),
)}
onClick={_ => {
- setShowFields(._ => true)
+ setShowFields(_ => true)
}}>
{React.string(localeString.morePaymentMethods)}
diff --git a/src/Hooks/CommonHooks.res b/src/Hooks/CommonHooks.res
index 99dc81567..a8e5b1059 100644
--- a/src/Hooks/CommonHooks.res
+++ b/src/Hooks/CommonHooks.res
@@ -1,12 +1,12 @@
type element = {
- mutable getAttribute: (. string) => string,
+ mutable getAttribute: string => string,
mutable src: string,
mutable async: bool,
mutable rel: string,
mutable href: string,
mutable \"as": string,
mutable crossorigin: string,
- setAttribute: (. string, string) => unit,
+ setAttribute: (string, string) => unit,
}
type keys = {
clientSecret: option
,
@@ -39,17 +39,17 @@ let useScript = (src: string) => {
let script = querySelector(`script[src="${src}"]`)
switch script->Nullable.toOption {
| Some(dom) =>
- setStatus(_ => dom.getAttribute(. "data-status"))
+ setStatus(_ => dom.getAttribute("data-status"))
None
| None =>
let script = createElement("script")
script.src = src
script.async = true
- script.setAttribute(. "data-status", "loading")
+ script.setAttribute("data-status", "loading")
appendChild(script)
let setAttributeFromEvent = (event: event) => {
setStatus(_ => event.\"type" === "load" ? "ready" : "error")
- script.setAttribute(. "data-status", event.\"type" === "load" ? "ready" : "error")
+ script.setAttribute("data-status", event.\"type" === "load" ? "ready" : "error")
}
script->addEventListener("load", setAttributeFromEvent)
script->addEventListener("error", setAttributeFromEvent)
@@ -71,22 +71,22 @@ let updateKeys = (dict, keyPair, setKeys) => {
if dict->Utils.getDictIsSome(key) {
switch key {
| "iframeId" =>
- setKeys(.prev => {
+ setKeys(prev => {
...prev,
iframeId: dict->Utils.getString(key, valueStr),
})
| "publishableKey" =>
- setKeys(.prev => {
+ setKeys(prev => {
...prev,
publishableKey: dict->Utils.getString(key, valueStr),
})
| "parentURL" =>
- setKeys(.prev => {
+ setKeys(prev => {
...prev,
parentURL: dict->Utils.getString(key, valueStr),
})
| "sdkHandleOneClickConfirmPayment" =>
- setKeys(.prev => {
+ setKeys(prev => {
...prev,
sdkHandleOneClickConfirmPayment: dict->Utils.getBool(key, valueBool(true)),
})
diff --git a/src/LoaderController.res b/src/LoaderController.res
index c996d34eb..0366d2083 100644
--- a/src/LoaderController.res
+++ b/src/LoaderController.res
@@ -47,26 +47,26 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => {
]->Array.forEach(val => {
let (value, setValue) = val
if value != "" {
- setValue(.prev => {
+ setValue(prev => {
...prev,
value,
})
}
})
if optionsPayment.defaultValues.billingDetails.address.country === "" {
- let clientTimeZone = CardUtils.dateTimeFormat(.).resolvedOptions(.).timeZone
+ let clientTimeZone = CardUtils.dateTimeFormat().resolvedOptions().timeZone
let clientCountry = Utils.getClientCountry(clientTimeZone)
- setUserAddressCountry(.prev => {
+ setUserAddressCountry(prev => {
...prev,
value: clientCountry.countryName,
})
- setCountry(._ => clientCountry.countryName)
+ setCountry(_ => clientCountry.countryName)
} else {
- setUserAddressCountry(.prev => {
+ setUserAddressCountry(prev => {
...prev,
value: optionsPayment.defaultValues.billingDetails.address.country,
})
- setCountry(._ => optionsPayment.defaultValues.billingDetails.address.country)
+ setCountry(_ => optionsPayment.defaultValues.billingDetails.address.country)
}
}
@@ -77,10 +77,10 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => {
| CardExpiryElement
| CardCVCElement
| Card =>
- setOptions(._ => ElementType.itemToObjMapper(optionsDict, logger))
+ setOptions(_ => ElementType.itemToObjMapper(optionsDict, logger))
| Payment => {
let paymentOptions = PaymentType.itemToObjMapper(optionsDict, logger)
- setOptionsPayment(._ => paymentOptions)
+ setOptionsPayment(_ => paymentOptions)
optionsCallback(paymentOptions)
}
| _ => ()
@@ -105,7 +105,7 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => {
let appearance =
optionsAppearance == CardTheme.defaultAppearance ? config.appearance : optionsAppearance
- setConfig(._ => {
+ setConfig(_ => {
config: {
appearance,
locale: config.locale,
@@ -134,7 +134,7 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => {
| Loaded(_) => logger.setLogInfo(~value="Loaded", ~eventName=LOADER_CHANGED, ())
| Loading => logger.setLogInfo(~value="Loading", ~eventName=LOADER_CHANGED, ())
| SemiLoaded => {
- setList(._ => updatedState)
+ setList(_ => updatedState)
logger.setLogInfo(~value="SemiLoaded", ~eventName=LOADER_CHANGED, ())
}
| LoadError(x) =>
@@ -212,11 +212,11 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => {
let sdkSessionId = dict->getString("sdkSessionId", "no-element")
logger.setSessionId(sdkSessionId)
if Window.isInteg {
- setBlockConfirm(._ => dict->getBool("blockConfirm", false))
- setSwitchToCustomPod(._ => dict->getBool("switchToCustomPod", false))
+ setBlockConfirm(_ => dict->getBool("blockConfirm", false))
+ setSwitchToCustomPod(_ => dict->getBool("switchToCustomPod", false))
}
updateOptions(dict)
- setSessionId(._ => {
+ setSessionId(_ => {
sdkSessionId
})
if dict->getDictIsSome("publishableKey") {
@@ -236,7 +236,7 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => {
let paymentOptions = dict->Utils.getDictFromObj("paymentOptions")
let clientSecret = getWarningString(paymentOptions, "clientSecret", "", ~logger)
- setKeys(.prev => {
+ setKeys(prev => {
...prev,
clientSecret: Some(clientSecret),
})
@@ -274,7 +274,7 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => {
let paymentOptions = dict->Utils.getDictFromObj("paymentOptions")
let clientSecret = getWarningString(paymentOptions, "clientSecret", "", ~logger)
- setKeys(.prev => {
+ setKeys(prev => {
...prev,
clientSecret: Some(clientSecret),
})
@@ -302,11 +302,11 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => {
let clientSecret = dict->Dict.get("clientSecret")
switch clientSecret {
| Some(val) =>
- setKeys(.prev => {
+ setKeys(prev => {
...prev,
clientSecret: Some(val->JSON.Decode.string->Option.getOr("")),
})
- setConfig(.prev => {
+ setConfig(prev => {
...prev,
config: {
...prev.config,
@@ -331,10 +331,10 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => {
}
}
if dict->getDictIsSome("sessions") {
- setSessions(._ => Loaded(dict->getJsonObjectFromDict("sessions")))
+ setSessions(_ => Loaded(dict->getJsonObjectFromDict("sessions")))
}
if dict->getDictIsSome("isReadyToPay") {
- setIsGooglePayReady(._ =>
+ setIsGooglePayReady(_ =>
dict->getJsonObjectFromDict("isReadyToPay")->JSON.Decode.bool->Option.getOr(false)
)
}
@@ -360,20 +360,20 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => {
)
| _ => ()
}
- setList(._ => updatedState)
+ setList(_ => updatedState)
}
if dict->getDictIsSome("customerPaymentMethods") {
let customerPaymentMethods = dict->PaymentType.createCustomerObjArr
- setOptionsPayment(.prev => {
+ setOptionsPayment(prev => {
...prev,
customerPaymentMethods,
})
}
if dict->Dict.get("applePayCanMakePayments")->Option.isSome {
- setIsApplePayReady(._ => true)
+ setIsApplePayReady(_ => true)
}
if dict->Dict.get("applePaySessionObjNotPresent")->Option.isSome {
- setIsApplePayReady(.prev => prev && false)
+ setIsApplePayReady(prev => prev && false)
}
} catch {
| _ => setIntegrateErrorError(_ => true)
@@ -390,7 +390,7 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => {
->ignore
})
switch divRef.current->Nullable.toOption {
- | Some(r) => observer.observe(. r)
+ | Some(r) => observer.observe(r)
| None => ()
}
diff --git a/src/Payment.res b/src/Payment.res
index c7f22cc32..0ac441e61 100644
--- a/src/Payment.res
+++ b/src/Payment.res
@@ -54,7 +54,7 @@ let make = (~paymentMode, ~integrateError, ~logger) => {
: (brand, maxLength)
}, (cardNumber, cardScheme, showFields))
- let clientTimeZone = dateTimeFormat(.).resolvedOptions(.).timeZone
+ let clientTimeZone = dateTimeFormat().resolvedOptions().timeZone
let clientCountry = Utils.getClientCountry(clientTimeZone)
let countryNames = Utils.getCountryNames(Country.country)
diff --git a/src/PaymentElement.res b/src/PaymentElement.res
index c9b13df50..cb1dc8a4d 100644
--- a/src/PaymentElement.res
+++ b/src/PaymentElement.res
@@ -52,7 +52,7 @@ let make = (
React.useEffect2(() => {
switch (displaySavedPaymentMethods, customerPaymentMethods) {
| (false, _) => {
- setShowFields(._ => true)
+ setShowFields(_ => true)
setLoadSavedCards(_ => LoadedSavedCards([], true))
}
| (_, LoadingSavedCards) => ()
@@ -76,11 +76,11 @@ let make = (
? NoResult(isGuestCustomer)
: LoadedSavedCards(finalSavedPaymentMethods, isGuestCustomer)
)
- setShowFields(.prev => finalSavedPaymentMethods->Array.length == 0 || prev)
+ setShowFields(prev => finalSavedPaymentMethods->Array.length == 0 || prev)
}
| (_, NoResult(isGuestCustomer)) => {
setLoadSavedCards(_ => NoResult(isGuestCustomer))
- setShowFields(._ => true)
+ setShowFields(_ => true)
}
}
@@ -100,7 +100,7 @@ let make = (
}
switch tokenObj {
- | Some(obj) => setPaymentToken(._ => (obj.paymentToken, obj.customerId))
+ | Some(obj) => setPaymentToken(_ => (obj.paymentToken, obj.customerId))
| None => ()
}
None
@@ -228,7 +228,7 @@ let make = (
}, [selectedOption])
Utils.useSubmitPaymentData(submitCallback)
React.useEffect4(() => {
- setSelectedOption(.prev =>
+ setSelectedOption(prev =>
selectedOption !== ""
? prev
: layoutClass.defaultCollapsed
@@ -389,7 +389,7 @@ let make = (
}
React.useEffect1(() => {
- setShowFields(._ => !displaySavedPaymentMethods)
+ setShowFields(_ => !displaySavedPaymentMethods)
None
}, [displaySavedPaymentMethods])
diff --git a/src/PaymentElementRendererLazy.res b/src/PaymentElementRendererLazy.res
index 0c6794713..f9ac19b16 100644
--- a/src/PaymentElementRendererLazy.res
+++ b/src/PaymentElementRendererLazy.res
@@ -8,4 +8,4 @@ type props = {
countryProps: (string, array),
}
-let make: props => React.element = reactLazy(.() => import_("./PaymentElementRenderer.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./PaymentElementRenderer.bs.js"))
diff --git a/src/PaymentOptions.res b/src/PaymentOptions.res
index 6f2d7ee07..a8049482d 100644
--- a/src/PaymentOptions.res
+++ b/src/PaymentOptions.res
@@ -69,7 +69,7 @@ let make = (
let handleChange = ev => {
let target = ev->ReactEvent.Form.target
let value = target["value"]
- setSelectedOption(._ => value)
+ setSelectedOption(_ => value)
CardUtils.blurRef(selectRef)
}
diff --git a/src/Payments/ACHBankDebitLazy.res b/src/Payments/ACHBankDebitLazy.res
index 8d3fa7d26..91cfcd9c6 100644
--- a/src/Payments/ACHBankDebitLazy.res
+++ b/src/Payments/ACHBankDebitLazy.res
@@ -5,4 +5,4 @@ type props = {
list: PaymentMethodsRecord.list,
}
-let make: props => React.element = reactLazy(.() => import_("./ACHBankDebit.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./ACHBankDebit.bs.js"))
diff --git a/src/Payments/ACHBankTransfer.res b/src/Payments/ACHBankTransfer.res
index 166ced32a..c45bf9be0 100644
--- a/src/Payments/ACHBankTransfer.res
+++ b/src/Payments/ACHBankTransfer.res
@@ -19,7 +19,7 @@ let make = (~paymentType: CardThemeType.mode, ~list: PaymentMethodsRecord.list)
}, (empty, complete))
React.useEffect1(() => {
- setComplete(._ => complete)
+ setComplete(_ => complete)
None
}, [complete])
diff --git a/src/Payments/ACHBankTransferLazy.res b/src/Payments/ACHBankTransferLazy.res
index dd978a654..709da254c 100644
--- a/src/Payments/ACHBankTransferLazy.res
+++ b/src/Payments/ACHBankTransferLazy.res
@@ -5,4 +5,4 @@ type props = {
list: PaymentMethodsRecord.list,
}
-let make: props => React.element = reactLazy(.() => import_("./ACHBankTransfer.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./ACHBankTransfer.bs.js"))
diff --git a/src/Payments/ApplePayLazy.res b/src/Payments/ApplePayLazy.res
index 6c4c3c189..2f625849d 100644
--- a/src/Payments/ApplePayLazy.res
+++ b/src/Payments/ApplePayLazy.res
@@ -7,4 +7,4 @@ type props = {
walletOptions: array,
}
-let make: props => React.element = reactLazy(.() => import_("./ApplePay.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./ApplePay.bs.js"))
diff --git a/src/Payments/BacsBankDebitLazy.res b/src/Payments/BacsBankDebitLazy.res
index 648219832..0e217ffa2 100644
--- a/src/Payments/BacsBankDebitLazy.res
+++ b/src/Payments/BacsBankDebitLazy.res
@@ -5,4 +5,4 @@ type props = {
list: PaymentMethodsRecord.list,
}
-let make: props => React.element = reactLazy(.() => import_("./BacsBankDebit.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./BacsBankDebit.bs.js"))
diff --git a/src/Payments/BacsBankTransfer.res b/src/Payments/BacsBankTransfer.res
index 492d6c3d2..f1e7043b0 100644
--- a/src/Payments/BacsBankTransfer.res
+++ b/src/Payments/BacsBankTransfer.res
@@ -24,7 +24,7 @@ let default = (props: props) => {
}, (empty, complete))
React.useEffect1(() => {
- setComplete(._ => complete)
+ setComplete(_ => complete)
None
}, [complete])
diff --git a/src/Payments/BacsBankTransferLazy.res b/src/Payments/BacsBankTransferLazy.res
index 2e3eca805..143a2ade9 100644
--- a/src/Payments/BacsBankTransferLazy.res
+++ b/src/Payments/BacsBankTransferLazy.res
@@ -5,4 +5,4 @@ type props = {
list: PaymentMethodsRecord.list,
}
-let make: props => React.element = reactLazy(.() => import_("./BacsBankTransfer.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./BacsBankTransfer.bs.js"))
diff --git a/src/Payments/BecsBankDebit.res b/src/Payments/BecsBankDebit.res
index 2dadb55b0..3323a6fe0 100644
--- a/src/Payments/BecsBankDebit.res
+++ b/src/Payments/BecsBankDebit.res
@@ -49,7 +49,7 @@ let make = (~paymentType: CardThemeType.mode, ~list: PaymentMethodsRecord.list)
}, (empty, complete))
React.useEffect1(() => {
- setComplete(._ => complete)
+ setComplete(_ => complete)
None
}, [complete])
diff --git a/src/Payments/BecsBankDebitLazy.res b/src/Payments/BecsBankDebitLazy.res
index 78ce22b3f..d7877b6d0 100644
--- a/src/Payments/BecsBankDebitLazy.res
+++ b/src/Payments/BecsBankDebitLazy.res
@@ -5,4 +5,4 @@ type props = {
list: PaymentMethodsRecord.list,
}
-let make: props => React.element = reactLazy(.() => import_("./BecsBankDebit.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./BecsBankDebit.bs.js"))
diff --git a/src/Payments/Boleto.res b/src/Payments/Boleto.res
index 4204a8054..6dd4c0992 100644
--- a/src/Payments/Boleto.res
+++ b/src/Payments/Boleto.res
@@ -50,7 +50,7 @@ let make = (~paymentType: CardThemeType.mode, ~list: PaymentMethodsRecord.list)
}, (complete, empty))
React.useEffect1(() => {
- setComplete(._ => complete)
+ setComplete(_ => complete)
None
}, [complete])
diff --git a/src/Payments/BoletoLazy.res b/src/Payments/BoletoLazy.res
index e6ef10a21..454cba077 100644
--- a/src/Payments/BoletoLazy.res
+++ b/src/Payments/BoletoLazy.res
@@ -5,4 +5,4 @@ type props = {
list: PaymentMethodsRecord.list,
}
-let make: props => React.element = reactLazy(.() => import_("./Boleto.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./Boleto.bs.js"))
diff --git a/src/Payments/CardPayment.res b/src/Payments/CardPayment.res
index 61bb4e109..fb523f017 100644
--- a/src/Payments/CardPayment.res
+++ b/src/Payments/CardPayment.res
@@ -79,7 +79,7 @@ let make = (
let complete = isAllValid(isCardValid, isCVCValid, isExpiryValid, true, "payment")
let empty = cardNumber == "" || cardExpiry == "" || cvcNumber == ""
React.useEffect1(() => {
- setComplete(._ => complete)
+ setComplete(_ => complete)
None
}, [complete])
@@ -308,7 +308,7 @@ let make = (
(),
)}
onClick={_ => {
- setShowFields(._ => false)
+ setShowFields(_ => false)
}}>
{React.string(localeString.useExistingPaymentMethods)}
diff --git a/src/Payments/GPayLazy.res b/src/Payments/GPayLazy.res
index 6c0fe3d28..db56d64af 100644
--- a/src/Payments/GPayLazy.res
+++ b/src/Payments/GPayLazy.res
@@ -8,4 +8,4 @@ type props = {
walletOptions: array,
}
-let make: props => React.element = reactLazy(.() => import_("./GPay.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./GPay.bs.js"))
diff --git a/src/Payments/KlarnaPayment.res b/src/Payments/KlarnaPayment.res
index 1ba7429ea..0a7cd5d91 100644
--- a/src/Payments/KlarnaPayment.res
+++ b/src/Payments/KlarnaPayment.res
@@ -19,7 +19,7 @@ let make = (~paymentType, ~countryProps, ~list: PaymentMethodsRecord.list) => {
let (country, setCountry) = Recoil.useRecoilState(userCountry)
let setCountry = val => {
- setCountry(. val)
+ setCountry(val)
}
open Utils
@@ -35,7 +35,7 @@ let make = (~paymentType, ~countryProps, ~list: PaymentMethodsRecord.list) => {
None
}, (empty, complete))
React.useEffect1(() => {
- setComplete(._ => complete)
+ setComplete(_ => complete)
None
}, [complete])
diff --git a/src/Payments/KlarnaPaymentLazy.res b/src/Payments/KlarnaPaymentLazy.res
index ec0f2db4a..a856702aa 100644
--- a/src/Payments/KlarnaPaymentLazy.res
+++ b/src/Payments/KlarnaPaymentLazy.res
@@ -6,4 +6,4 @@ type props = {
countryProps: (string, array),
}
-let make: props => React.element = reactLazy(.() => import_("./KlarnaPayment.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./KlarnaPayment.bs.js"))
diff --git a/src/Payments/KlarnaSDKLazy.res b/src/Payments/KlarnaSDKLazy.res
index ce272f697..c2820ddc1 100644
--- a/src/Payments/KlarnaSDKLazy.res
+++ b/src/Payments/KlarnaSDKLazy.res
@@ -5,4 +5,4 @@ type props = {
list: PaymentMethodsRecord.list,
}
-let make: props => React.element = reactLazy(.() => import_("./KlarnaSDK.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./KlarnaSDK.bs.js"))
diff --git a/src/Payments/PayPal.res b/src/Payments/PayPal.res
index 901b736eb..b1f7f4e81 100644
--- a/src/Payments/PayPal.res
+++ b/src/Payments/PayPal.res
@@ -72,7 +72,7 @@ let make = (~list: PaymentMethodsRecord.list) => {
}
React.useEffect0(() => {
- areOneClickWalletsRendered(.prev => {
+ areOneClickWalletsRendered(prev => {
...prev,
isPaypal: true,
})
diff --git a/src/Payments/PayPalLazy.res b/src/Payments/PayPalLazy.res
index b798bfe57..ab26b325b 100644
--- a/src/Payments/PayPalLazy.res
+++ b/src/Payments/PayPalLazy.res
@@ -2,4 +2,4 @@ open LazyUtils
type props = {list: PaymentMethodsRecord.list}
-let make: props => React.element = reactLazy(.() => import_("./PayPal.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./PayPal.bs.js"))
diff --git a/src/Payments/PaymentMethodsWrapper.res b/src/Payments/PaymentMethodsWrapper.res
index 71a6027a2..be0d10ab4 100644
--- a/src/Payments/PaymentMethodsWrapper.res
+++ b/src/Payments/PaymentMethodsWrapper.res
@@ -46,7 +46,7 @@ let make = (
let complete = areRequiredFieldsValid
React.useEffect1(() => {
- setFieldComplete(._ => complete)
+ setFieldComplete(_ => complete)
None
}, [complete])
diff --git a/src/Payments/PaymentMethodsWrapperLazy.res b/src/Payments/PaymentMethodsWrapperLazy.res
index 6a1d66ddf..ba4c297ed 100644
--- a/src/Payments/PaymentMethodsWrapperLazy.res
+++ b/src/Payments/PaymentMethodsWrapperLazy.res
@@ -6,4 +6,4 @@ type props = {
paymentMethodName: string,
}
-let make: props => React.element = reactLazy(.() => import_("./PaymentMethodsWrapper.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./PaymentMethodsWrapper.bs.js"))
diff --git a/src/Payments/PaypalSDK.res b/src/Payments/PaypalSDK.res
index 8c29274c7..2ea9392ef 100644
--- a/src/Payments/PaypalSDK.res
+++ b/src/Payments/PaypalSDK.res
@@ -48,23 +48,23 @@ let make = (~sessionObj: SessionsType.token, ~list: PaymentMethodsRecord.list) =
->then(result => {
let result = result->JSON.Decode.bool->Option.getOr(false)
if result {
- braintree.client.create(.{authorization: token}, (clientErr, clientInstance) => {
+ braintree.client.create({authorization: token}, (clientErr, clientInstance) => {
if clientErr {
Console.error2("Error creating client", clientErr)
}
- braintree.paypalCheckout.create(.
+ braintree.paypalCheckout.create(
{client: clientInstance},
(paypalCheckoutErr, paypalCheckoutInstance) => {
switch paypalCheckoutErr->Nullable.toOption {
| Some(val) => Console.warn(`INTEGRATION ERROR: ${val.message}`)
| None => ()
}
- paypalCheckoutInstance.loadPayPalSDK(.
+ paypalCheckoutInstance.loadPayPalSDK(
{vault: true},
() => {
let paypalWrapper = GooglePayType.getElementById(Utils.document, "paypal-button")
paypalWrapper.innerHTML = ""
- paypal["Buttons"](. {
+ paypal["Buttons"]({
style: buttonStyle,
fundingSource: paypal["FUNDING"]["PAYPAL"],
createBillingAgreement: () => {
@@ -76,17 +76,17 @@ let make = (~sessionObj: SessionsType.token, ~list: PaymentMethodsRecord.list) =
])
options.readOnly
? ()
- : paypalCheckoutInstance.createPayment(. {
+ : paypalCheckoutInstance.createPayment({
...defaultOrderDetails,
flow: "vault",
})
},
- onApprove: (. data, _actions) => {
+ onApprove: (data, _actions) => {
options.readOnly
? ()
- : paypalCheckoutInstance.tokenizePayment(.
+ : paypalCheckoutInstance.tokenizePayment(
data,
- (. _err, payload) => {
+ (_err, payload) => {
let (connectors, _) =
list->PaymentUtils.getConnectors(Wallets(Paypal(SDK)))
let body = PaymentBody.paypalSdkBody(
@@ -111,14 +111,14 @@ let make = (~sessionObj: SessionsType.token, ~list: PaymentMethodsRecord.list) =
},
)
},
- onCancel: (. _data) => {
+ onCancel: _data => {
handleCloseLoader()
},
- onError: (. _err) => {
+ onError: _err => {
handleCloseLoader()
},
- }).render(. "#paypal-button")
- areOneClickWalletsRendered(.
+ }).render("#paypal-button")
+ areOneClickWalletsRendered(
prev => {
...prev,
isPaypal: true,
diff --git a/src/Payments/PaypalSDKLazy.res b/src/Payments/PaypalSDKLazy.res
index fdb008de1..e4a47a07a 100644
--- a/src/Payments/PaypalSDKLazy.res
+++ b/src/Payments/PaypalSDKLazy.res
@@ -5,4 +5,4 @@ type props = {
list: PaymentMethodsRecord.list,
}
-let make: props => React.element = reactLazy(.() => import_("./PaypalSDK.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./PaypalSDK.bs.js"))
diff --git a/src/Payments/SepaBankDebit.res b/src/Payments/SepaBankDebit.res
index 341a056ba..461c2549f 100644
--- a/src/Payments/SepaBankDebit.res
+++ b/src/Payments/SepaBankDebit.res
@@ -43,7 +43,7 @@ let make = (~paymentType: CardThemeType.mode, ~list: PaymentMethodsRecord.list)
}, (empty, complete))
React.useEffect1(() => {
- setComplete(._ => complete)
+ setComplete(_ => complete)
None
}, [complete])
diff --git a/src/Payments/SepaBankDebitLazy.res b/src/Payments/SepaBankDebitLazy.res
index 7bec8cd5f..b59b25c5c 100644
--- a/src/Payments/SepaBankDebitLazy.res
+++ b/src/Payments/SepaBankDebitLazy.res
@@ -5,4 +5,4 @@ type props = {
list: PaymentMethodsRecord.list,
}
-let make: props => React.element = reactLazy(.() => import_("./SepaBankDebit.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./SepaBankDebit.bs.js"))
diff --git a/src/Payments/SepaBankTransfer.res b/src/Payments/SepaBankTransfer.res
index fb7f1cc7a..9c671e4c2 100644
--- a/src/Payments/SepaBankTransfer.res
+++ b/src/Payments/SepaBankTransfer.res
@@ -33,7 +33,7 @@ let make = (
None
}, (empty, complete))
React.useEffect1(() => {
- setComplete(._ => complete)
+ setComplete(_ => complete)
None
}, [complete])
diff --git a/src/Payments/SepaBankTransferLazy.res b/src/Payments/SepaBankTransferLazy.res
index fb914fa03..89fe4e117 100644
--- a/src/Payments/SepaBankTransferLazy.res
+++ b/src/Payments/SepaBankTransferLazy.res
@@ -6,4 +6,4 @@ type props = {
countryProps: (string, array),
}
-let make: props => React.element = reactLazy(.() => import_("./SepaBankTransfer.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./SepaBankTransfer.bs.js"))
diff --git a/src/ResizeObserver.res b/src/ResizeObserver.res
index e823f8485..9705ab7bc 100644
--- a/src/ResizeObserver.res
+++ b/src/ResizeObserver.res
@@ -1,4 +1,4 @@
-type observer = {observe: (. Dom.element) => unit}
+type observer = {observe: Dom.element => unit}
type dimensions = {
height: float,
width: float,
diff --git a/src/SingleLineCardPaymentLazy.res b/src/SingleLineCardPaymentLazy.res
index d87c7e1b0..312cec600 100644
--- a/src/SingleLineCardPaymentLazy.res
+++ b/src/SingleLineCardPaymentLazy.res
@@ -10,4 +10,4 @@ type props = {
isFocus: bool,
}
-let make: props => React.element = reactLazy(.() => import_("./SingleLineCardPayment.bs.js"))
+let make: props => React.element = reactLazy(() => import_("./SingleLineCardPayment.bs.js"))
diff --git a/src/TabCard.res b/src/TabCard.res
index 61b97937e..f6da1f5f4 100644
--- a/src/TabCard.res
+++ b/src/TabCard.res
@@ -26,7 +26,7 @@ let make = (~paymentOption: PaymentMethodsRecord.paymentFieldsInfo, ~isActive: b
~cursor="pointer",
(),
)}
- onClick={_ => setSelectedOption(._ => paymentOption.paymentMethodName)}>
+ onClick={_ => setSelectedOption(_ => paymentOption.paymentMethodName)}>
{switch icon {
| Some(ele) => ele
diff --git a/src/Types/ApplePayTypes.res b/src/Types/ApplePayTypes.res
index b32628a16..c4a5eb9c6 100644
--- a/src/Types/ApplePayTypes.res
+++ b/src/Types/ApplePayTypes.res
@@ -3,14 +3,14 @@ type paymentResult = {token: JSON.t}
type event = {validationURL: string, payment: paymentResult}
type innerSession
type session = {
- begin: (. unit) => unit,
- abort: (. unit) => unit,
+ begin: unit => unit,
+ abort: unit => unit,
mutable oncancel: unit => unit,
- canMakePayments: (. unit) => bool,
+ canMakePayments: unit => bool,
mutable onvalidatemerchant: event => unit,
- completeMerchantValidation: (. JSON.t) => unit,
+ completeMerchantValidation: JSON.t => unit,
mutable onpaymentauthorized: event => unit,
- completePayment: (. JSON.t) => unit,
+ completePayment: JSON.t => unit,
\"STATUS_SUCCESS": string,
\"STATUS_FAILURE": string,
}
@@ -42,7 +42,7 @@ type paymentRequestData = {
}
let jsonToPaymentRequestDataType: Dict.t
=> paymentRequestData = jsonDict => {
- let clientTimeZone = CardUtils.dateTimeFormat(.).resolvedOptions(.).timeZone
+ let clientTimeZone = CardUtils.dateTimeFormat().resolvedOptions().timeZone
let clientCountry = Utils.getClientCountry(clientTimeZone)
let defaultCountryCode = clientCountry.isoAlpha2
diff --git a/src/Types/GooglePayType.res b/src/Types/GooglePayType.res
index 2df758843..f30260fb8 100644
--- a/src/Types/GooglePayType.res
+++ b/src/Types/GooglePayType.res
@@ -16,17 +16,17 @@ type paymentDataRequest = {
@val @scope("Object") external assign2: (JSON.t, JSON.t) => paymentDataRequest = "assign"
type element = {
mutable innerHTML: string,
- appendChild: (. Dom.element) => unit,
- removeChild: (. Dom.element) => unit,
+ appendChild: Dom.element => unit,
+ removeChild: Dom.element => unit,
children: array,
}
type document
@val external document: document = "document"
@send external getElementById: (document, string) => element = "getElementById"
type client = {
- isReadyToPay: (. JSON.t) => Promise.t,
- createButton: (. JSON.t) => Dom.element,
- loadPaymentData: (. JSON.t) => Promise.t,
+ isReadyToPay: JSON.t => Promise.t,
+ createButton: JSON.t => Dom.element,
+ loadPaymentData: JSON.t => Promise.t,
}
@new external google: JSON.t => client = "google.payments.api.PaymentsClient"
let getLabel = (var: PaymentType.googlePayStyleType) => {
diff --git a/src/Types/PaypalSDKTypes.res b/src/Types/PaypalSDKTypes.res
index a9cbd8b2d..4f7089133 100644
--- a/src/Types/PaypalSDKTypes.res
+++ b/src/Types/PaypalSDKTypes.res
@@ -43,18 +43,15 @@ let defaultOrderDetails = {
}
type paypalCheckoutInstance = {
- loadPayPalSDK: (. vault, unit => unit) => unit,
- createPayment: (. orderDetails) => unit,
- tokenizePayment: (. data, (. err, payload) => unit) => unit,
+ loadPayPalSDK: (vault, unit => unit) => unit,
+ createPayment: orderDetails => unit,
+ tokenizePayment: (data, (err, payload) => unit) => unit,
}
type authType = {authorization: string}
type checkoutClient = {client: clientInstance}
-type client = {create: (. authType, (clientErr, clientInstance) => unit) => unit}
+type client = {create: (authType, (clientErr, clientInstance) => unit) => unit}
type paypalCheckout = {
- create: (
- . checkoutClient,
- (Nullable.t, paypalCheckoutInstance) => unit,
- ) => unit,
+ create: (checkoutClient, (Nullable.t, paypalCheckoutInstance) => unit) => unit,
}
type braintree = {
client: client,
@@ -72,9 +69,9 @@ type buttons = {
style: style,
fundingSource: string,
createBillingAgreement: unit => unit,
- onApprove: (. data, actions) => unit,
- onCancel: (. data) => unit,
- onError: (. err) => unit,
+ onApprove: (data, actions) => unit,
+ onCancel: data => unit,
+ onError: err => unit,
}
let getLabel = (var: PaymentType.paypalStyleType) => {
switch var {
@@ -85,8 +82,8 @@ let getLabel = (var: PaymentType.paypalStyleType) => {
| Installment => "installment"
}
}
-type some = {render: (. string) => unit}
-type paypal = {"Buttons": (. buttons) => some, "FUNDING": funding}
+type some = {render: string => unit}
+type paypal = {"Buttons": buttons => some, "FUNDING": funding}
@val external braintree: braintree = "braintree"
@val external paypal: paypal = "paypal"
diff --git a/src/Utilities/DynamicFieldsUtils.res b/src/Utilities/DynamicFieldsUtils.res
index 13584d8ef..01c89feb2 100644
--- a/src/Utilities/DynamicFieldsUtils.res
+++ b/src/Utilities/DynamicFieldsUtils.res
@@ -159,7 +159,7 @@ let useRequiredFieldsEmptyAndValid = (
| _ => true
}
})
- setAreRequiredFieldsValid(._ => areRequiredFieldsValid)
+ setAreRequiredFieldsValid(_ => areRequiredFieldsValid)
let areRequiredFieldsEmpty = fieldsArrWithBillingAddress->Array.reduce(false, (
acc,
@@ -201,7 +201,7 @@ let useRequiredFieldsEmptyAndValid = (
| _ => false
}
})
- setAreRequiredFieldsEmpty(._ => areRequiredFieldsEmpty)
+ setAreRequiredFieldsEmpty(_ => areRequiredFieldsEmpty)
None
}, (
fieldsArr,
@@ -292,18 +292,18 @@ let useSetInitialRequiredFields = (
}
let setFields = (
- setMethod: (. RecoilAtomTypes.field => RecoilAtomTypes.field) => unit,
+ setMethod: (RecoilAtomTypes.field => RecoilAtomTypes.field) => unit,
field: RecoilAtomTypes.field,
item: PaymentMethodsRecord.required_fields,
isNameField,
) => {
if isNameField && field.value === "" {
- setMethod(.prev => {
+ setMethod(prev => {
...prev,
value: getNameValue(item),
})
} else if field.value === "" {
- setMethod(.prev => {
+ setMethod(prev => {
...prev,
value: item.value,
})
@@ -340,7 +340,7 @@ let useSetInitialRequiredFields = (
->Array.filter(item => item.isoAlpha2 === value)
->Array.get(0)
->Option.getOr(Country.defaultTimeZone)
- setCountry(. _ => countryCode.countryName)
+ setCountry(_ => countryCode.countryName)
}
}
| AddressState => setFields(setState, state, requiredField, false)
@@ -357,15 +357,15 @@ let useSetInitialRequiredFields = (
->Array.filter(item => item.isoAlpha2 === value)
->Array.get(0)
->Option.getOr(Country.defaultTimeZone)
- setCountry(. _ => defaultCountry.countryName)
+ setCountry(_ => defaultCountry.countryName)
}
| Currency(_) =>
if value !== "" && currency === "" {
- setCurrency(. _ => value)
+ setCurrency(_ => value)
}
| Bank =>
if value !== "" && selectedBank === "" {
- setSelectedBank(. _ => value)
+ setSelectedBank(_ => value)
}
| SpecialField(_)
| InfoElement
@@ -667,31 +667,31 @@ let useSubmitCallback = () => {
let confirm = json->Utils.getDictFromJson->ConfirmType.itemToObjMapper
if confirm.doSubmit {
if line1.value == "" {
- setLine1(.prev => {
+ setLine1(prev => {
...prev,
errorString: localeString.line1EmptyText,
})
}
if line2.value == "" {
- setLine2(.prev => {
+ setLine2(prev => {
...prev,
errorString: billingAddress.isUseBillingAddress ? "" : localeString.line2EmptyText,
})
}
if state.value == "" {
- setState(.prev => {
+ setState(prev => {
...prev,
errorString: localeString.stateEmptyText,
})
}
if postalCode.value == "" {
- setPostalCode(.prev => {
+ setPostalCode(prev => {
...prev,
errorString: localeString.postalCodeEmptyText,
})
}
if city.value == "" {
- setCity(.prev => {
+ setCity(prev => {
...prev,
errorString: localeString.cityEmptyText,
})
diff --git a/src/Utilities/LazyUtils.res b/src/Utilities/LazyUtils.res
index c9eb8f4ea..402767640 100644
--- a/src/Utilities/LazyUtils.res
+++ b/src/Utilities/LazyUtils.res
@@ -5,7 +5,7 @@ type lazyScreenLoader = unit => Promise.t
@val
external import_: string => Promise.t = "import"
-type reactLazy<'component> = (. lazyScreenLoader) => 'component
+type reactLazy<'component> = lazyScreenLoader => 'component
@module("react") @val
external reactLazy: reactLazy<'a> = "lazy"
diff --git a/src/Utilities/PaymentHelpers.res b/src/Utilities/PaymentHelpers.res
index a003e79b5..aafdd3374 100644
--- a/src/Utilities/PaymentHelpers.res
+++ b/src/Utilities/PaymentHelpers.res
@@ -2,7 +2,7 @@ open Utils
@val @scope(("window", "parent", "location")) external href: string = "href"
-type searchParams = {set: (. string, string) => unit}
+type searchParams = {set: (string, string) => unit}
type url = {searchParams: searchParams, href: string}
@new external urlSearch: string => url = "URL"
@@ -135,7 +135,7 @@ let rec intentCall = (
)
let handleOpenUrl = url => {
if isPaymentSession {
- Window.Location.replace(. url)
+ Window.Location.replace(url)
} else {
openUrl(url)
}
@@ -150,8 +150,8 @@ let rec intentCall = (
->then(res => {
let statusCode = res->Fetch.Response.status->Int.toString
let url = urlSearch(confirmParam.return_url)
- url.searchParams.set(. "payment_intent_client_secret", clientSecret)
- url.searchParams.set(. "status", "failed")
+ url.searchParams.set("payment_intent_client_secret", clientSecret)
+ url.searchParams.set("status", "failed")
if statusCode->String.charAt(0) !== "2" {
res
@@ -204,7 +204,7 @@ let rec intentCall = (
~errorType=errorObj.error.type_,
~message=errorObj.error.message,
)
- resolve(. failedSubmitResponse)
+ resolve(failedSubmitResponse)
}
},
)->then(resolve)
@@ -236,7 +236,7 @@ let rec intentCall = (
~errorType="server_error",
~message="Something went wrong",
)
- resolve(. failedSubmitResponse)
+ resolve(failedSubmitResponse)
}
} else {
let paymentIntentID =
@@ -266,7 +266,7 @@ let rec intentCall = (
)
->then(
res => {
- resolve(. res)
+ resolve(res)
Promise.resolve()
},
)
@@ -289,8 +289,8 @@ let rec intentCall = (
}
let url = urlSearch(confirmParam.return_url)
- url.searchParams.set(. "payment_intent_client_secret", clientSecret)
- url.searchParams.set(. "status", intent.status)
+ url.searchParams.set("payment_intent_client_secret", clientSecret)
+ url.searchParams.set("status", intent.status)
let handleProcessingStatus = (paymentType, sdkHandleOneClickConfirmPayment) => {
switch (paymentType, sdkHandleOneClickConfirmPayment) {
@@ -303,7 +303,7 @@ let rec intentCall = (
} else if paymentSessionRedirect === "always" {
handleOpenUrl(url.href)
} else {
- resolve(. data)
+ resolve(data)
}
| _ => handleOpenUrl(url.href)
}
@@ -344,7 +344,7 @@ let rec intentCall = (
("metadata", dict->JSON.Encode.object),
])
}
- resolve(. data)
+ resolve(data)
} else if intent.nextAction.type_ === "qr_code_information" {
let qrData = intent.nextAction.image_data_url->Option.getOr("")
let expiryTime = intent.nextAction.display_to_timestamp->Option.getOr(0.0)
@@ -379,7 +379,7 @@ let rec intentCall = (
("metadata", metaData->JSON.Encode.object),
])
}
- resolve(. data)
+ resolve(data)
} else if intent.nextAction.type_ == "third_party_sdk_session_token" {
let session_token = switch intent.nextAction.session_token {
| Some(token) => token->Utils.getDictFromJson
@@ -398,7 +398,7 @@ let rec intentCall = (
if !isPaymentSession {
handlePostMessage(message)
}
- resolve(. data)
+ resolve(data)
} else {
if !isPaymentSession {
postFailedSubmitResponse(
@@ -422,7 +422,7 @@ let rec intentCall = (
~errorType="confirm_payment_failed",
~message="Payment failed. Try again!",
)
- resolve(. failedSubmitResponse)
+ resolve(failedSubmitResponse)
}
}
} else if intent.status == "processing" {
@@ -447,7 +447,7 @@ let rec intentCall = (
} else {
handleProcessingStatus(paymentType, sdkHandleOneClickConfirmPayment)
}
- resolve(. data)
+ resolve(data)
} else if intent.status != "" {
if intent.status === "succeeded" {
handleLogging(
@@ -467,7 +467,7 @@ let rec intentCall = (
)
}
if intent.status === "failed" {
- setIsManualRetryEnabled(. _ => intent.manualRetryAllowed)
+ setIsManualRetryEnabled(_ => intent.manualRetryAllowed)
}
handleProcessingStatus(paymentType, sdkHandleOneClickConfirmPayment)
} else if !isPaymentSession {
@@ -480,7 +480,7 @@ let rec intentCall = (
~errorType="confirm_payment_failed",
~message="Payment failed. Try again!",
)
- resolve(. failedSubmitResponse)
+ resolve(failedSubmitResponse)
}
},
)->then(resolve)
@@ -490,8 +490,8 @@ let rec intentCall = (
->catch(err => {
Js.Promise.make((~resolve, ~reject as _) => {
let url = urlSearch(confirmParam.return_url)
- url.searchParams.set(. "payment_intent_client_secret", clientSecret)
- url.searchParams.set(. "status", "failed")
+ url.searchParams.set("payment_intent_client_secret", clientSecret)
+ url.searchParams.set("status", "failed")
let exceptionMessage = err->Utils.formatException
logApi(
~optLogger,
@@ -515,7 +515,7 @@ let rec intentCall = (
~errorType="server_error",
~message="Something went wrong",
)
- resolve(. failedSubmitResponse)
+ resolve(failedSubmitResponse)
}
} else {
let paymentIntentID = String.split(clientSecret, "_secret_")->Array.get(0)->Option.getOr("")
@@ -542,7 +542,7 @@ let rec intentCall = (
)
->then(
res => {
- resolve(. res)
+ resolve(res)
Promise.resolve()
},
)
diff --git a/src/Utilities/RecoilAtoms.res b/src/Utilities/RecoilAtoms.res
index ddc8da911..5ed0bd199 100644
--- a/src/Utilities/RecoilAtoms.res
+++ b/src/Utilities/RecoilAtoms.res
@@ -1,21 +1,21 @@
type load = Loading | Loaded(JSON.t) | LoadError
-let keys = Recoil.atom(. "keys", CommonHooks.defaultkeys)
-let configAtom = Recoil.atom(. "defaultRecoilConfig", CardTheme.defaultRecoilConfig)
-let portalNodes = Recoil.atom(. "portalNodes", PortalState.defaultDict)
-let elementOptions = Recoil.atom(. "elementOptions", ElementType.defaultOptions)
-let optionAtom = Recoil.atom(. "options", PaymentType.defaultOptions)
-let sessions = Recoil.atom(. "sessions", PaymentType.Loading)
-let list = Recoil.atom(. "paymentMethodList", PaymentType.Loading)
-let loggerAtom = Recoil.atom(. "component", OrcaLogger.defaultLoggerConfig)
-let sessionId = Recoil.atom(. "sessionId", "")
-let isConfirmBlocked = Recoil.atom(. "isConfirmBlocked", false)
-let switchToCustomPod = Recoil.atom(. "switchToCustomPod", false)
-let selectedOptionAtom = Recoil.atom(. "selectedOption", "")
-let paymentTokenAtom = Recoil.atom(. "paymentToken", ("", ""))
-let showCardFieldsAtom = Recoil.atom(. "showCardFields", false)
-let phoneJson = Recoil.atom(. "phoneJson", Loading)
-let cardBrand = Recoil.atom(. "cardBrand", "")
+let keys = Recoil.atom("keys", CommonHooks.defaultkeys)
+let configAtom = Recoil.atom("defaultRecoilConfig", CardTheme.defaultRecoilConfig)
+let portalNodes = Recoil.atom("portalNodes", PortalState.defaultDict)
+let elementOptions = Recoil.atom("elementOptions", ElementType.defaultOptions)
+let optionAtom = Recoil.atom("options", PaymentType.defaultOptions)
+let sessions = Recoil.atom("sessions", PaymentType.Loading)
+let list = Recoil.atom("paymentMethodList", PaymentType.Loading)
+let loggerAtom = Recoil.atom("component", OrcaLogger.defaultLoggerConfig)
+let sessionId = Recoil.atom("sessionId", "")
+let isConfirmBlocked = Recoil.atom("isConfirmBlocked", false)
+let switchToCustomPod = Recoil.atom("switchToCustomPod", false)
+let selectedOptionAtom = Recoil.atom("selectedOption", "")
+let paymentTokenAtom = Recoil.atom("paymentToken", ("", ""))
+let showCardFieldsAtom = Recoil.atom("showCardFields", false)
+let phoneJson = Recoil.atom("phoneJson", Loading)
+let cardBrand = Recoil.atom("cardBrand", "")
open RecoilAtomTypes
@@ -25,9 +25,9 @@ let defaultFieldValues = {
errorString: "",
}
-let userFullName = Recoil.atom(. "userFullName", defaultFieldValues)
-let userEmailAddress = Recoil.atom(. "userEmailAddress", defaultFieldValues)
-let userPhoneNumber = Recoil.atom(.
+let userFullName = Recoil.atom("userFullName", defaultFieldValues)
+let userEmailAddress = Recoil.atom("userEmailAddress", defaultFieldValues)
+let userPhoneNumber = Recoil.atom(
"userPhoneNumber",
{
value: "+351 ",
@@ -35,24 +35,24 @@ let userPhoneNumber = Recoil.atom(.
errorString: "",
},
)
-let isGooglePayReady = Recoil.atom(. "isGooglePayReady", false)
-let isApplePayReady = Recoil.atom(. "isApplePayReady", false)
-let userCountry = Recoil.atom(. "userCountry", "")
-let userBank = Recoil.atom(. "userBank", "")
-let userAddressline1 = Recoil.atom(. "userAddressline1", defaultFieldValues)
-let userAddressline2 = Recoil.atom(. "userAddressline2", defaultFieldValues)
-let userAddressCity = Recoil.atom(. "userAddressCity", defaultFieldValues)
-let userAddressPincode = Recoil.atom(. "userAddressPincode", defaultFieldValues)
-let userAddressState = Recoil.atom(. "userAddressState", defaultFieldValues)
-let userAddressCountry = Recoil.atom(. "userAddressCountry", defaultFieldValues)
-let userBlikCode = Recoil.atom(. "userBlikCode", defaultFieldValues)
-let fieldsComplete = Recoil.atom(. "fieldsComplete", false)
-let isManualRetryEnabled = Recoil.atom(. "isManualRetryEnabled", false)
-let userCurrency = Recoil.atom(. "userCurrency", "")
-let isShowOrPayUsing = Recoil.atom(. "isShowOrPayUsing", false)
-let areRequiredFieldsValid = Recoil.atom(. "areRequiredFieldsValid", true)
-let areRequiredFieldsEmpty = Recoil.atom(. "areRequiredFieldsEmpty", false)
-let userBillingName = Recoil.atom(. "userBillingName", defaultFieldValues)
+let isGooglePayReady = Recoil.atom("isGooglePayReady", false)
+let isApplePayReady = Recoil.atom("isApplePayReady", false)
+let userCountry = Recoil.atom("userCountry", "")
+let userBank = Recoil.atom("userBank", "")
+let userAddressline1 = Recoil.atom("userAddressline1", defaultFieldValues)
+let userAddressline2 = Recoil.atom("userAddressline2", defaultFieldValues)
+let userAddressCity = Recoil.atom("userAddressCity", defaultFieldValues)
+let userAddressPincode = Recoil.atom("userAddressPincode", defaultFieldValues)
+let userAddressState = Recoil.atom("userAddressState", defaultFieldValues)
+let userAddressCountry = Recoil.atom("userAddressCountry", defaultFieldValues)
+let userBlikCode = Recoil.atom("userBlikCode", defaultFieldValues)
+let fieldsComplete = Recoil.atom("fieldsComplete", false)
+let isManualRetryEnabled = Recoil.atom("isManualRetryEnabled", false)
+let userCurrency = Recoil.atom("userCurrency", "")
+let isShowOrPayUsing = Recoil.atom("isShowOrPayUsing", false)
+let areRequiredFieldsValid = Recoil.atom("areRequiredFieldsValid", true)
+let areRequiredFieldsEmpty = Recoil.atom("areRequiredFieldsEmpty", false)
+let userBillingName = Recoil.atom("userBillingName", defaultFieldValues)
type areOneClickWalletsRendered = {
isGooglePay: bool,
@@ -66,7 +66,7 @@ let defaultAreOneClickWalletsRendered = {
isPaypal: false,
}
-let areOneClickWalletsRendered = Recoil.atom(.
+let areOneClickWalletsRendered = Recoil.atom(
"areOneClickWalletsBtnRendered",
defaultAreOneClickWalletsRendered,
)
diff --git a/src/Utilities/Utils.res b/src/Utilities/Utils.res
index 4e834855c..9834865f1 100644
--- a/src/Utilities/Utils.res
+++ b/src/Utilities/Utils.res
@@ -12,8 +12,8 @@ external dictToObj: Dict.t<'a> => {..} = "%identity"
external phoneNumberJson: JSON.t = "default"
type options = {timeZone: string}
-type dateTimeFormat = {resolvedOptions: (. unit) => options}
-@val @scope("Intl") external dateTimeFormat: (. unit) => dateTimeFormat = "DateTimeFormat"
+type dateTimeFormat = {resolvedOptions: unit => options}
+@val @scope("Intl") external dateTimeFormat: unit => dateTimeFormat = "DateTimeFormat"
@send external remove: Dom.element => unit = "remove"
@@ -395,7 +395,7 @@ let isEmailValid = email => {
let checkEmailValid = (
email: RecoilAtomTypes.field,
- fn: (. RecoilAtomTypes.field => RecoilAtomTypes.field) => unit,
+ fn: (RecoilAtomTypes.field => RecoilAtomTypes.field) => unit,
) => {
switch email.value->String.match(
%re(
@@ -403,17 +403,17 @@ let checkEmailValid = (
),
) {
| Some(_match) =>
- fn(.prev => {
+ fn(prev => {
...prev,
isValid: Some(true),
})
| None =>
email.value->String.length > 0
- ? fn(.prev => {
+ ? fn(prev => {
...prev,
isValid: Some(false),
})
- : fn(.prev => {
+ : fn(prev => {
...prev,
isValid: None,
})
@@ -566,11 +566,11 @@ let constructClass = (~classname, ~dict) => {
let generateStyleSheet = (classname, dict, id) => {
let createStyle = () => {
- let style = document["createElement"](. "style")
+ let style = document["createElement"]("style")
style["type"] = "text/css"
style["id"] = id
- style["appendChild"](. document["createTextNode"](. constructClass(~classname, ~dict)))->ignore
- document["body"]["appendChild"](. style)->ignore
+ style["appendChild"](document["createTextNode"](constructClass(~classname, ~dict)))->ignore
+ document["body"]["appendChild"](style)->ignore
}
switch Window.window->Window.document->Window.getElementById(id)->Nullable.toOption {
| Some(val) => {
@@ -793,7 +793,7 @@ let rgbaTorgb = bgColor => {
let delay = timeOut => {
Promise.make((resolve, _reject) => {
setTimeout(() => {
- resolve(. Dict.make())
+ resolve(Dict.make())
}, timeOut)->ignore
})
}
diff --git a/src/Window.res b/src/Window.res
index 8568c1364..bf5a63b75 100644
--- a/src/Window.res
+++ b/src/Window.res
@@ -76,7 +76,7 @@ let iframePostMessage = (iframeRef: nullable, message) => {
@send external preventDefault: (event, unit) => unit = "preventDefault"
-type date = {now: (. unit) => string}
+type date = {now: unit => string}
@new external date: date = "Date"
@set external className: (Dom.element, string) => unit = "className"
@set external id: (Dom.element, string) => unit = "id"
@@ -127,7 +127,7 @@ let isInteg = hostname === "dev.hyperswitch.io"
let isProd = hostname === "checkout.hyperswitch.io"
module Location = {
- @val @scope(("window", "location")) external replace: (. string) => unit = "replace"
+ @val @scope(("window", "location")) external replace: string => unit = "replace"
}
module Element = {
diff --git a/src/libraries/Promise.res b/src/libraries/Promise.res
index 5bb114b7d..dc1044977 100644
--- a/src/libraries/Promise.res
+++ b/src/libraries/Promise.res
@@ -4,15 +4,15 @@ exception JsError(Exn.t)
external unsafeToJsExn: exn => Exn.t = "%identity"
@new
-external make: ((@uncurry (. 'a) => unit, (. 'e) => unit) => unit) => t<'a> = "Promise"
+external make: ((@uncurry 'a => unit, 'e => unit) => unit) => t<'a> = "Promise"
@val @scope("Promise")
external resolve: 'a => t<'a> = "resolve"
-@send external then: (t<'a>, @uncurry ('a => t<'b>)) => t<'b> = "then"
+@send external then: (t<'a>, @uncurry 'a => t<'b>) => t<'b> = "then"
@send
-external thenResolve: (t<'a>, @uncurry ('a => 'b)) => t<'b> = "then"
+external thenResolve: (t<'a>, @uncurry 'a => 'b) => t<'b> = "then"
@send external finally: (t<'a>, unit => unit) => t<'a> = "finally"
@@ -38,7 +38,7 @@ external all5: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>)) => t<('a, 'b, 'c, 'd, 'e)>
external all6: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>)) => t<('a, 'b, 'c, 'd, 'e, 'f)> = "all"
@send
-external _catch: (t<'a>, @uncurry (exn => t<'a>)) => t<'a> = "catch"
+external _catch: (t<'a>, @uncurry exn => t<'a>) => t<'a> = "catch"
let catch = (promise, callback) => {
_catch(promise, err => {
diff --git a/src/libraries/Promise.resi b/src/libraries/Promise.resi
index d3286b84b..6d0a36d25 100644
--- a/src/libraries/Promise.resi
+++ b/src/libraries/Promise.resi
@@ -2,12 +2,12 @@ type t<'a> = RescriptCore.Promise.t<'a>
type exn += JsError(RescriptCore.Exn.t)
external unsafeToJsExn: exn => RescriptCore.Exn.t = "%identity"
@new
-external make: ((@uncurry (. 'a) => unit, (. 'e) => unit) => unit) => t<'a> = "Promise"
+external make: ((@uncurry 'a => unit, 'e => unit) => unit) => t<'a> = "Promise"
@val @scope("Promise")
external resolve: 'a => t<'a> = "resolve"
-@send external then: (t<'a>, @uncurry ('a => t<'b>)) => t<'b> = "then"
+@send external then: (t<'a>, @uncurry 'a => t<'b>) => t<'b> = "then"
@send
-external thenResolve: (t<'a>, @uncurry ('a => 'b)) => t<'b> = "then"
+external thenResolve: (t<'a>, @uncurry 'a => 'b) => t<'b> = "then"
@send external finally: (t<'a>, unit => unit) => t<'a> = "finally"
@scope("Promise") @val
external reject: exn => t<_> = "reject"
@@ -24,7 +24,7 @@ external all5: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>)) => t<('a, 'b, 'c, 'd, 'e)>
@scope("Promise") @val
external all6: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>)) => t<('a, 'b, 'c, 'd, 'e, 'f)> = "all"
@send
-external _catch: (t<'a>, @uncurry (exn => t<'a>)) => t<'a> = "catch"
+external _catch: (t<'a>, @uncurry exn => t<'a>) => t<'a> = "catch"
let catch: (t<'a>, exn => t<'a>) => t<'a>
@scope("Promise") @val
external race: array> => t<'a> = "race"
diff --git a/src/orca-loader/Elements.res b/src/orca-loader/Elements.res
index 9c62fa6f4..6700963e1 100644
--- a/src/orca-loader/Elements.res
+++ b/src/orca-loader/Elements.res
@@ -10,8 +10,8 @@ external objToJson: {..} => JSON.t = "%identity"
external eventToJson: Types.eventData => JSON.t = "%identity"
type trustPayFunctions = {
- finishApplePaymentV2: (. string, ApplePayTypes.paymentRequestData) => Promise.t,
- executeGooglePayment: (. string, GooglePayType.paymentDataRequest) => Promise.t,
+ finishApplePaymentV2: (string, ApplePayTypes.paymentRequestData) => Promise.t,
+ executeGooglePayment: (string, GooglePayType.paymentDataRequest) => Promise.t,
}
@new external trustPayApi: JSON.t => trustPayFunctions = "TrustPayApi"
@@ -195,7 +195,7 @@ let make = (
}
let fetchUpdates = () => {
Js.Promise.make((~resolve, ~reject as _) => {
- setTimeout(() => resolve(. Dict.make()->JSON.Encode.object), 1000)->ignore
+ setTimeout(() => resolve(Dict.make()->JSON.Encode.object), 1000)->ignore
})
}
@@ -256,7 +256,7 @@ let make = (
if dict->Dict.get("applePayMounted")->Option.isSome {
switch sessionForApplePay->Nullable.toOption {
| Some(session) =>
- if session.canMakePayments(.) {
+ if session.canMakePayments() {
let msg = [("applePayCanMakePayments", true->JSON.Encode.bool)]->Dict.fromArray
mountedIframeRef->Window.iframePostMessage(msg)
} else {
@@ -304,7 +304,7 @@ let make = (
try {
let trustpay = trustPayApi(secrets)
- trustpay.executeGooglePayment(. payment, googlePayRequest)
+ trustpay.executeGooglePayment(payment, googlePayRequest)
->then(res => {
logger.setLogInfo(
~value="TrustPay GooglePay Success Response",
@@ -479,7 +479,7 @@ let make = (
try {
let trustpay = trustPayApi(secrets)
- trustpay.finishApplePaymentV2(. payment, paymentRequest)
+ trustpay.finishApplePaymentV2(payment, paymentRequest)
->then(res => {
logger.setLogInfo(
~value="TrustPay ApplePay Success Response",
@@ -541,14 +541,14 @@ let make = (
switch applePaySessionRef.contents->Nullable.toOption {
| Some(session) =>
try {
- session.abort(.)
+ session.abort()
} catch {
| error => Console.log2("Abort fail", error)
}
| None => ()
}
- ssn.begin(.)
+ ssn.begin()
applePaySessionRef := ssn->Nullable.make
ssn.onvalidatemerchant = _event => {
@@ -559,11 +559,11 @@ let make = (
->Dict.get("session_token_data")
->Option.getOr(Dict.make()->JSON.Encode.object)
->Utils.transformKeys(Utils.CamelCase)
- ssn.completeMerchantValidation(. merchantSession)
+ ssn.completeMerchantValidation(merchantSession)
}
ssn.onpaymentauthorized = event => {
- ssn.completePayment(. {"status": ssn.\"STATUS_SUCCESS"}->objToJson)
+ ssn.completePayment({"status": ssn.\"STATUS_SUCCESS"}->objToJson)
applePaySessionRef := Nullable.null
processPayment(event.payment.token)
}
@@ -628,7 +628,7 @@ let make = (
}->toJson,
)
- gPayClient.isReadyToPay(. payRequest)
+ gPayClient.isReadyToPay(payRequest)
->then(res => {
let dict = res->getDictFromJson
let isReadyToPay = getBool(dict, "result", false)
@@ -657,7 +657,7 @@ let make = (
if gpayClicked {
setTimeout(() => {
- gPayClient.loadPaymentData(. paymentDataRequest->toJson)
+ gPayClient.loadPaymentData(paymentDataRequest->toJson)
->then(
json => {
logger.setLogInfo(
diff --git a/src/orca-loader/LoaderPaymentElement.res b/src/orca-loader/LoaderPaymentElement.res
index bb50aa838..106588f67 100644
--- a/src/orca-loader/LoaderPaymentElement.res
+++ b/src/orca-loader/LoaderPaymentElement.res
@@ -178,7 +178,7 @@ let make = (componentType, options, setIframeRef, iframeRef, mountPostMessage) =
switch eventDataObject->getOptionalJsonFromJson("openurl") {
| Some(val) => {
let url = val->getStringfromjson("")
- Window.Location.replace(. url)
+ Window.Location.replace(url)
}
| None => ()
}
diff --git a/src/orca-loader/OrcaUtils.res b/src/orca-loader/OrcaUtils.res
index ffdcfa29a..b90ae9dae 100644
--- a/src/orca-loader/OrcaUtils.res
+++ b/src/orca-loader/OrcaUtils.res
@@ -264,7 +264,7 @@ let makeIframe = (element, url) => {
iframe.name = "fullscreen"
iframe.style = "position: fixed; inset: 0; width: 100vw; height: 100vh; border: 0; z-index: 422222133323; "
iframe.onload = () => {
- resolve(. Dict.make())
+ resolve(Dict.make())
}
element->appendChild(iframe)
})
@@ -327,14 +327,14 @@ let makeOneClickHandlerPromise = sdkHandleOneClickConfirmPayment => {
open EventListenerManager
Js.Promise.make((~resolve, ~reject as _) => {
if sdkHandleOneClickConfirmPayment {
- resolve(. JSON.Encode.bool(true))
+ resolve(JSON.Encode.bool(true))
} else {
let handleMessage = (event: Types.event) => {
let json = event.data->eventToJson->getStringfromjson("")->safeParse
let dict = json->Utils.getDictFromJson
if dict->Dict.get("oneClickDoSubmit")->Option.isSome {
- resolve(. dict->Dict.get("oneClickDoSubmit")->Option.getOr(true->JSON.Encode.bool))
+ resolve(dict->Dict.get("oneClickDoSubmit")->Option.getOr(true->JSON.Encode.bool))
}
}
addSmartEventListener("message", handleMessage, "onOneClickHandlerPaymentConfirm")
diff --git a/src/orca-loader/PaymentSessionMethods.res b/src/orca-loader/PaymentSessionMethods.res
index 04df8bf0b..65bd177cf 100644
--- a/src/orca-loader/PaymentSessionMethods.res
+++ b/src/orca-loader/PaymentSessionMethods.res
@@ -121,7 +121,7 @@ let getCustomerSavedPaymentMethods = (
~paymentType,
~iframeId="",
~fetchMethod=#POST,
- ~setIsManualRetryEnabled={(. _) => ()},
+ ~setIsManualRetryEnabled={_ => ()},
~switchToCustomPod=false,
~sdkHandleOneClickConfirmPayment=false,
~counter=0,
diff --git a/src/orca-log-catcher/ErrorBoundary.res b/src/orca-log-catcher/ErrorBoundary.res
index 5c61d86f2..dba1f2e7b 100644
--- a/src/orca-log-catcher/ErrorBoundary.res
+++ b/src/orca-log-catcher/ErrorBoundary.res
@@ -149,7 +149,7 @@ module ErrorCard = {
})
switch divRef.current->Nullable.toOption {
- | Some(r) => observer.observe(. r)
+ | Some(r) => observer.observe(r)
| None => ()
}
diff --git a/src/orca-log-catcher/Sentry.res b/src/orca-log-catcher/Sentry.res
index ce1ea7499..b0f1d8bab 100644
--- a/src/orca-log-catcher/Sentry.res
+++ b/src/orca-log-catcher/Sentry.res
@@ -20,7 +20,7 @@ type sentryInitArg = {
external exnToJsExn: exn => option = "%identity"
@module("react")
-external useEffect: (. unit => option unit>) => unit = "useEffect"
+external useEffect: (unit => option unit>) => unit = "useEffect"
type sentry
@val @scope("window")
external isSentryPresent: Nullable.t = "Sentry"
@@ -33,9 +33,8 @@ type newBrowserTracingArg = {routingInstrumentation: instrumentation}
external newBrowserTracing: newBrowserTracingArg => integration = "BrowserTracing"
@module("@sentry/react")
-external reactRouterV6Instrumentation: (
- (. unit => option unit>) => unit
-) => instrumentation = "reactRouterV6Instrumentation"
+external reactRouterV6Instrumentation: ((unit => option unit>) => unit) => instrumentation =
+ "reactRouterV6Instrumentation"
@new @module("@sentry/react")
external newSentryReplay: unit => integration = "Replay"
@@ -44,7 +43,7 @@ external newSentryReplay: unit => integration = "Replay"
external initSentryJs: sentryInitArg => unit = "init"
@val @scope("Sentry")
-external capture: (. Exn.t) => unit = "captureException"
+external capture: Exn.t => unit = "captureException"
@new
external newSentryReplayJs: unit => integration = "Sentry.Replay"
@@ -120,7 +119,7 @@ let captureException = (err: exn) => {
| Some(e) =>
let z = e->toJson
z.tag = "HyperTag"
- capture(. toExn(z))
+ capture(toExn(z))
| None => ()
}
| None => ()