Int.toString}px`}
- id="samsungpay-container"
- className={`w-full flex flex-row justify-center rounded-md [&>*]:w-full [&>button]:!bg-contain`}
- />
+
+ Int.toString}px`}
+ id="samsungpay-container"
+ className={`w-full flex flex-row justify-center rounded-md [&>*]:w-full [&>button]:!bg-contain`}
+ />
+
}
diff --git a/src/Types/PaymentType.res b/src/Types/PaymentType.res
index 346efa08..ac0e8399 100644
--- a/src/Types/PaymentType.res
+++ b/src/Types/PaymentType.res
@@ -863,7 +863,7 @@ let getCardDetails = (dict, str) => {
expiryMonth: getString(json, "expiry_month", ""),
expiryYear: getString(json, "expiry_year", ""),
cardToken: getString(json, "card_token", ""),
- cardHolderName: Some(getString(json, "card_holder_name", "")),
+ cardHolderName: getOptionString(json, "card_holder_name"),
nickname: getString(json, "nick_name", ""),
}
})
diff --git a/src/Utilities/PaymentBody.res b/src/Utilities/PaymentBody.res
index 9b6a9aaa..e5c59717 100644
--- a/src/Utilities/PaymentBody.res
+++ b/src/Utilities/PaymentBody.res
@@ -35,7 +35,7 @@ let cardPaymentBody = (
~cardNumber,
~month,
~year,
- ~cardHolderName,
+ ~cardHolderName=None,
~cvcNumber,
~cardBrand,
~nickname="",
@@ -44,11 +44,14 @@ let cardPaymentBody = (
("card_number", cardNumber->CardUtils.clearSpaces->JSON.Encode.string),
("card_exp_month", month->JSON.Encode.string),
("card_exp_year", year->JSON.Encode.string),
- ("card_holder_name", cardHolderName->JSON.Encode.string),
("card_cvc", cvcNumber->JSON.Encode.string),
("card_issuer", ""->JSON.Encode.string),
]
+ cardHolderName
+ ->Option.map(name => cardBody->Array.push(("card_holder_name", name->JSON.Encode.string))->ignore)
+ ->ignore
+
if nickname != "" {
cardBody->Array.push(("nick_name", nickname->JSON.Encode.string))->ignore
}
diff --git a/webpack.common.js b/webpack.common.js
index 18a9015f..70f19b55 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -14,7 +14,7 @@ const getEnvVariable = (variable, defaultValue) =>
process.env[variable] ?? defaultValue;
const sdkEnv = getEnvVariable("sdkEnv", "local");
-const enableLogging = getEnvVariable("enableLogging", "false") === "true";
+const ENABLE_LOGGING = getEnvVariable("ENABLE_LOGGING", "false") === "true";
const envSdkUrl = getEnvVariable("ENV_SDK_URL", "");
const envBackendUrl = getEnvVariable("ENV_BACKEND_URL", "");
const envLoggingUrl = getEnvVariable("ENV_LOGGING_URL", "");
@@ -67,25 +67,28 @@ module.exports = (publicPath = "auto") => {
app: "./index.js",
HyperLoader: "./src/hyper-loader/HyperLoader.bs.js",
};
+
+ let definePluginValues = {
+ repoName: JSON.stringify(repoName),
+ repoVersion: JSON.stringify(repoVersion),
+ publicPath: JSON.stringify(repoPublicPath),
+ sdkUrl: JSON.stringify(sdkUrl),
+ backendEndPoint: JSON.stringify(backendEndPoint),
+ confirmEndPoint: JSON.stringify(confirmEndPoint),
+ logEndpoint: JSON.stringify(logEndpoint),
+ sentryDSN: JSON.stringify(process.env.SENTRY_DSN),
+ sentryScriptUrl: JSON.stringify(process.env.SENTRY_SCRIPT_URL),
+ enableLogging: ENABLE_LOGGING,
+ loggingLevel: JSON.stringify(loggingLevel),
+ maxLogsPushedPerEventName: JSON.stringify(maxLogsPushedPerEventName),
+ };
+
const plugins = [
new MiniCssExtractPlugin(),
new CopyPlugin({
patterns: [{ from: "public" }],
}),
- new webpack.DefinePlugin({
- repoName: JSON.stringify(repoName),
- repoVersion: JSON.stringify(repoVersion),
- publicPath: JSON.stringify(repoPublicPath),
- sdkUrl: JSON.stringify(sdkUrl),
- backendEndPoint: JSON.stringify(backendEndPoint),
- confirmEndPoint: JSON.stringify(confirmEndPoint),
- logEndpoint: JSON.stringify(logEndpoint),
- sentryDSN: JSON.stringify(process.env.SENTRY_DSN),
- sentryScriptUrl: JSON.stringify(process.env.SENTRY_SCRIPT_URL),
- enableLogging: enableLogging,
- loggingLevel: JSON.stringify(loggingLevel),
- maxLogsPushedPerEventName: JSON.stringify(maxLogsPushedPerEventName),
- }),
+ new webpack.DefinePlugin(definePluginValues),
new HtmlWebpackPlugin({
inject: false,
template: "./public/build.html",