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AAWH,EAAeI,UAC3BF,EAAAA,EAAAA,KAAC+B,EAAAA,EAAK,CAACC,QAAQ,8CAMnChC,EAAAA,EAAAA,KAAA,OACImH,IAAKc,EACLgF,MACoB,UAAhBjF,EACM,CAAEkF,QAAS,SACX,CAAEA,QAAS,YAInBxF,GAAkD,UAAhBM,IAChChI,EAAAA,EAAAA,KAAA,OAAKC,UAAWH,EAA+CI,UAC3DF,EAAAA,EAAAA,KAACmN,EAAAA,EAAS,CACNC,MAAOzO,EAAE,4CACT2K,QAAS5B,MAML,UAAhBM,IACIhI,EAAAA,EAAAA,KAAC6M,EAAAA,EAAY,CAACtF,OAAQA,EAAOrH,UACzBF,EAAAA,EAAAA,KAAA,OAAAE,UACIF,EAAAA,EAAAA,KAAC+B,EAAAA,EAAK,CAACC,QAAQ,2BAK/BhC,EAAAA,EAAAA,KAAA,UACIC,UAAWoN,EAAAA,EAAWC,cACtBF,MAAM,SACNjG,IAAKzD,GAGLuJ,MAAuB,WAAhBjF,EAA2B,CAAC,EAAI,CAAEkF,QAAS,SAD7C,SAAS9E,OAGhB,IA+FlBnB,EAAMsG,aAAe,CACjB9J,OAAQ,CAAC,EACT2D,eAAe,EACfC,eAAgB,KAChBmG,cAAc,EACdjG,OAAQ,KACRC,mBAAmB,EACnBC,oBAAqB,GACrBC,+BAAgC,KAChCE,eAAgB,IAGpBX,EAAMwG,YAAc,QAEpB,S","sources":["webpack://@weezevent/lyriapay/./src/lib/components/Adyen/Adyen.module.scss?a861","lib/constant/countryListAvailableForKlarna.js","webpack://@weezevent/lyriapay/./src/lib/components/Adyen/components/Modal.module.scss?4a28","lib/assets/cross.svg","lib/components/Adyen/components/Modal.js","lib/components/Adyen/Adyen.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"container\":\"Adyen_container__9EVdP\",\"message\":\"Adyen_message__rsq6x\",\"warning_auto_top_up_save_payment_method\":\"Adyen_warning_auto_top_up_save_payment_method__Ke-XD\"};","// Klarna with adyen supported countries: https://docs.adyen.com/payment-methods/klarna/#supported-countries\n\nconst countryListAvailableForKlarna = [\n { value: 'AU', currency: 'AUD' },\n { value: 'AT', currency: 'EUR' },\n { value: 'CA', currency: 'CAD' },\n { value: 'CZ', currency: 'CZK' },\n { value: 'FI', currency: 'EUR' },\n { value: 'FR', currency: 'EUR' },\n { value: 'DE', currency: 'EUR' },\n { value: 'GR', currency: 'EUR' },\n { value: 'IE', currency: 'EUR' },\n { value: 'IT', currency: 'EUR' },\n { value: 'NO', currency: 'NOK' },\n { value: 'PT', currency: 'EUR' },\n { value: 'RO', currency: 'RON' },\n { value: 'ES', currency: 'EUR' },\n { value: 'SE', currency: 'EUR' },\n { value: 'NL', currency: 'EUR' },\n { value: 'GB', currency: 'GBP' },\n { value: 'US', currency: 'USD' },\n];\n\nexport default countryListAvailableForKlarna;\n","// extracted by mini-css-extract-plugin\nexport default {\"container_modal\":\"Modal_container_modal__1hyRF\",\"modal\":\"Modal_modal__vdJOP\",\"scroll\":\"Modal_scroll__74s6w\",\"modal_open\":\"Modal_modal_open__edXAI\",\"container_row_input\":\"Modal_container_row_input__cw1tV\",\"title\":\"Modal_title__+MiIB\",\"icon\":\"Modal_icon__36eeO\",\"container_input\":\"Modal_container_input__5-8yb\",\"input\":\"Modal_input__884NT\",\"select\":\"Modal_select__hBQ2I\",\"input_error_message\":\"Modal_input_error_message__ajryx\",\"modal_subtitle\":\"Modal_modal_subtitle__60mpE\",\"container_button\":\"Modal_container_button__U8eAU\",\"button\":\"Modal_button__CMJis\",\"button_validate\":\"Modal_button_validate__m2ddp\",\"button_validate_disabled\":\"Modal_button_validate_disabled__3tTju\",\"footer\":\"Modal_footer__TgrAP\",\"footer_link\":\"Modal_footer_link__I1liB\"};","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgCross(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 15,\n height: 15,\n viewBox: \"0 0 15 15\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.311704 0.311704C0.72731 -0.103901 1.40114 -0.103901 1.81675 0.311704L7.5 5.995L13.1833 0.311704C13.5669 -0.0719318 14.1706 -0.101442 14.588 0.223173L14.6883 0.311704C15.1039 0.72731 15.1039 1.40114 14.6883 1.81675L9.005 7.5L14.6883 13.1833C15.0719 13.5669 15.1014 14.1706 14.7768 14.588L14.6883 14.6883C14.2727 15.1039 13.5989 15.1039 13.1833 14.6883L7.5 9.005L1.81675 14.6883C1.43311 15.0719 0.829449 15.1014 0.411962 14.7768L0.311704 14.6883C-0.103901 14.2727 -0.103901 13.5989 0.311704 13.1833L5.995 7.5L0.311704 1.81675C-0.0719318 1.43311 -0.101442 0.829449 0.223173 0.411962L0.311704 0.311704Z\",\n fill: \"black\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgCross);\nexport default __webpack_public_path__ + \"static/media/cross.0d7dae05af62bb8ba0881a12a0bdaa13.svg\";\nexport { ForwardRef as ReactComponent };","import countryListAvailableForKlarna from 'lib/constant/countryListAvailableForKlarna';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\nimport styles from './Modal.module.scss';\nimport crossIcon from '../../../assets/cross.svg';\nconst ModalKlarna = (\n {\n amount,\n currency,\n userForm,\n userFormError,\n setUserFormError,\n setUserForm,\n initialUserFormState,\n openModal,\n setOpenModal,\n isFormCompleted,\n setHasClickedKlarna,\n mustRecreateDropin,\n isLoading,\n },\n) => {\n const { t } = useTranslation();\n const [countriesListOptions] = React.useState(() => countryListAvailableForKlarna.filter((elem) => elem.currency === currency)\n .map((elem) => {\n return {\n value: elem.value, text: t(`country.${elem.value}`),\n };\n }));\n\n const handleChange = (phoneNumber) => {\n // Ensure the input always starts with '+'\n if (phoneNumber === '' || phoneNumber === '+') {\n setUserForm({ ...userForm, phone_number: '+' });\n } else if (phoneNumber.startsWith('+')) {\n setUserForm({ ...userForm, phone_number: phoneNumber });\n } else {\n setUserForm({ ...userForm, phone_number: '+' + phoneNumber });\n }\n };\n\n const resetModal = () => {\n setUserForm(initialUserFormState);\n setOpenModal(false);\n setUserFormError();\n mustRecreateDropin.current = true;\n };\n\n const isCountryListASingleElement = React.useMemo(() => {\n return countriesListOptions.length === 1;\n }, [countriesListOptions]);\n\n React.useEffect(() => {\n if (isCountryListASingleElement && !userForm.country) {\n setUserForm({ ...userForm, country: countriesListOptions[0].value });\n }\n }, [isCountryListASingleElement, setUserForm, userForm, countriesListOptions]);\n\n // Add a class to body to display the modal\n React.useEffect(() => {\n const root = document.body;\n if (openModal) {\n root.classList.add(styles.modal_open);\n } else {\n root.classList.remove(styles.modal_open);\n }\n\n return () => {\n // unmount\n root.classList.remove(styles.modal_open);\n };\n }, [openModal]);\n\n if (!openModal) {\n return null;\n }\n\n return (\n
\n
\n
\n\n
\n {t('pay_with_klarna')}\n cross for cancel {\n resetModal();\n }} src={crossIcon}>\n \n
\n\n
\n {t('split_payment_klarna',\n {\n amount: (amount / 300).toFixed(2),\n currency: currency,\n })\n }\n
\n
\n {userForm.country === '' ? (\n
\n
\n \n {\n setUserForm({ ...userForm, country: e.target.value });\n }}>\n \n {countriesListOptions.map(country => (\n \n ))}\n \n
\n
\n ) : (\n <>\n
\n
\n \n {\n setUserForm({ ...userForm, last_name: e.target.value });\n }}\n placeholder={t('klarna_name_placeholder')} />\n
\n
\n \n {\n setUserForm({ ...userForm, first_name: e.target.value });\n }}\n placeholder={t('klarna_firstname_placeholder')} />\n
\n
\n\n
\n
\n \n {\n handleChange(e.target.value);\n }}\n onKeyDown={(event) => {\n if (!/[\\d()]/.test(event.key) && event.key !== 'Backspace') {\n event.preventDefault();\n }\n }}\n placeholder={t('klarna_form_phone_number_placeholder')}\n />\n
\n
\n {userFormError && (

{t('klarna_form_phone_number_invalid')}

)}\n\n
\n {t('klarna_form_billing_address')}\n
\n\n
\n
\n \n {\n setUserForm({ ...userForm, street_number: e.target.value });\n }}\n placeholder={t('klarna_street_address_placeholder')} />\n
\n
\n \n {\n setUserForm({ ...userForm, street: e.target.value });\n }}\n placeholder={t('klarna_address_placeholder')} />\n
\n
\n\n
\n
\n \n {\n setUserForm({ ...userForm, zip_code: e.target.value });\n }}\n placeholder={t('klarna_zipcode_placeholder')} />\n
\n
\n \n {\n setUserForm({ ...userForm, city: e.target.value });\n }}\n placeholder={t('klarna_city_placeholder')} />\n
\n
\n\n
\n
\n \n {\n setUserForm({ ...userForm, region: e.target.value });\n }} />\n
\n
\n \n {\n setUserForm({ ...userForm, country: e.target.value });\n }}>\n \n {countriesListOptions.map(country => (\n \n ))}\n \n
\n
\n \n )}\n\n

