Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
};
logger.info(req, `button_render_version_${ render.version }`);
logger.info(req, `button_client_version_${ client.version }`);
const content = smartContent[locale.country][locale.lang] || {};
const blackButtonText = content.payWithDebitOrCreditCard;
// logs for the missing content for the black button
if (!blackButtonText) {
logger.info(req, `missing_content`, { info: JSON.stringify({ params, locale }) });
}
const buttonHTML = render.button.Buttons({
...params, nonce: cspNonce, csp: { nonce: cspNonce }, fundingEligibility, personalization, content
}).render(html());
const setupParams = {
fundingEligibility, buyerCountry, cspNonce, merchantID, personalization, sdkMeta,
isCardFieldsExperimentEnabled, firebaseConfig, facilitatorAccessToken, eligibility, content
};
const pageHTML = `
<style nonce="${ cspNonce }">${ buttonStyle }</style>
<div class="buttons-container" id="buttons-container">${ buttonHTML }</div>
<div class="card-fields-container" id="card-fields-container"></div>
${ meta.getSDKLoader({ nonce: cspNonce }) }
const getSDKLoader = ({ baseURL = DEFAULT_LEGACY_SDK_BASE_URL, nonce = '' } = {}) => {
if (url) {
const attrs = getSDKScriptAttributes(url, stageHost, apiStageHost);
return (