\n \n Before the link\n \n link text\n \n \n

\n
\n\n
\n {\n if (isFormCompleted && !isLoading) {\n setHasClickedKlarna(true);\n }\n }}\n className={isFormCompleted && !isLoading ? `${styles.button_validate} ${styles.button}` : `${styles.button_validate_disabled} ${styles.button}`}\n >\n {t('klarna_form_continue_with_klarna')}\n \n {\n resetModal();\n }}\n className={styles.button}\n >\n {t('klarna_form_cancel')}\n \n
\n
\n
\n
\n );\n};\n\nModalKlarna.propTypes = {\n amount: PropTypes.number,\n currency: PropTypes.string,\n userForm: PropTypes.object,\n userFormError: PropTypes.string,\n setUserFormError: PropTypes.func,\n setUserForm: PropTypes.func,\n initialUserFormState: PropTypes.object,\n phoneCountryCode: PropTypes.string,\n setPhoneCountryCode: PropTypes.func,\n openModal: PropTypes.bool,\n setOpenModal: PropTypes.func,\n isFormCompleted: PropTypes.bool,\n setHasClickedKlarna: PropTypes.func,\n mustRecreateDropin: PropTypes.object,\n isLoading: PropTypes.bool,\n};\n\nexport default ModalKlarna;\n","import React from 'react';\n\nimport AdyenCheckout from '@adyen/adyen-web';\nimport ApplePayButton from 'lib/components/ApplePayButton';\nimport axios from 'axios';\nimport GooglePayButton from 'lib/components/GooglePayButton';\nimport InfoBlock from 'lib/components/InfoBlock';\nimport PropTypes from 'prop-types';\nimport WaitingBlock from 'lib/components/WaitingBlock';\nimport { Trans, useTranslation } from 'react-i18next';\nimport styles from './Adyen.module.scss';\nimport styles_psp from 'lib/components/PspComposer/PspComposer.module.scss';\nimport '@adyen/adyen-web/dist/adyen.css';\nimport ModalKlarna from './components/Modal';\n\nconst PAYMENT_METHODS_REQUIRING_TO_SHOW_PAY_BUTTON = [\n 'ApplePay',\n 'GooglePay',\n 'Klarna',\n 'Paypal',\n 'PayPal',\n 'paypal',\n];\n\nconst process = (\n pspId,\n adyen_data,\n processType,\n window,\n token,\n paymentRequestId,\n lyriaUrl,\n) => {\n return axios({\n method: 'post',\n url: lyriaUrl + '/adyen/process',\n headers: {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n },\n data: {\n request_token: token,\n payment_request_id: paymentRequestId,\n data: { adyen_data: adyen_data, action: processType, origin: window.location.href },\n psp: pspId,\n },\n });\n};\n\nconst processAdyen = (\n processType,\n token,\n paymentRequestId,\n config,\n lyriaUrl,\n iframe,\n popup,\n handleSuccess,\n handleError,\n setCurrentView,\n onPaymentStarted,\n setDisplayDoNotLeaveWarning,\n setTriggerBancontactAppRedirection,\n userForm,\n setUserForm,\n isFormCompleted,\n setOpenModal,\n setUserFormError,\n setHasClickedKlarna,\n setIsLoading,\n) => {\n return (state, dropin) => {\n const redirectOnCall = () => {\n popup.current = window.open('', 'PaymentPopup', 'dependent'); // TODO open a nice loading page instead of about:blank\n if (popup.current !== null) {\n setCurrentView('popup');\n }\n };\n if (\n state.data.paymentMethod?.type === 'klarna_account' && !isFormCompleted) {\n setOpenModal(true);\n return;\n }\n onPaymentStarted();\n setIsLoading(true);\n // note: if processType is \"complete\" (aka onAdditionalDetails there is not paymentMethod field in state.data)\n // note state.data.paymentMethod.type is \"scheme\" if payment by card, need to check the \"brand\" field\n // TODO set a redirect mode for a scheme paymenet method in the backend to check what's the result in /paymentConfig\n const redirectMode = 'paymentMethod' in state.data && config.redirect_modes && config.redirect_modes[state.data.paymentMethod.type];\n if (redirectMode === 'popup' && !window.IS_WEBVIEW && state.data.paymentMethod?.type !== 'klarna_account') {\n // open popup in the onclick handler\n // because it will be blocked by the browsers if we open it in the /adyen/process request callback\n redirectOnCall();\n }\n if (state.data.paymentMethod?.type === 'klarna_account') {\n state.data.klarna_form = Object.fromEntries(\n Object.entries(userForm).filter(([_key, value]) => value !== ''),\n );\n }\n process(config.id, state.data, processType, window, token, paymentRequestId, lyriaUrl)\n .then(({ data }) => {\n setHasClickedKlarna(false);\n setIsLoading(false);\n setDisplayDoNotLeaveWarning(true);\n if (popup.current) {\n popup.current.close();\n popup.current = null;\n }\n if (data.status === 'V' || data.status === 'P') {\n handleSuccess(data.data);\n } else if (data.status === 'A') {\n handleError(data.data);\n } else if (data.status === 'W' && state.data.paymentMethod?.type === 'klarna_account') {\n setOpenModal(false);\n redirectOnCall();\n }\n })\n .catch((error) => {\n // Manage error coming back from klarna form\n if (state.data.paymentMethod?.type === 'klarna_account') {\n setIsLoading(false);\n if (error.response.data.phone_number) {\n setHasClickedKlarna(false);\n setOpenModal(true);\n setUserFormError(error.response.data.phone_number[0]);\n } else {\n setHasClickedKlarna(false);\n setOpenModal(false);\n setUserFormError();\n setUserForm({\n city: '',\n country: '',\n first_name: '',\n street_number: '',\n last_name: '',\n zip_code: '',\n region: '',\n street: '',\n phone_number: '',\n });\n }\n }\n\n const action = error?.response?.data?.data?.action;\n if (action) {\n setDisplayDoNotLeaveWarning(true);\n if (action.type === 'redirect' && action.method === 'GET') {\n if (redirectMode === 'popup') {\n if (popup.current !== null && !window.IS_WEBVIEW) {\n setCurrentView('popup'); // not needed because currentView was already set before the request, but call anyway so that each branch has a \"setCurrentView\" call\n window.open(action.url, 'PaymentPopup', 'dependent');\n } else {\n // if we get here (redirectMode === 'popup' && popup.current === null)\n // it means that we can't open this payment's method in a iframe\n // *and* that we couldn't open a popup\n // so do a full page redirect instead...\n setCurrentView('adyen');\n dropin.handleAction(action);\n }\n } else if (redirectMode === 'host') {\n setCurrentView('adyen');\n dropin.handleAction(action);\n } else {\n iframe.current.setAttribute('src', action.url);\n setCurrentView('iframe');\n }\n } else if (action.type === 'redirect' && action.method === 'POST') {\n if (popup.current) {\n // we don't handle popup mode for post forms yet (ever ?)\n // but in case a payment method is misconfigured and asks us to open a popup\n // close it\n popup.current.close();\n popup.current = null;\n }\n\n const iframeContent = iframe.current.contentDocument;\n const form = iframeContent.createElement('form');\n form.setAttribute('method', action.method);\n form.setAttribute('action', action.url);\n for (let key in action.data) {\n const hiddenField = iframeContent.createElement('input');\n hiddenField.setAttribute('type', 'hidden');\n hiddenField.setAttribute('name', key);\n hiddenField.setAttribute('value', action.data[key]);\n form.appendChild(hiddenField);\n }\n iframeContent.documentElement.appendChild(form);\n form.submit();\n setCurrentView('iframe');\n } else if (\n action.paymentMethodType === 'bcmc_mobile'\n && action.type === 'qrCode'\n && action.url\n && window.matchMedia('(max-width: 768px)').matches\n && /iPhone|iPod/.test(navigator.userAgent)\n && window.location !== window.top.location // is in iframe\n ) {\n // Work around to try to redirect to the payconiq app\n // https://github.com/Adyen/adyen-web/blob/4193101ab34f3f2387ccae6c4af8396fff4a2ee8/packages/lib/src/components/internal/QRLoader/QRLoader.tsx#L59\n setTriggerBancontactAppRedirection(action.url);\n setCurrentView('adyen');\n dropin.handleAction(action);\n } else {\n setCurrentView('adyen');\n dropin.handleAction(action);\n }\n }\n });\n };\n};\n\n\n/**\n * This component is one of the multiple available payment method in this project.\n * It represents the Adyen PSP integration that can deal with multiple bank card types and payment method.\n */\nconst Adyen = React.forwardRef(\n (\n {\n config,\n token,\n paymentRequestId,\n lyriaUrl,\n hidePayButton,\n labelPayButton, // eslint-disable-line no-unused-vars\n onPaymentStarted,\n onPaymentResult,\n loader,\n savePaymentMethod,\n savedPaymentMethods, // eslint-disable-line no-unused-vars\n paymentCardInputWarningMessage,\n operation, // eslint-disable-line no-unused-vars\n paymentMethods,\n labelPayButtonApplePayAndGooglePay,\n lang,\n themeMode,\n },\n ref,\n ) => {\n /* ------------ Initialization of the imports, the variables and the states ------------ */\n const { t } = useTranslation();\n\n const [currentView, setCurrentView] = React.useState('adyen');\n const container = React.useRef();\n const [isSpinnerVisible, showSpinner] = React.useState(false);\n const [attempts, setAttempts] = React.useState(0);\n const [displayDoNotLeaveWarning, setDisplayDoNotLeaveWarning] = React.useState(false);\n const [triggerBoncontactAppRedirectionUrl, setTriggerBancontactAppRedirectionUrl] = React.useState(null);\n const initialUserFormState = {\n city: '',\n country: '',\n first_name: '',\n street_number: '',\n last_name: '',\n zip_code: '',\n region: '',\n street: '',\n phone_number: '',\n };\n const [userForm, setUserForm] = React.useState(initialUserFormState);\n const [userFormError, setUserFormError] = React.useState();\n const [openModal, setOpenModal] = React.useState(false);\n const [hasClickedKlarna, setHasClickedKlarna] = React.useState(false);\n const [phoneCountryCode, setPhoneCountryCode] = React.useState('');\n const [isLoading, setIsLoading] = React.useState(false);\n\n const mustRecreateDropin = React.useRef(true);\n const iframe = React.useRef(null);\n const popup = React.useRef();\n const dropin = React.useRef();\n const forceShowPayButton = paymentMethods\n .every((pm) => PAYMENT_METHODS_REQUIRING_TO_SHOW_PAY_BUTTON.includes(pm.payment_method));\n const isFormCompleted = React.useMemo(() => {\n let fieldsThatMustBeFilled = {};\n if (userForm.country === 'CA' || userForm.country === 'US') {\n fieldsThatMustBeFilled = userForm;\n } else {\n const { ignoredRegion, ...otherFields } = userForm;\n fieldsThatMustBeFilled = otherFields;\n }\n\n return Object.entries(fieldsThatMustBeFilled).filter((elem) => {\n if (elem[0] === 'phone_number') {\n return elem[1] === '' || elem[1] === '+';\n } else {\n return elem[1] === '';\n }\n }).length === 0;\n }, [userForm]);\n\n /* ------------ The main functions ------------ */\n\n // The function to trigger when Adyen response is successful (payment ok).\n const handleSuccess = React.useCallback(\n (response) => {\n onPaymentResult({ success: true, data: response });\n setDisplayDoNotLeaveWarning(false);\n showSpinner(false);\n },\n [onPaymentResult],\n );\n\n // The function to trigger when Adyen response is not successful (payment ko).\n const handleError = React.useCallback(\n (response) => {\n if (response) {\n mustRecreateDropin.current = true;\n setAttempts((attempts) => attempts + 1);\n setCurrentView('adyen');\n onPaymentResult({ success: false, data: response });\n setDisplayDoNotLeaveWarning(false);\n showSpinner(false);\n }\n\n },\n [onPaymentResult],\n );\n\n // The message handler (to manage iframes)\n const postMessageHandler = React.useCallback(\n (message) => {\n if (message.origin === lyriaUrl) {\n if (message.data.status === 'success') {\n handleSuccess();\n } else if (message.data.status === 'error') {\n handleError(message.data.data);\n }\n }\n },\n [handleError, handleSuccess, lyriaUrl],\n );\n\n const redirectToUrl = React.useCallback(\n (url) => () => {\n window.open(url, '_blank');\n },\n [],\n );\n\n /* ------------ The side effects and imperative handlers ------------ */\n\n // The side effect to add a listener of message posted by Adyen.\n React.useEffect(\n () => {\n window.addEventListener('message', postMessageHandler);\n return () => window.removeEventListener('message', postMessageHandler);\n },\n [postMessageHandler],\n );\n\n React.useEffect(() => {\n if (hasClickedKlarna) {\n mustRecreateDropin.current = true;\n }\n }, [hasClickedKlarna, userFormError]);\n\n // Work around to try to redirect to the payconiq app when in an iframe (safari policy that blocks redirection)\n React.useEffect(\n () => {\n if (!triggerBoncontactAppRedirectionUrl) {\n return;\n }\n const intervalFunction = setInterval(\n () => {\n const bancontactButtonsAppLinkList = document.getElementsByClassName('adyen-checkout__button--qr-loader');\n if (bancontactButtonsAppLinkList.length) {\n const eventListener = redirectToUrl(triggerBoncontactAppRedirectionUrl);\n bancontactButtonsAppLinkList[0].addEventListener('click', eventListener);\n setTriggerBancontactAppRedirectionUrl(null);\n }\n },\n 1500,\n );\n return () => clearInterval(intervalFunction);\n },\n [triggerBoncontactAppRedirectionUrl, redirectToUrl],\n );\n // Set up the Adyen drop-in.\n React.useEffect(\n () => {\n if (config.type === 'apple_pay' && config?.useNewAppleButton) {\n return;\n }\n if (config.type === 'google_pay' && config?.useNewGoogleButton) {\n return;\n }\n const element = container.current;\n if (mustRecreateDropin.current) {\n mustRecreateDropin.current = false;\n\n // Apple Pay Merchant Validation (own cert by Lyria)\n if (config.dropin_config?.paymentMethodsConfiguration?.applepay) {\n config.dropin_config.paymentMethodsConfiguration.applepay.onValidateMerchant = (resolve, reject, validationURL) => {\n let postData = {\n url: validationURL,\n domain: window.location.host,\n merchant_id: config.apple_pay_merchant,\n };\n if (config.dropin_config.paymentMethodsConfiguration.applepay.configuration?.merchantIdentifier) {\n postData['apple_merchant_id'] = config.dropin_config.paymentMethodsConfiguration.applepay.configuration.merchantIdentifier;\n }\n if (config.dropin_config.paymentMethodsConfiguration.applepay.configuration?.merchantName) {\n postData['apple_merchant_name'] = config.dropin_config.paymentMethodsConfiguration.applepay.configuration.merchantName;\n }\n\n axios({\n url: `${lyriaUrl}/payments/applepay/validatemerchant`,\n method: 'post',\n data: postData,\n })\n .then((res) => resolve(res?.data))\n .catch((_error) => reject());\n };\n }\n // Important note: this part is only computed after the first render or when we increment the attempts count (ie after a payment error)\n // so if any component prop changes (interior mutability excluded) it will NOT be reflected in the dropin config until a payment error occurs\n // (simplest case: `hidePayButton` changes, more complex case: `onPaymentResult` changes so we call an old callback)\n const checkout = new AdyenCheckout({\n ...config.dropin_config,\n showPayButton: !hidePayButton || forceShowPayButton,\n showStoredPaymentMethods: savePaymentMethod,\n onSubmit: processAdyen('create', token, paymentRequestId, config, lyriaUrl, iframe, popup, handleSuccess, handleError, setCurrentView, onPaymentStarted, setDisplayDoNotLeaveWarning, setTriggerBancontactAppRedirectionUrl, userForm, setUserForm, isFormCompleted, setOpenModal, setUserFormError, setHasClickedKlarna, setIsLoading),\n onAdditionalDetails: processAdyen('complete', token, paymentRequestId, config, lyriaUrl, iframe, popup, handleSuccess, handleError, setCurrentView, onPaymentStarted, setDisplayDoNotLeaveWarning, setTriggerBancontactAppRedirectionUrl, userForm, setUserForm, isFormCompleted, setOpenModal, setUserFormError, setHasClickedKlarna, setIsLoading),\n onError(_error) {\n // client-side form validation error\n // warn the host so that it re-enables the host pay button (if there is an host pay button)\n // note: this is triggered *a lot* but if the host follows the integration doc correctly\n // ie by not doing anything if !res.success except re-enabling the host pay button\n // everything should be alright\n onPaymentResult({ success: false });\n },\n });\n const newDropin = checkout.create('dropin', {\n ...config.dropin_options, // note: dropin_options is not return by the lyria yet\n });\n dropin.current = newDropin;\n newDropin.mount(element);\n if (hasClickedKlarna) {\n dropin.current.submit();\n }\n }\n\n return () => {\n if (mustRecreateDropin.current) {\n dropin.current.unmount(element);\n }\n };\n },\n [\n attempts,\n config,\n forceShowPayButton,\n hidePayButton,\n token,\n paymentRequestId,\n lyriaUrl,\n handleSuccess,\n handleError,\n onPaymentResult,\n onPaymentStarted,\n savePaymentMethod,\n userForm,\n userFormError,\n isFormCompleted,\n hasClickedKlarna,\n ],\n );\n\n // The handler to be able to external component to trigger 'pay' button actions.\n React.useImperativeHandle(\n ref,\n () => ({\n pay() {\n if (dropin.current && !forceShowPayButton) {\n dropin.current.submit();\n // dropin.submit is asynchronous so we don't know yet if the form is filled in correctly\n // so we return true as if it was filled in correctly\n // `AdyenCheckout` will call the `onError` callback if the form is _not_ filled in correctly\n // and in onError we'll warn the host\n return true;\n }\n },\n }),\n [forceShowPayButton],\n );\n if (config.type === 'apple_pay' && config?.useNewAppleButton) {\n let appleMerchantId = null;\n if (config.dropin_config.paymentMethodsConfiguration.applepay.configuration?.merchantIdentifier) {\n appleMerchantId = config.dropin_config.paymentMethodsConfiguration.applepay.configuration.merchantIdentifier;\n }\n let appleMerchantName = null;\n if (config.dropin_config.paymentMethodsConfiguration.applepay.configuration?.merchantName) {\n appleMerchantName = config.dropin_config.paymentMethodsConfiguration.applepay.configuration.merchantName;\n }\n\n\n return ( {\n onPaymentStarted();\n return process(config.id, adyen_data, 'create', window, token, lyriaUrl).then(({ data }) => {\n if (popup.current) {\n popup.current.close();\n popup.current = null;\n }\n\n if (data.status === 'V') {\n handleSuccess(data.data);\n } else if (data.status === 'A') {\n handleError(data.data);\n }\n // it’s important to fit «data» into a dict with «data» key because\n // Our ApplePay button expects this\n return { data: data };\n });\n }}\n labelPayButton={labelPayButtonApplePayAndGooglePay}\n lyriaUrl={lyriaUrl}\n lang={lang}\n themeMode={themeMode}\n isDisabled={false}\n appleMerchantId={appleMerchantId}\n appleMerchantName={appleMerchantName}\n />);\n } else if (config.type === 'google_pay' && config?.useNewGoogleButton) {\n // the GooglePay payment method selector is closed as soon as the user clicks \"Pay\"\n // so we have to show a spinner ourselves while waiting for backend validation\n if (isSpinnerVisible) {\n return (\n \n
\n {t('waitingPaymentResult')}\n
\n {displayDoNotLeaveWarning && (\n
\n {t('waitingPaymentResultDoNotLeavePage')}\n
\n )}\n
\n );\n } else {\n return (\n {\n onPaymentStarted();\n showSpinner(true);\n process(\n config.id,\n adyen_data,\n 'create',\n window,\n token,\n lyriaUrl,\n ).then(\n ({ data }) => {\n if (popup.current) {\n popup.current.close();\n popup.current = null;\n }\n\n if (data.status === 'V') {\n handleSuccess(data.data);\n } else if (data.status === 'A') {\n handleError(data.data);\n }\n },\n );\n }}\n labelPayButton={labelPayButtonApplePayAndGooglePay}\n lang={lang}\n themeMode={themeMode}\n isDisabled={false}\n />\n );\n }\n }\n\n /* ------------ The JSX to return according to the logic above ------------ */\n return (\n
\n \n {\n displayDoNotLeaveWarning && (\n
\n \n
\n \n
\n
\n
\n )\n }\n \n {\n !!paymentCardInputWarningMessage && currentView === 'adyen' && (\n
\n \n
\n )\n }\n {\n currentView === 'popup' && (\n \n
\n \n
\n
\n )\n }\n \n
\n );\n },\n);\n\nAdyen.propTypes = {\n /**\n * The specific configuration related to this payment method (IBAN).\n */\n config: PropTypes.object,\n /**\n * The token to use in order to be able to call the backend when we submit the form data.\n */\n token: PropTypes.string,\n /**\n * The paymentRequestID to use in order to be able to call the backend when we submit the data in the paymentPage.\n */\n paymentRequestId: PropTypes.string,\n /**\n * The backend url to use to pass the form data.\n */\n lyriaUrl: PropTypes.string.isRequired,\n /**\n * Whether the submit button must be displayed or not.\n */\n hidePayButton: PropTypes.bool,\n /**\n * The label of the 'pay' button to display. hidePayButton props must be false of course.\n */\n labelPayButton: PropTypes.string,\n /**\n * The label of the 'pay' button to display for GogglePay and ApplePay.\n */\n labelPayButtonApplePayAndGooglePay: PropTypes.oneOf([\n 'buy',\n 'book',\n 'donate',\n 'order',\n 'pay',\n 'logoOnly',\n ]),\n /**\n * Whether the expiry date of the credit card must be set in a text input instead of a dropdown.\n */\n expiryAsText: PropTypes.bool,\n /**\n * The callback function to trigger when the payment process is starting (to manage Payline exchanges).\n */\n onPaymentStarted: PropTypes.func.isRequired,\n /**\n * The callback function to trigger when the backend return the result of the form data submit.\n */\n onPaymentResult: PropTypes.func.isRequired,\n /**\n * The loader component to use when the payment or drop-in is loading.\n */\n loader: PropTypes.node,\n /**\n * Whether we want to show the checkbox to save the payment method.\n */\n savePaymentMethod: PropTypes.bool,\n /**\n * The list of saved payment methods available.\n * The goal is to be able to select one of them and avoid typing it again).\n */\n savedPaymentMethods: PropTypes.array,\n /**\n * A warning message to display for payment at the card input step (mainly to advise the user to save its payment method).\n */\n paymentCardInputWarningMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n /**\n * The operation type to process.\n */\n operation: PropTypes.oneOf(['credit', 'payment', 'refund']),\n /**\n * The list of payment methods that belongs to the given payment method. That's a kind of sub payment method.\n * For example, for 'credit card' payment method we could have Visa, Mastercard and so on.\n */\n paymentMethods: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.isRequired,\n payment_method: PropTypes.string.isRequired,\n is_card: PropTypes.bool,\n }),\n ),\n /**\n * The language of the user in order to display the appropriate translated drop-in (for Apple pay).\n */\n lang: PropTypes.string,\n /**\n * The theme to use (dark or light).\n */\n themeMode: PropTypes.string,\n};\n\nAdyen.defaultProps = {\n config: {},\n hidePayButton: false,\n labelPayButton: null, // Fallback on 'pay' or 'ask refund' label.\n expiryAsText: true,\n loader: null,\n savePaymentMethod: false,\n savedPaymentMethods: [],\n paymentCardInputWarningMessage: null,\n paymentMethods: [],\n};\n\nAdyen.displayName = 'Adyen';\n\nexport default Adyen;\n"],"names":["value","currency","_ref","amount","userForm","userFormError","setUserFormError","setUserForm","initialUserFormState","openModal","setOpenModal","isFormCompleted","setHasClickedKlarna","mustRecreateDropin","isLoading","t","useTranslation","countriesListOptions","React","countryListAvailableForKlarna","filter","elem","map","text","resetModal","current","isCountryListASingleElement","length","country","root","document","body","classList","add","styles","remove","_jsx","className","children","_jsxs","alt","onClick","src","crossIcon","toFixed","defaultValue","onChange","e","target","_Fragment","last_name","placeholder","first_name","phone_number","phoneNumber","startsWith","onKeyDown","event","test","key","preventDefault","street_number","street","zip_code","city","region","disabled","Trans","i18nKey","rel","href","PAYMENT_METHODS_REQUIRING_TO_SHOW_PAY_BUTTON","process","pspId","adyen_data","processType","window","token","paymentRequestId","lyriaUrl","axios","method","url","headers","Accept","data","request_token","payment_request_id","action","origin","location","psp","processAdyen","config","iframe","popup","handleSuccess","handleError","setCurrentView","onPaymentStarted","setDisplayDoNotLeaveWarning","setTriggerBancontactAppRedirection","setIsLoading","state","dropin","_state$data$paymentMe","_state$data$paymentMe2","_state$data$paymentMe3","redirectOnCall","open","paymentMethod","type","redirectMode","redirect_modes","IS_WEBVIEW","klarna_form","Object","fromEntries","entries","_key","id","then","_ref2","_state$data$paymentMe4","close","status","catch","error","_state$data$paymentMe5","_error$response","_error$response$data","_error$response$data$","response","handleAction","setAttribute","iframeContent","contentDocument","form","createElement","hiddenField","appendChild","documentElement","submit","paymentMethodType","matchMedia","matches","navigator","userAgent","top","Adyen","_ref3","ref","hidePayButton","labelPayButton","onPaymentResult","loader","savePaymentMethod","savedPaymentMethods","paymentCardInputWarningMessage","operation","paymentMethods","labelPayButtonApplePayAndGooglePay","lang","themeMode","currentView","container","isSpinnerVisible","showSpinner","attempts","setAttempts","displayDoNotLeaveWarning","triggerBoncontactAppRedirectionUrl","setTriggerBancontactAppRedirectionUrl","hasClickedKlarna","phoneCountryCode","setPhoneCountryCode","forceShowPayButton","every","pm","includes","payment_method","fieldsThatMustBeFilled","ignoredRegion","otherFields","success","postMessageHandler","message","redirectToUrl","addEventListener","removeEventListener","intervalFunction","setInterval","bancontactButtonsAppLinkList","getElementsByClassName","eventListener","clearInterval","useNewAppleButton","useNewGoogleButton","element","_config$dropin_config","_config$dropin_config2","dropin_config","paymentMethodsConfiguration","applepay","onValidateMerchant","resolve","reject","validationURL","_config$dropin_config3","_config$dropin_config4","postData","domain","host","merchant_id","apple_pay_merchant","configuration","merchantIdentifier","merchantName","res","_error","newDropin","AdyenCheckout","showPayButton","showStoredPaymentMethods","onSubmit","onAdditionalDetails","onError","create","dropin_options","mount","unmount","pay","_config$dropin_config5","_config$dropin_config6","appleMerchantId","appleMerchantName","ApplePayButton","merchantId","onLoadPaymentData","_ref4","isDisabled","WaitingBlock","GooglePayButton","_ref5","ModalKlarna","style","display","InfoBlock","title","styles_psp","common_iframe","defaultProps","expiryAsText","displayName"],"sourceRoot":""}