{"version":3,"sources":["styles.module.scss","components/Common/LanguageSelector/styles.module.scss","components/Common/OrderAmountInput/styles.module.scss","store/reducers/sagaSlice.ts","components/Common/PaymentMethodOption/styles.module.scss","components/Common/Tooltip/TooltipInfo/styles.module.scss","components/Common/Tooltip/styles.module.scss","components/Common/PlanInfo/styles.module.scss","store/reducers/linkDataSlice.ts","store/reducers/index.ts","store/epics/index.ts","components/Common/CustomError/styles.module.scss","components/Common/PlanInfo/SchedulePlanTooltip/styles.module.scss","components/Common/OrderDetails/styles.module.scss","store/index.ts","constants/locales.ts","components/Common/ModalPopup/styles.module.scss","model/PaymentMethodType.ts","i18n.tsx","assets/i18n/en.tsx","assets/i18n/it.tsx","utils/queryStringUtils.ts","functions/curriedCompare.ts","functions/orderTypeCheckingFunctions.ts","functions/orderContentCheckingFunctions.ts","functions/has.ts","functions/elementCount.ts","functions/sourceTypeCheckingFunctions.ts","core/index.ts","model/LinkStep.tsx","model/IError.ts","service/errorHandlerService.ts","service/dao/base.ts","service/dao/authentication.ts","service/dao/customer.ts","service/dao/link2Pay.ts","service/dao/link2Save.ts","service/dao/payMe.ts","service/dao/hash.ts","service/dao/paypal.ts","service/linkHelperService.ts","service/link2SaveService.ts","ioc/provider.tsx","ioc/index.tsx","model/LinkName.tsx","assets/images/icon-option-card.svg","components/Common/Translate/index.tsx","store/selectors/sagaSelectors.ts","store/selectors/linkDataSelectors.ts","components/Common/Redirect/index.tsx","components/Common/CurrencySymbol/index.tsx","components/Common/CurrencyConverter/index.tsx","components/Common/CustomError/index.tsx","components/Common/OrderAmountInput/index.tsx","components/Common/ChargePaymentRefInput/index.tsx","components/Common/OrderDetails/index.tsx","components/Common/ExpirationInfo/index.tsx","components/Common/TspayInformationalPdf/index.tsx","components/Common/CancelButton/index.tsx","components/Common/PaymentMethodOption/index.tsx","assets/images/icon-option-sepa.svg","assets/images/icon-option-pis.svg","hooks/useToggle.tsx","components/Common/ModalPopup/index.tsx","components/Common/ModalPopup/Divider.tsx","components/Common/ModalPopup/HeaderContainer.tsx","components/Common/ModalPopup/CloseButton.tsx","components/Common/ModalPopup/BodyWrapper.tsx","components/Common/ModalPopup/Footer.tsx","components/Common/ModalPopup/PopupContainer.tsx","model/IOrder.ts","components/Common/PisModal/index.tsx","components/Common/PaymentMethodOptionList/index.tsx","components/Common/ContactEmailInput/index.tsx","components/Common/OrderEmailNoteBox/index.tsx","components/Link2Pay/PaymentDetails/index.tsx","components/Link2Pay/StepManager/index.tsx","components/Link2Pay/LinkHost/index.tsx","components/Link2Pay/index.tsx","components/Common/Error/index.tsx","components/Common/Error/BrowserNotCompatible.tsx","components/Common/ApiKeyActivated/index.tsx","utils/storageUtils.ts","components/Common/LanguageSelector/index.tsx","components/Common/Error/InvalidUrl.tsx","components/Common/Tooltip/index.tsx","components/Common/Tooltip/TooltipInfo/index.tsx","components/Common/PlanInfo/SchedulePlanTooltip/index.tsx","components/Common/DatelInput/index.tsx","components/Common/PlanInfo/index.tsx","components/Link2Save/PaymentDetails/index.tsx","components/Link2Save/StepManager/index.tsx","components/Link2Save/index.tsx","components/PayMe/PaymentDetails/index.tsx","components/PayMe/StepManager/index.tsx","components/PayMe/LinkHost/index.tsx","components/PayMe/index.tsx","components/Common/TspayDetailIcon/index.tsx","components/Common/DevHinBox/index.tsx","App.tsx","serviceWorker.ts","index.tsx","components/Common/PaymentMethodOptionList/styles.module.scss","components/Common/PisModal/styles.module.scss"],"names":["module","exports","FlowType","initialState","activeStep","activeLinkName","language","DEFAULT_LANG_LOCALE","flow","PM_PROVIDED_BY_USER_AND_NOT_SAVED","error","sagaSlice","createSlice","slice","reducers","changeActiveStep","reducer","state","action","payload","prepare","changeActiveLinkName","changeLanguage","changeFlow","changeError","actions","order","credential","contactEmail","customerName","customerAddress","customerId","undefined","savePaymentMethod","paymentMethodType","PaymentMethodType","CARD","paymentMethod","customerPaymentMethods","redirectData","validUntil","payMeOrderAmount","chargePaymentRef","transactionCode","linkDataSlice","changeOrder","changeCredential","changeContactEmail","changeCustomerName","changeCustomerAddress","changeCustomerId","changePayMeOrderAmount","orderAmount","changeChargePaymentRef","changeSavePaymentMethod","changePaymentMethodType","changePaymentMethod","changeCustomerPaymentMethods","changeRedirectData","changeValidUntil","changeTransactionCode","cleanState","setupIntent","rootReducer","combineReducers","saga","linkData","rootEpic","combineEpics","defaultMiddleware","getDefaultMiddleware","epicMiddleware","createEpicMiddleware","push","store","configureStore","middleware","run","LanguageLocale","LanguageLocaleType","DEFAULT_LOCALE","IT","resources","EN","translation","browserNotSupported","invalidUrl","button","next","back","confirm","addCard","proceed","remove","cancel","refresh","plan","frequency","planSchedule","planRecurrent","planOneTime","every","till","for","date","startDate","period","day","day_plurarl","month","month_plural","year","year_plural","orderDetails","amount","imageUrl","title","desc","paymentRef","validityEndDate","contextId","maxAmount","minAmount","companyNamePrefix","charge","charge_plural","step","paymentDetails","subtitle","card","number","expiration","cvv","selectPaymentMethod","registerCard","enterDate","paymentConfirmation","sepa_debit","customerIdentification","info","enterEmail","enterYourEmail","enterEmailOrMobileNumber","email","mobileNumber","wrongCredentials","privacyAndTosDisclaimer","customerVerification","line1","line2","line2email","line2mobile","otpCode","noOtpCodeReceivedInfo","enterOtpCode","otpSent","paymentMethodSave","paymentMethodList","account","expiry","modal","onItem","paymentMethodAdd","cardNumber","thankYou","subtitleLink2save","orderDetailsLabel","paymentMethodDetailsLabel","contact","label","link","infoMessage","print","newPayment","tspayDetail","urlInfo","netAmountChargePdf","url","name","cardDesc","pisDesc","sepaDebit","sepaDebitTitle","sepaDebitDesc","saveCard","saveSepaDebit","cardExpiry","cardCvc","selectPayMethod","Link2Save","declaimer","declaimerBottom","Link2Pay","chargePaymentRefInput","placeholder","customerNameInput","customerAddressInput","tabs","accordion","removeModal","header","loading","pisModal","condition","listOne","listTwo","listThree","tec","tooltip","content","dateInput","paymentSchedulePlan","unknown","noOrderKey","noCallbackUrl","invalidOtpCode","invalidSepaDebit","invalidCard","invalidBrand","invalidFundingType","invalidMobileNo","orderExpired","day_plural","i18n","use","initReactI18next","init","lng","keySeparator","interpolation","escapeValue","addQueryParams","baseUrl","tspaySetting","value","search","window","location","params","URLSearchParams","set","JSON","stringify","btoa","replace","curriedCompare","staticComparator","comparator","map","isPayme","isLink2Save","key","param","obj","hasPlan","hasConfirmationPageNote","hasContactRequest","lenghtToFind","x","length","arrayHasExactlyOneElement","PIS_CHARGE","defaultConfig","decimal","decimalSign","showCurrency","englishConfig","getGenericLocale","langLocale","cleanLocale","split","toLowerCase","getTranslatedError","languageLocale","errorKey","availableErrors","errorMapping","matchError","console","log","locale","templateMessage","message","en","description","renderedMessage","mustacheRender","raw","getPriceConverterConfigFromLanguage","selectedLang","inputConfig","deepCopyConfig","parse","config","navigateToAcquirerDedicateWebApp","payMethodType","requiredAcquirer","acquirerRedirect","payMethod","stpAcquirerConfig","acquire","stp","ppAcquirerConfig","pp","ckoAcquirerConfig","cko","cbiAcquirerConfig","cbi","includes","APP_CONFIG","$APP_CONFIG","stpWebappUrl","ppWebappUrl","ckoWebappUrl","cbiWebappUrl","Error","getRedirectFromAcquirerAvailableForPayMethod","formatterPathName","pathname","type","orderKey","hrefUrl","linkSlice","getState","lang","e","vu","poa","cpr","href","LinkStep","ErrorType","redirectToPayMethodWebappIfRequired","sourceTypes","shouldSkipHome","ErrorHandlerService","injectable","intentId","expectKey","dispatch","stripeId","this","changeAndTranslateError","canceled","stripeError","code","toUpperCase","errorFound","declineErrorTranslatedFromStripe","declineErrorTranslatedGeneric","decline_code","getTranslatedDecline","getActiveLocale","Stripe","Internal","errorDetails","declineCode","currentState","matchingDecline","stripeDeclineCode","find","d","nextStep","response","data","errorMessagePayload","translatedError","RestApi","customErrorTitle","AbstractRestGetService","inject","rootUrl","dataUrl","stripe","apiVersion","resp","axios","post","getUrl","createResponse","put","get","delete","startsWith","p","then","from","pipe","first","catchError","httpError","Promise","resolve","errorHandler","handleRestApiError","of","filter","AuthenticationDaoService","CustomerDaoService","Link2PayDaoService","chargeKey","Link2SaveDaoService","PayMeDaoService","HashDaoService","PaypalService","mobile","errorHandlerService","handleInternalError","id","createExpectPayload","paymentMethodId","paymentPlan","recurrent","schedules","plans","oneTime","onetime","netAmountFlag","link2SaveDaoService","createExpect","switchMap","createExpectResp","confirmPaymentMethod","SEPA_DEBIT","stripeService","optionalParams","payment_method","client_secret","stripeServiceResp","confirmExpectPayload","setupIntentId","stripeStatus","status","confirmExpect","tap","confirmExpectResp","handleStripeError","Redirect","InversifyContext","React","createContext","container","InjectionReduxProvider","props","Provider","children","useInjection","identifier","useContext","Container","bind","to","inSingletonScope","LinkName","_path","Translate","t","useTranslation","text","selectLink","activeStepSelector","createSelector","activeLinkNameSelector","languageSelector","errorSelector","orderSelector","contactEmailSelector","savePaymentMethodSelector","redirectDataSelector","validUntilSelector","payMeOrderAmountSelector","chargePaymentRefSelector","connect","activeLanguage","withRouter","hashDaoService","timestamp","Date","toISOString","callbackUrl","history","getHashPayload","selectedLangLocale","getHash","token","indexOf","subscribe","Fragment","CurrencySymbol","currency","Component","CurrencyConverter","parseInt","toFixed","CustomError","showError","className","styles","errorContainer","inputAmountRegex","amountClass","class","useState","setAmount","isAmountUnderMinAmount","setIsAmountUnderMinAmount","isAmountOverMaxAmount","setIsAmountOverMaxAmount","amountContainer","autoFocus","input","inputMode","style","width","toString","contentEditable","onChange","test","target","formattedTextAmount","formattedAmount","parseFloat","isAmountValid","minChargeAmount","minAmountExceeded","maxChargeAmount","maxAmountExceeded","onInputChange","onBlur","formatInsertedAmount","maxLength","template","simple","logo","titleClass","subtitleClass","headerClass","maxAmountClass","positionSubTitleClass","positionSubTitle","maxAmountTitleClass","maxAmountTitle","underOrderTitlesClass","underOrderTitlesSeparator","smallUnder","underAmountClass","underAmountSeparator","under","dataContainer","companyName","line","templateLogo","logoUrl","src","alt","renderLogoUrl","editableAmount","renderEditableAmount","renderAmount","chargePaymentRefContainer","ExpirationInfo","format","urlInformationalPdf","informationalPdfUrl","termsOfServiceUrl","orderFee","Intl","NumberFormat","minimumFractionDigits","onClick","handleGenericError","PaymentMethodOption","renderIcon","renderTitle","icon","IconComponent","iconContainer","image","renderIconButtonContent","renderImageButtonContent","pmoContainer","renderButtonContent","_excluded","_extends","Object","assign","i","arguments","source","prototype","hasOwnProperty","call","apply","_objectWithoutProperties","excluded","sourceKeys","keys","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_ref","svgRef","createElement","height","viewBox","fill","ref","ForwardRef","forwardRef","useToggle","defaultState","toggleState","setToggleState","toggle","old","handleTrue","handleFalse","ModalPopup","open","onClose","closeOnDocumentClick","overlayStyle","background","modalPopupContainer","Divider","divider","Header","headerWrapper","CloseButton","closeButton","BodyWrapper","bodyWrapper","Footer","confirmAction","abortAction","confirmLabel","abortLabel","confirmDisabled","footer","disabled","popupContainer","EnumCustomColor","PisModal","modalSettings","checked","listPoints","close","Trans","i18nKey","contentWrapper","listHeader","listWrapper","item","listItem","inputWrapper","checkbox","checkboxLabel","htmlFor","values","linkPrivacy","linkTermini","components","a","isModalOpen","openModal","closeModal","disabledPayMethod","contactRequest","pmoListContainer","pmoList","PAYPAL","paypalIcon","renderPayPalPayMethodIfAllowed","iconOptionCard","cardRequiredAcquired","renderCardPayMethodIfAllowed","iconOptionPis","renderPisPayMethodIfAllowed","iconOptionSepa","renderSepaDebitPayMethodIfAllowed","emailRegex","RegExp","ContactEmailInput","currentTarget","targetValue","trim","setState","validate","onInputBlur","isTouched","inputValue","isValid","OrderEmailNoteBox","confirmationPageNote","renderContactEmail","renderNote","PaymentDetails","renderNetAmountChargePdf","amounts","fee","renderCancelButton","cancelUrl","goToPaymentMethodList","PM_TAKEN_FROM_LIST","PM_PROVIDED_BY_USER_AND_SAVED","Array","isArray","marginTop","getActiveStep","isLoading","setIsLoading","isError","setIsError","useParams","link2PayDaoService","useEffect","fetchData","retrieveOrder","customTheme","orderFound","setTimeout","applyTheme","hideLoading","aptrinsic","errorMessage","BrowserNotCompatibleError","ApiKeyActivated","document","dashboardUrl","queryStringPassed","parsedQueryParams","queryString","statePassed","getLocalStorage","items","localStorage","getItem","decompress","languages","Index","closeDropdown","forceUpdate","storeLanguage","setItem","compress","dropdownOpen","localSetting","prevProps","fullLang","openDropdown","btnLang","selected","toggleDropdown","prettyLanguageName","dropdownBox","display","hide","dropdownElement","withTranslation","InvalidUrlError","TooltipIconSize","TooltipType","TooltipInfo","divElement","createRef","tooltipInfo","getElementById","clientHeight","Web","top","infoContainer","Tooltip","onMouseAction","showInfo","Mobile","onResize","innerWidth","addEventListener","removeEventListener","size","onMouseEnter","onMouseLeave","renderInfo","infoKey","DateInput","_getCustomDateInputClass","min","getMinDate","now","getFullYear","getDate","getMonth","customDateInputClassName","calendarIcon","WHITE","navigator","userAgent","SchedulePlanTooltip","schedulePlanTooltip","faAsterisk","schedulePlan","originalChargeDate","PlanInfo","rawSchedulesList","sortedRawSchedulesList","sort","b","chargeDate","formattedSchedules","thisSchedule","renderSchedulePlan","halfwayThrough","Math","ceil","left","right","rawOneTimePlan","rawSchedulePlan","schedulesResult","splitSchedulesInHalf","recurrentData","frequencyPeriodMapping","repeatPeriod","messagePrefix","repeatEvery","count","endAfterTimes","endOnDate","formattedEndOnDate","frequencyMessage","getFrequencyMessage","startOn","schedulePlanInfo","chargeDateSpacing","planObject","requiredEndDivider","typeOfPlan","getTypeOfPlan","planContent","formatOneTime","formatSchedules","formatRecurrent","renderEndDivider","hasAPlan","publishableKey","PayMe","payMeDaoService","detailUrl","helpIcon","DevHinBox","displayTestCard","Main","viewContainer","logoContainer","tools","contentContainer","path","component","Boolean","hostname","match","ReactDOM","render","StrictMode","serviceWorker","ready","registration","unregister","catch"],"mappings":"6GACAA,EAAOC,QAAU,CAAC,cAAgB,8BAA8B,OAAS,uBAAuB,cAAgB,8BAA8B,MAAQ,sBAAsB,SAAW,yBAAyB,iBAAmB,mC,oBCAnOD,EAAOC,QAAU,CAAC,QAAU,wBAAwB,SAAW,yBAAyB,YAAc,4BAA4B,QAAU,wBAAwB,KAAO,qBAAqB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MACA,kBAAC,GAAD,QAGR,yBAAK/b,GAAG,eAAewF,UAAWC,KAAOuW,kBACrC,kBAAC,IAAD,KACI,kBAAC,IAAD,CAAOC,KAAK,sBAAsBC,UAAW1pB,KAC7C,kBAAC,IAAD,CAAOypB,KAAK,uBAAuBC,UAAW7pB,KAC9C,kBAAC,IAAD,CAAO4pB,KAAK,mBAAmBC,UAAWZ,KAC1C,kBAAC,IAAD,CAAOW,KAAK,oBAAoBC,UAAWZ,KAC3C,kBAAC,IAAD,CAAOW,KAAK,qBAAqBC,UAAWnI,KAC5C,kBAAC,IAAD,CAAOkI,KAAK,SAASC,UAAW/hB,KAChC,kBAAC,IAAD,CAAO8hB,KAAK,0BAA0BC,UAAWpI,KACjD,kBAAC,IAAD,CAAOmI,KAAK,aAAaC,UAAWlG,QAKhD,kBAAC,GAAD,SCnCImG,QACW,cAA7B/mB,OAAOC,SAAS+mB,UAEe,UAA7BhnB,OAAOC,SAAS+mB,UAEhBhnB,OAAOC,SAAS+mB,SAASC,MACvB,2DCPNC,IAASC,OACP,kBAAC,IAAMC,WAAP,KACE,kBAAC,GAAD,OAEFxI,SAASuC,eAAe,SD4HpB,kBAAmB6B,WACrBA,UAAUqE,cAAcC,MACrBje,MAAK,SAAAke,GACJA,EAAaC,gBAEdC,OAAM,SAAA31B,GACL4Q,QAAQ5Q,MAAMA,EAAMgR,a,mBEhJ5B1R,EAAOC,QAAU,CAAC,iBAAmB,iCAAiC,gBAAkB,gCAAgC,QAAU,wBAAwB,SAAW,yBAAyB,QAAU,wBAAwB,SAAW,yBAAyB,WAAa,2BAA2B,kBAAoB,oC,mBCAhUD,EAAOC,QAAU,CAAC,SAAW,yBAAyB,WAAa,2BAA2B,YAAc,4BAA4B,eAAiB,+BAA+B,aAAe,6BAA6B,cAAgB,8BAA8B,SAAW,4B","file":"static/js/main.4d63d715.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"viewContainer\":\"styles_viewContainer__2itBE\",\"header\":\"styles_header__1XZD3\",\"logoContainer\":\"styles_logoContainer__1MmFY\",\"tools\":\"styles_tools__1ANYK\",\"helpIcon\":\"styles_helpIcon__3tieE\",\"contentContainer\":\"styles_contentContainer__3c1FZ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"btnLang\":\"styles_btnLang__2gSjh\",\"selected\":\"styles_selected__FwQE_\",\"dropdownBox\":\"styles_dropdownBox__1hMZ2\",\"display\":\"styles_display__2ZG3j\",\"hide\":\"styles_hide__2eWF6\",\"dropdownElement\":\"styles_dropdownElement__pAdqY\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"input\":\"styles_input__3-fcK\",\"center\":\"styles_center__3gh3W\",\"amountContainer\":\"styles_amountContainer__3DqxF\",\"errorStyle\":\"styles_errorStyle__19WH7\"};","import { createSlice } from \"redux-starter-kit\";\nimport {LanguageLocale} from '../../constants/locales';\nimport {LinkStep} from '../../model/LinkStep';\nimport {LinkName} from '../../model/LinkName';\nimport {IError} from '../../model/IError';\nimport {DEFAULT_LANG_LOCALE} from '../../constants/locales';\n\nexport enum FlowType {\n PM_PROVIDED_BY_USER_AND_NOT_SAVED = 'PM_PROVIDED_BY_USER_AND_NOT_SAVED',\n PM_PROVIDED_BY_USER_AND_SAVED = 'PM_PROVIDED_BY_USER_AND_SAVED',\n PM_TAKEN_FROM_LIST = 'PM_TAKEN_FROM_LIST',\n}\n\nexport interface ISagaState {\n activeStep: LinkStep | null;\n activeLinkName: LinkName | null;\n language: LanguageLocale,\n flow: FlowType;\n error: any;\n}\n\nexport interface IChangeActiveStep {\n readonly payload: {\n activeStep: any;\n };\n}\n\nexport interface IChangeActiveLinkName {\n readonly payload: {\n activeLinkName: LinkName;\n };\n}\n\nexport interface IChangeLanguage {\n readonly payload: {\n language: any;\n };\n}\n\nexport interface IChangeFlow {\n readonly payload: {\n flow: FlowType;\n };\n}\n\nexport interface IChangeError {\n readonly payload: {\n error: IError | null;\n };\n}\n\nconst initialState: ISagaState = {\n activeStep: null,\n activeLinkName: null,\n language: DEFAULT_LANG_LOCALE,\n flow: FlowType.PM_PROVIDED_BY_USER_AND_NOT_SAVED,\n error: null,\n};\n\nconst sagaSlice = createSlice({\n slice: \"saga\",\n initialState: initialState,\n reducers: {\n changeActiveStep: {\n reducer: (state: ISagaState, action: IChangeActiveStep) => {\n return {\n activeStep: action.payload.activeStep,\n activeLinkName: state.activeLinkName,\n language: state.language,\n flow: state.flow,\n error: state.error,\n };\n },\n prepare(activeStep: any) {\n return {\n payload: { activeStep: activeStep }\n };\n }\n },\n changeActiveLinkName: {\n reducer: (state: ISagaState, action: IChangeActiveLinkName) => {\n return {\n activeStep: state.activeStep,\n activeLinkName: action.payload.activeLinkName,\n language: state.language,\n flow: state.flow,\n error: state.error,\n };\n },\n prepare(activeLinkName: LinkName) {\n return {\n payload: { activeLinkName: activeLinkName }\n };\n }\n },\n changeLanguage: {\n reducer: (state: ISagaState, action: IChangeLanguage) => {\n return {\n activeStep: state.activeStep,\n activeLinkName: state.activeLinkName,\n language: action.payload.language,\n flow: state.flow,\n error: state.error,\n };\n },\n prepare(language: LanguageLocale) {\n return {\n payload: { language: language }\n };\n }\n },\n changeFlow: {\n reducer: (state: ISagaState, action: IChangeFlow) => {\n return {\n activeStep: state.activeStep,\n activeLinkName: state.activeLinkName,\n language: state.language,\n flow: action.payload.flow,\n error: state.error,\n };\n },\n prepare(flow: FlowType) {\n return {\n payload: { flow: flow }\n };\n }\n },\n changeError: {\n reducer: (state: ISagaState, action: IChangeError) => {\n return {\n activeStep: state.activeStep,\n activeLinkName: state.activeLinkName,\n language: state.language,\n flow: state.flow,\n error: action.payload.error,\n };\n },\n prepare(error: IError) {\n return {\n payload: { error: error }\n };\n }\n },\n }\n});\nexport const {\n changeActiveStep,\n changeActiveLinkName,\n changeLanguage,\n changeFlow,\n changeError,\n} = sagaSlice.actions;\nexport default sagaSlice.reducer;","// extracted by mini-css-extract-plugin\nmodule.exports = {\"pmoContainer\":\"styles_pmoContainer__3clOg\",\"title\":\"styles_title__RstNo\",\"icon\":\"styles_icon__fgAF7\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"infoContainer\":\"styles_infoContainer__rX0jq\",\"info\":\"styles_info__24zrN\",\"header\":\"styles_header__1-vgo\",\"content\":\"styles_content__2Hn6o\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"tooltip\":\"styles_tooltip__t5Ffl\",\"big\":\"styles_big__10Sh-\",\"icon\":\"styles_icon__2qels\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"icon\":\"styles_icon__1yty_\",\"schedulePlanInfo\":\"styles_schedulePlanInfo__25V-q\",\"chargeDateSpacing\":\"styles_chargeDateSpacing__7PueB\"};","import {createSlice} from 'redux-starter-kit';\nimport {IOrder} from '../../model/IOrder';\nimport {PaymentMethodType} from '../../model/PaymentMethodType';\nimport {IPaymentMethodItem} from '../../model/IPaymentMethodItem';\n\nexport interface ICustomerAddress{\n countryCode: string | null,\n address: string\n}\n\nexport interface ILinkDataState {\n order: IOrder | null;\n credential: string | null;\n contactEmail: string | null;\n customerName: string | null;\n customerAddress: ICustomerAddress | null;\n customerId: string | undefined;\n savePaymentMethod: boolean;\n paymentMethodType: PaymentMethodType,\n paymentMethod: any,\n customerPaymentMethods: any[];\n redirectData: any; // toDo interface\n validUntil: string | null;\n payMeOrderAmount: number | null;\n chargePaymentRef: string | null;\n transactionCode: string | null;\n}\n\nexport interface IChangeOrder {\n readonly payload: {\n order: IOrder;\n };\n}\n\nexport interface IChangeCredential {\n readonly payload: {\n credential: string | null;\n };\n}\n\nexport interface IChangeContactEmail {\n readonly payload: {\n contactEmail: string | null;\n };\n}\n\nexport interface IChangeCustomerName {\n readonly payload: {\n customerName: string | null;\n };\n}\n\nexport interface IChangeCustomerAddress {\n readonly payload: {\n customerAddress: ICustomerAddress | null;\n };\n}\n\nexport interface IChangeCustomerId {\n readonly payload: {\n customerId: string;\n };\n}\n\nexport interface IChangeSavePaymentMethod {\n readonly payload: {\n savePaymentMethod: any;\n };\n}\n\nexport interface IChangePaymentMethodType {\n readonly payload: {\n paymentMethodType: PaymentMethodType;\n };\n}\n\nexport interface IChangePaymentMethod {\n readonly payload: {\n paymentMethod: string;\n };\n}\n\nexport interface IChangeCustomerPaymentMethods {\n readonly payload: {\n customerPaymentMethods: IPaymentMethodItem[];\n };\n}\n\nexport interface IChangeChargePaymentRef {\n readonly payload: {\n chargePaymentRef: string | null;\n };\n}\n\nexport interface IChangeOrderAmount {\n readonly payload: {\n orderAmount: number | null;\n };\n}\n\nexport interface IChangeRedirectData {\n readonly payload: {\n redirectData: any;\n };\n}\n\nexport interface IChangeValidUntil {\n readonly payload: {\n validUntil: any;\n };\n}\n\nexport interface IChangeTransactionCode {\n readonly payload: {\n transactionCode: string | null;\n };\n}\n\nconst initialState: ILinkDataState = {\n order: null,\n credential: null,\n contactEmail: null,\n customerName: null,\n customerAddress: null,\n customerId: undefined,\n savePaymentMethod: false,\n paymentMethodType: PaymentMethodType.CARD,\n paymentMethod: null,\n customerPaymentMethods: [],\n redirectData: null,\n validUntil: null,\n payMeOrderAmount: null,\n chargePaymentRef: null,\n transactionCode: null\n};\n\nconst linkDataSlice = createSlice({\n slice: \"linkData\",\n initialState: initialState,\n reducers: {\n changeOrder: {\n reducer: (state: ILinkDataState, action: IChangeOrder) => {\n return {\n ...state,\n order: action.payload.order,\n };\n },\n prepare(order: IOrder) {\n return {\n payload: { order }\n };\n }\n },\n changeCredential: {\n reducer: (state: ILinkDataState, action: IChangeCredential) => {\n return {\n ...state,\n credential: action.payload.credential,\n };\n },\n prepare(credential: string | null) {\n return {\n payload: { credential }\n };\n }\n },\n changeContactEmail: {\n reducer: (state: ILinkDataState, action: IChangeContactEmail) => {\n return {\n ...state,\n contactEmail: action.payload.contactEmail,\n };\n },\n prepare(contactEmail: string | null) {\n return {\n payload: { contactEmail }\n };\n }\n },\n changeCustomerName: {\n reducer: (state: ILinkDataState, action: IChangeCustomerName) => {\n return {\n ...state,\n customerName: action.payload.customerName\n };\n },\n prepare(customerName: string | null) {\n return {\n payload: { customerName }\n };\n }\n },\n changeCustomerAddress: {\n reducer: (state: ILinkDataState, action: IChangeCustomerAddress) => {\n return {\n ...state,\n customerAddress: action.payload.customerAddress\n };\n },\n prepare(customerAddress: ICustomerAddress | null) {\n return {\n payload: { customerAddress }\n };\n }\n },\n changeCustomerId: {\n reducer: (state: ILinkDataState, action: IChangeCustomerId) => {\n return {\n ...state,\n customerId: action.payload.customerId,\n };\n },\n prepare(customerId: string) {\n return {\n payload: { customerId }\n };\n }\n },\n changePayMeOrderAmount: {\n reducer: (state: ILinkDataState, action: IChangeOrderAmount) => {\n return {\n ...state,\n payMeOrderAmount: action.payload.orderAmount,\n };\n },\n prepare(orderAmount: number | null) {\n return {\n payload: { orderAmount }\n };\n }\n },\n changeChargePaymentRef: {\n reducer: (state: ILinkDataState, action: IChangeChargePaymentRef) => {\n return {\n ...state,\n chargePaymentRef: action.payload.chargePaymentRef,\n };\n },\n prepare(chargePaymentRef: string | null) {\n return {\n payload: { chargePaymentRef }\n };\n }\n },\n changeSavePaymentMethod: {\n reducer: (state: ILinkDataState, action: IChangeSavePaymentMethod) => {\n return {\n ...state,\n savePaymentMethod: action.payload.savePaymentMethod\n };\n },\n prepare(savePaymentMethod: boolean) {\n return {\n payload: { savePaymentMethod }\n };\n }\n },\n changePaymentMethodType: {\n reducer: (state: ILinkDataState, action: IChangePaymentMethodType) => {\n return {\n ...state,\n paymentMethodType: action.payload.paymentMethodType\n };\n },\n prepare(paymentMethodType: PaymentMethodType) {\n return {\n payload: { paymentMethodType }\n };\n }\n },\n changePaymentMethod: {\n reducer: (state: ILinkDataState, action: IChangePaymentMethod) => {\n return {\n ...state,\n paymentMethod: action.payload.paymentMethod\n };\n },\n prepare(paymentMethod: any) { // stripe.JSW interface\n return {\n payload: { paymentMethod }\n };\n }\n },\n changeCustomerPaymentMethods: {\n reducer: (state: ILinkDataState, action: IChangeCustomerPaymentMethods) => {\n return {\n ...state,\n customerPaymentMethods: action.payload.customerPaymentMethods\n };\n },\n prepare(customerPaymentMethods: IPaymentMethodItem[]) {\n return {\n payload: { customerPaymentMethods }\n };\n }\n },\n changeRedirectData: {\n reducer: (state: ILinkDataState, action: IChangeRedirectData) => {\n return {\n ...state,\n redirectData: action.payload.redirectData\n \n };\n },\n prepare(redirectData: any) {\n return {\n payload: { redirectData }\n };\n }\n },\n changeValidUntil: {\n reducer: (state: ILinkDataState, action: IChangeValidUntil) => {\n return {\n ...state,\n validUntil: action.payload.validUntil\n };\n },\n prepare(validUntil: string | null) {\n return {\n payload: { validUntil }\n };\n }\n },\n changeTransactionCode: {\n reducer: (state: ILinkDataState, action: IChangeTransactionCode) => {\n return {\n ...state,\n transactionCode: action.payload.transactionCode\n };\n },\n prepare(transactionCode: string | null) {\n return {\n payload: { transactionCode }\n };\n }\n },\n cleanState: {\n reducer: (state: ILinkDataState) => {\n return {\n order: null,\n credential: null,\n contactEmail: null,\n customerName: null,\n customerAddress: null,\n customerId: undefined,\n setupIntent: null,\n savePaymentMethod: false,\n paymentMethodType: PaymentMethodType.CARD,\n paymentMethod: null,\n customerPaymentMethods: [],\n redirectData: null,\n validUntil: null,\n payMeOrderAmount: null,\n chargePaymentRef: null,\n transactionCode: null\n };\n },\n prepare(payload: {}) {\n return {\n payload: {}\n };\n }\n },\n }\n});\nexport const {\n changeChargePaymentRef,\n changeOrder,\n changeCredential,\n changeContactEmail,\n changeCustomerName,\n changeCustomerAddress,\n changeCustomerId,\n changePayMeOrderAmount,\n changeSavePaymentMethod,\n changePaymentMethodType,\n changePaymentMethod,\n changeCustomerPaymentMethods,\n changeRedirectData,\n changeValidUntil,\n changeTransactionCode,\n cleanState,\n} = linkDataSlice.actions;\nexport default linkDataSlice.reducer;","import { combineReducers } from \"redux\";\nimport sagaSlice from \"./sagaSlice\";\nimport linkDataSlice from './linkDataSlice';\n\n\nconst rootReducer = combineReducers({\n saga: sagaSlice,\n linkData: linkDataSlice\n});\n\nexport type RootState = ReturnType;\n\nexport default rootReducer;\n","import { combineEpics } from \"redux-observable\";\n\nexport const rootEpic = combineEpics(\n\n);\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"errorContainer\":\"styles_errorContainer__mkabe\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"schedulePlanTooltip\":\"styles_schedulePlanTooltip__3rKhi\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"dataContainer\":\"styles_dataContainer__3pt86\",\"title\":\"styles_title__2-_cq\",\"subtitle\":\"styles_subtitle__2gzsw\",\"smallUnder\":\"styles_smallUnder__3LdJe\",\"under\":\"styles_under__2_6Zt\",\"line\":\"styles_line__10U3Y\",\"under-thanks\":\"styles_under-thanks__270sP\",\"header\":\"styles_header__9E8EL\",\"label\":\"styles_label__34696\",\"center\":\"styles_center__2qIWv\",\"amountContainer\":\"styles_amountContainer__1uwZ4\",\"chargePaymentRefContainer\":\"styles_chargePaymentRefContainer__3SxTJ\",\"chargePaymentRef\":\"styles_chargePaymentRef__3SAy8\",\"centerText\":\"styles_centerText__2m_nt\",\"logoUrl\":\"styles_logoUrl__1F6qr\"};","import {\n Action,\n configureStore,\n getDefaultMiddleware\n} from \"redux-starter-kit\";\nimport rootReducer, { RootState } from \"./reducers\";\nimport { ThunkAction } from \"redux-thunk\";\nimport { createEpicMiddleware } from \"redux-observable\";\nimport { rootEpic } from \"./epics\";\n\nconst defaultMiddleware = getDefaultMiddleware(),\n epicMiddleware = createEpicMiddleware();\n\ndefaultMiddleware.push(epicMiddleware);\n\nconst store = configureStore({\n reducer: rootReducer,\n middleware: defaultMiddleware\n});\n\nepicMiddleware.run(rootEpic);\n\nconst hotModule = module as typeof module & { hot: any };\nif (process.env.NODE_ENV === \"development\" && hotModule.hot) {\n hotModule.hot.accept(\"./reducers\", () => {\n const newRootReducer = require(\"./reducers\").default;\n store.replaceReducer(newRootReducer);\n });\n}\n\nexport type AppDispatch = typeof store.dispatch;\nexport type AppThunk = ThunkAction>;\nexport default store;\n","export enum LanguageLocale {\n EN = \"en-US\",\n IT= \"it-IT\"\n}\n\nexport enum LanguageLocaleType {\n en = \"en-GB\",\n it = \"it-IT\"\n}\n\nexport const DEFAULT_LOCALE = 'it';\nexport const DEFAULT_LANG_LOCALE = LanguageLocale.IT;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modalPopupContainer\":\"styles_modalPopupContainer__1sRhm\",\"divider\":\"styles_divider__3TyTm\",\"headerWrapper\":\"styles_headerWrapper__1btMf\",\"bodyWrapper\":\"styles_bodyWrapper__3SyDj\",\"closeButton\":\"styles_closeButton__2a7yB\",\"footer\":\"styles_footer__2nYB_\",\"popupContainer\":\"styles_popupContainer__Hz4O1\"};","export enum PaymentMethodType {\n CARD = 'card',\n SEPA_DEBIT = 'sepa_debit',\n PAYPAL = 'paypal',\n PIS_CHARGE = 'pis_charge'\n}","import i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport {it} from \"./assets/i18n/it\";\nimport {en} from \"./assets/i18n/en\";\nimport { LanguageLocale } from \"./constants/locales\";\n\n// the translations\n// (tip move them in a JSON file and import them)\nconst resources = {\n [LanguageLocale.EN]: {\n translation: en\n },\n [LanguageLocale.IT]: {\n translation: it\n }\n};\n\ni18n\n .use(initReactI18next) // passes i18n down to react-i18next\n .init({\n resources,\n\n lng: LanguageLocale.IT,\n\n keySeparator: \".\", // we do not use keys in form messages.welcome\n\n interpolation: {\n escapeValue: false // react already safes from xss\n }\n });\n\nexport default i18n;\n","export const en = {\n browserNotSupported: \"Sorry, your browser is not compatible. Update it or use another one in order to complete the operation.\",\n invalidUrl: \"Sorry, invalid URL.\",\n button: {\n next: \"Next\",\n back: \"Back\",\n confirm: \"Confirm\",\n addCard: \"Add new payment method\",\n proceed:\"Proceed\",\n remove: \"Remove\",\n cancel: \"Cancel\",\n refresh: \"Refresh\",\n },\n plan: {\n frequency: \"Frequency\",\n planSchedule: \"schedules plan\",\n planRecurrent: \"recurring plan\",\n planOneTime: \"one time plan\",\n every: \"Every\",\n till: \"till\",\n for: \"for\",\n date: \"Date\",\n startDate: \"Start Date\",\n period: {\n day: \"day\",\n day_plurarl: \"days\",\n month: \"month\",\n month_plural: \"months\",\n year: \"year\",\n year_plural: \"years\",\n }\n },\n orderDetails: {\n amount: \"Amount\",\n imageUrl: \"Logo:\",\n title: \"Title:\",\n desc: \"Description:\",\n paymentRef: \"Reference number:\",\n validityEndDate: \"validity end date\",\n contextId: \"ContextID\",\n maxAmount: \"Maximum amount\",\n minAmount: \"Minimum amount\",\n companyNamePrefix: \"TeamSystem Payments S.r.l. on behalf of \",\n charge: \"charge\",\n charge_plural: \"charges\"\n },\n step: {\n paymentDetails: {\n title: \"PAY NOW\",\n subtitle: \"Register a payment source for the Athlon Annual Gym Membership\",\n card: {\n number: \"Card number:\",\n expiration: \"Expiration date:\",\n cvv: \"CVV:\"\n },\n selectPaymentMethod: \"Do you want to use a payment method previously saved in your wallet?\",\n registerCard: \"Do you want to use a previously saved payment method?\",\n amount: \"Amount\",\n expiration: \"*This link expires on \",\n enterDate: \"Please enter a valid date\"\n },\n paymentConfirmation: {\n title: \"Payment Confirmation\",\n card: \"Credit / Debit Card\",\n sepa_debit: \"Bank account\"\n },\n customerIdentification: {\n title: \"Identification\",\n info: \"Enter your email or mobile number to receive the verification code\",\n enterEmail: \"Enter email\",\n enterYourEmail: \"Enter your email\",\n enterEmailOrMobileNumber: \"Enter email or mobile number\",\n email: \"E-mail\",\n mobileNumber: \"Mobile Number\",\n wrongCredentials: \"Wrong Credentials\",\n privacyAndTosDisclaimer: \"I accept the <0>Terms Of Service and I have read and agree to <1>Privacy Policy\"\n },\n customerVerification: {\n title: {\n line1: \"ENTER THE CODE\",\n line2: \"YOU RECEIVED\",\n line2email: \"YOU RECEIVED VIA E-MAIL\",\n line2mobile: \"YOU RECEIVED VIA MOBILE\"\n },\n otpCode: \"OTP Code\",\n noOtpCodeReceivedInfo: \"Didn't you get the code? Request a new one\",\n enterOtpCode: \"Enter OTP Code\",\n otpSent: \"OTP Sent\",\n },\n paymentMethodSave: {\n title: \"Authorise\",\n },\n paymentMethodList: {\n title: \"Select a payment method\",\n card: \"Credit/Debit Card\",\n account: \"Bank account\",\n expiry: \"Expiry\",\n modal: {\n info: \"Do you confirm?\"\n },\n onItem: 'No payment methods.'\n },\n paymentMethodAdd: {\n title: \"ADD CARD\",\n subtitle: \"ENTER THE CARD DATA. IT WILL BE ASSOCIATED WITH PAYMENTS\",\n cardNumber: \"Card number:\",\n expiration: \"Expiration date:\",\n cvv: \"CVV:\"\n },\n thankYou: {\n title: 'THANK YOU!',\n subtitle: 'PAYMENT completed successfully!',\n subtitleLink2save: \"Authorization Successfully Concluded!\",\n orderDetailsLabel: 'OPERATION SUMMARY',\n paymentMethodDetailsLabel: 'Credit/Debit Card',\n contact: {\n label:'Do you need any help?',\n link: 'Contact us!'\n },\n infoMessage:\"The charge will be visible on your bank account balance as «TeamSystem Pay»\",\n print:'DOWNLOAD',\n newPayment:'NEW PAYMENT',\n transactionCode:'OPERATION NUMBER: '\n },\n tspayDetail: {\n info: \"New to TS Pay?\",\n urlInfo: 'Click here for more information'\n },\n netAmountChargePdf: {\n info: '*Including charge fee of',\n url: '(Terms and conditions)'\n }\n },\n paymentMethod: {\n email: \"Email\",\n name: \"Name\",\n card: \"Card\",\n cardDesc: \"Debit or credit Card\",\n pisDesc: \"Instant bank transfer\",\n sepaDebit: \"IBAN\",\n sepaDebitTitle: \"IBAN\",\n sepaDebitDesc: \"Direct debit on bank account\",\n saveCard: \"Save the card for future payments (optional)\",\n saveSepaDebit: \"Save SDD for future payments (optional)\",\n cardNumber: \"Card number\",\n cardExpiry: \"Expiry\",\n cardCvc: \"CVV\",\n selectPayMethod: \"Select a payment method\",\n Link2Save: {\n declaimer: \"By providing your IBAN and confirming this payment, you are authorizing TeamSystem Payments S.r.l., to send instructions to your bank to debit your account and your bank to debit your account in accordance with those instructions. You are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited.\",\n declaimerBottom: 'TeamSystem Pay uses advanced anti-fraud systems to ensure the transaction security . Data must be entered by the account holder or authorized personnel. Any abuse will be prosecuted according to the law.'\n },\n Link2Pay: {\n declaimer: \"By providing your IBAN and confirming this payment, you are authorizing TeamSystem Payments S.r.l., to send instructions to your bank to debit your account and your bank to debit your account in accordance with those instructions. You are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited.\",\n declaimerBottom: 'TeamSystem Pay uses advanced anti-fraud systems to ensure the transaction security . Data must be entered by the account holder or authorized personnel. Any abuse will be prosecuted according to the law.'\n }\n },\n chargePaymentRefInput : {\n placeholder: \"Enter the payment reason\"\n },\n customerNameInput : {\n label: \"Full name\",\n placeholder: \"Full name\"\n },\n customerAddressInput : {\n label: \"Full address\",\n placeholder: \"Full address\"\n },\n tabs: {\n card: \"CREDIT CARD\",\n sepa_debit: \"IBAN\"\n },\n accordion: {\n card: \"CREDIT / DEBIT CARD\",\n sepa_debit: \"IBAN (DIRECT DEBIT)\"\n },\n removeModal: {\n header: 'CONFIRM REMOVAL',\n info: \"Are you sure you want to delete the payment method from the wallet?\"\n },\n thankYou: {\n info: \"Thank you\"\n },\n loading: \"You are about to be redirected. Do not close this page.\",\n pisModal: {\n title: \"Instant Transfer\",\n condition: \"Terms and costs of the service:\",\n listOne: \"TeamSystem Payments does not apply any additional fees beyond those possibly charged by your bank for executing the instant transfer;\",\n listTwo: \"Once confirmed, the payment order cannot be revoked;\",\n listThree: \"For security reasons, authentication with your bank is required.\",\n tec: \"I accept the Terms and Conditions of the service and the Privacy Policy of TeamSystem Payments.\"\n },\n tooltip: {\n saveCard: {\n header: \"How does it work? \",\n content: \"By selecting this option you choose to store the indicated payment method, so that you can reuse it quickly and securely in future operations with TeamSystem Pay.\"\n },\n saveSepaDebit: {\n header: \"How does it work?\",\n content: \"By selecting this option you choose to store the indicated payment method, so that you can reuse it quickly and securely in future operations with TeamSystem Pay.\"\n },\n customerVerification: {\n header: \"OTP\",\n content: \"OTP (One Time Password) indicates a “disposable” password sent via email or SMS that is generated at the moment and can be used only once. Entering the OTP code is necessary to safely authorize the requested operation.\"\n },\n dateInput: {\n header: \"Authorisation ending date\",\n content: \"You can choose when the source will still be valid. By default there is no expiry\",\n },\n paymentSchedulePlan: {\n header: \"Original date:\"\n }\n },\n error: {\n unknown: \"Something went wrong\",\n noOrderKey: \"No order key\",\n noCallbackUrl: \"error occurred. Callback not defined\",\n invalidOtpCode: \"wrong otp code\",\n invalidSepaDebit: \"Your IBAN is not supported\",\n invalidCard: \"Your card is not supported\",\n invalidBrand: \"This card brand is not supported\",\n invalidFundingType: \"This type of card is not supported\",\n invalidMobileNo: \"Mobile number is incorrect\",\n orderExpired: \"This order expired\"\n }\n};\n","export const it = {\n browserNotSupported: \"Spiacente, il tuo browser non è supportato. Aggiornalo o utilizzane un altro per poter completare l'operazione.\",\n invalidUrl: \"Spiacente, questo URL non è valido.\",\n button: {\n next: \"Avanti\",\n back: \"Indietro\",\n confirm: \"Conferma\",\n addCard: \"Aggiungi nuovo metodo di pagamento\",\n proceed: \"Procedi\",\n remove: \"Elimina\",\n cancel: \"Annulla\",\n refresh: \"Aggiorna\",\n },\n plan: {\n frequency: \"Frequenza\",\n planSchedule: \"piano scadenze\",\n planRecurrent: \"piano ricorrente\",\n planOneTime: \"piano di addebito\",\n every: \"Ogni\",\n till: \"fino al\",\n for: \"per\",\n date: \"Data\",\n startDate: \"Data Inizio\",\n period: {\n day: \"giorno\",\n day_plural: \"giorni\",\n month: \"mese\",\n month_plural: \"mesi\",\n year: \"anno\",\n year_plural: \"anni\",\n }\n },\n orderDetails: {\n amount: \"Importo\",\n imageUrl: \"Logo\",\n title: \"Titolo\",\n desc: \"Descrizione\",\n paymentRef: \"Causale\",\n validityEndDate: \"Data fine validità\",\n contextId: \"ContextID\",\n maxAmount: \"Importo massimo autorizzato\",\n minAmount: \"Importo minimo autorizzato\",\n companyNamePrefix: \"TeamSystem Payments S.r.l. per conto di \",\n charge: \"addebito\",\n charge_plural: \"addebiti\"\n },\n step: {\n paymentDetails: {\n title: \"PAGA\",\n subtitle: \"Registra una sorgente di pagamento per l'abbonamento annuale alla palestra Athlon\",\n card: {\n number: \"Numero carta:\",\n expiration: \"Scadenza:\",\n cvv: \"CVV:\"\n },\n selectPaymentMethod: \"Vuoi utilizzare un metodo di pagamento salvato in precedenza?\",\n registerCard: \"Vuoi utilizzare un metodo di pagamento salvato in precedenza?\",\n amount: \"Costo\",\n expiration: \"*Questo link è valido sino al \",\n enterDate: \"Inserisci una data\"\n },\n paymentConfirmation: {\n title: \"Riepilogo Operazione\",\n card: \"Carta di Credito / Debito\",\n sepa_debit: \"Conto Corrente\",\n },\n customerIdentification: {\n title: \"INSERISCI I TUOI DATI\",\n info: \"Inserisci il tuo indirizzo e-mail o il tuo numero di cellulare per ricevere il codice di verifica\",\n enterEmail: \"Inserisci l'email\",\n enterYourEmail: \"Inserisci la tua e-mail\",\n enterEmailOrMobileNumber: \"Inserisci e-mail o cellulare\",\n email: \"E-mail\",\n mobileNumber: \"Cellulare\",\n wrongCredentials: \"Credenziali non valide\",\n privacyAndTosDisclaimer: \"Accetto le <0>Condizioni del servizio e dichiaro di aver preso visione dell'<1>Informativa privacy\"\n },\n customerVerification: {\n title: {\n line1: \"INSERISCI IL CODICE CHE\",\n line2: \"HAI RICEVUTO\",\n line2email: \"HAI RICEVUTO VIA E-MAIL\",\n line2mobile: \"HAI RICEVUTO VIA CELLULARE\"\n },\n otpCode: \"Codice OTP\",\n noOtpCodeReceivedInfo: \"Non hai ricevuto il codice? Richiedi un nuovo invio\",\n enterOtpCode: \"Inserisci il codice OTP\",\n otpSent: \"OTP Inviato\",\n },\n paymentMethodSave: {\n title: \"Autorizza\",\n },\n paymentMethodList: {\n title: \"Seleziona metodo di pagamento\",\n card: \"CARTA DI CREDITO/DEBITO\",\n account: \"CONTO CORRENTE\",\n expiry: \"Scadenza\",\n modal: {\n info: \"Conferma\"\n },\n onItem: 'Nessun metodo di pagamento trovato.'\n },\n paymentMethodAdd: {\n title: \"INSERISCI I DATI DELLA CARTA DA ASSOCIARE A QUESTA TIPOLOGIA DI PAGAMENTI\",\n cardNumber: \"Numero della carta:\",\n expiration: \"Data di scadenza (MM/AA):\",\n cvv: \"CVV:\"\n },\n thankYou: {\n title: 'GRAZIE!',\n subtitle: 'PAGAMENTO conclusO con successo!',\n subtitleLink2save: \"Autorizzazione Conclusa con Successo!\",\n orderDetailsLabel: 'RIEPILOGO OPERAZIONE',\n paymentMethodDetailsLabel: 'Carta di Credito / Debito',\n contact: {\n label:'Hai bisogno di informazioni?',\n link: 'Contattaci'\n },\n infoMessage:\"L'addebito sarà visibile nel tuo estratto conto come «TeamSystem Pay»\",\n print:'SCARICA',\n newPayment:'NUOVO PAGAMENTO',\n transactionCode:'NUMERO OPERAZIONE: '\n },\n tspayDetail: {\n info: \"Non conosci TS Pay?\",\n urlInfo: \"Clicca qui per maggiori informazioni\"\n },\n netAmountChargePdf: {\n info: '*Incluso costo operazione di',\n url: '(Termini e condizioni)'\n }\n },\n paymentMethod: {\n email: \"Email\",\n name: \"Nome\",\n card: \"Carta\",\n cardDesc: \"Carta di credito o debito\",\n sepaDebit: \"IBAN\",\n sepaDebitDesc: \"Addebito diretto in conto\",\n pisDesc: \"Bonifico istantaneo\",\n sepaDebitTitle: \"Il tuo IBAN\",\n saveCard: \"Salva la carta per pagamenti futuri (opzionale)\",\n saveSepaDebit: \"Salva l’IBAN per pagamenti futuri (opzionale)\",\n cardNumber: \"Numero della carta\",\n cardExpiry: \"Scadenza\",\n cardCvc: \"CVV\",\n selectPayMethod: \"Seleziona un metodo di pagamento\",\n // declaimer: \"By providing your IBAN and confirming this payment, you are authorizing Rocketship Inc. and Stripe, our payment service provider, to send instructions to your bank to debit your account and your bank to debit your account in accordance with those instructions. You are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited.\"\n Link2Save: {\n declaimer: \"Inserendo il tuo codice IBAN e confermando questa operazione stai conferendo il mandato ed autorizzando TeamSystem Payments S.r.l. ad inviare istruzioni alla tua banca per l’addebito dell’importo concordato e stai autorizzando la tua banca ad addebitare sul tuo conto il suddetto importo conformemente alle istruzioni impartite da TeamSystem Payments S.r.l.. Puoi richiedere il rimborso dell’importo alla tua banca secondo i termini e le condizioni sottoscritti con quest’ultima. La richiesta di rimborso deve essere inoltrata alla tua banca entro 8 otto settimane dalla data di addebito sul conto.\",\n declaimerBottom: 'TeamSystem Pay utilizza sistemi avanzati di antifrode per garantire la sicurezza delle operazioni. I dati devono essere inseriti dal titolare del conto o da personale autorizzato. Ogni abuso sarà perseguito a norma di legge.'\n },\n Link2Pay: {\n declaimer: \"Inserendo il tuo codice IBAN e confermando questa operazione stai conferendo il mandato ed autorizzando TeamSystem Payments S.r.l. ad inviare istruzioni alla tua banca per l’addebito dell’importo concordato e stai autorizzando la tua banca ad addebitare sul tuo conto il suddetto importo conformemente alle istruzioni impartite da TeamSystem Payments S.r.l.. Puoi richiedere il rimborso dell’importo alla tua banca secondo i termini e le condizioni sottoscritti con quest’ultima. La richiesta di rimborso deve essere inoltrata alla tua banca entro 8 otto settimane dalla data di addebito sul conto.\",\n declaimerBottom: 'TeamSystem Pay utilizza sistemi avanzati di antifrode per garantire la sicurezza delle operazioni. I dati devono essere inseriti dal titolare del conto o da personale autorizzato. Ogni abuso sarà perseguito a norma di legge.'\n }\n },\n chargePaymentRefInput : {\n placeholder: \"Inserisci il motivo del pagamento\"\n },\n customerNameInput : {\n label: \"Nome associato al conto\",\n placeholder: \"Inserisci l'intestatario del conto corrente\"\n },\n customerAddressInput : {\n label: \"Indirizzo\",\n placeholder: \"Inserisci l'indirizzo\"\n },\n tabs: {\n card: \"CARTA DI CREDITO\",\n sepa_debit: \"IBAN\"\n },\n accordion: {\n card: \"CARTA DI CREDITO / DEBITO\",\n sepa_debit: \"IBAN (ADDEBITO DIRETTO)\"\n },\n thankYou: {\n info: \"Grazie\"\n },\n removeModal: {\n header: 'CONFERMA ELIMINAZIONE',\n info: \"Sei sicuro di voler eliminare il metodo di pagamento dal wallet?\"\n },\n loading: \"Attendi, stai per essere reindirizzato. Non chiudere questa pagina.\",\n pisModal:{\n title:\"Bonifico istantaneo\",\n condition:\"Condizioni e costi del servizio:\",\n listOne:\"TeamSystem Payments non applica alcuna commissione aggiuntiva a quella eventualmente prevista dalla tua banca per l’esecuzione del bonifico istantaneo;\",\n listTwo:\"Una volta confermato, l'ordine di pagamento non può essere revocato;\",\n listThree:\"Per motivi di sicurezza, è richiesta l’autenticazione presso la tua banca.\",\n tec:\"Accetto i Termini e le Condizioni del servizio e l’Informativa Privacy di TeamSystem Payments.\"\n },\n tooltip: {\n saveCard: {\n header: \"Come funziona?\",\n content: \"Selezionando questa opzione scegli di memorizzare il metodo di pagamento indicato, in modo da poterlo riutilizzare in maniera rapida e sicura nelle future operazioni con TeamSystem Pay.\"\n },\n saveSepaDebit: {\n header: \"Come funziona?\",\n content: \"Selezionando questa opzione scegli di memorizzare il metodo di pagamento indicato, in modo da poterlo riutilizzare in maniera rapida e sicura nelle future operazioni con TeamSystem Pay.\"\n },\n customerVerification: {\n header: \"OTP\",\n content: \"OTP (One Time Password) indica una password “usa e getta” inviata via email o SMS che viene generata al momento ed è utilizzabile una sola volta.\\n\\nL’inserimento del codice OTP è necessario per autorizzare l’operazione richiesta in maniera sicura.\"\n },\n dateInput: {\n header: \"Data fine autorizzazione\",\n content: \"Puoi decidere fino a quando l'autorizzazione sarà valida. Se non lo fai, non è prevista una scadenza\",\n },\n paymentSchedulePlan: {\n header: \"Data originale di pagamento:\"\n }\n },\n error: {\n unknown: \"Spiacente, si è verificato un errore. Ti preghiamo di riprovare.\",\n noOrderKey: \"Ordine non trovato\",\n noCallbackUrl: \"Spiacente, si è verificato un errore durante il redirect. Ti preghiamo di riprovare.\",\n invalidOtpCode: \"Il codice OTP inserito non è corretto\",\n invalidSepaDebit: \"Il tuo IBAN non è supportato\",\n invalidCard: \"La tua carta non è supportata\",\n invalidBrand: \"Il circuito di pagamento di questa carta non è supportato\",\n invalidFundingType: \"La tipologia di carta non è supportata\",\n invalidMobileNo: \"Il numero di telefono inserito non è corretto\",\n orderExpired: \"Questo ordine è scaduto\"\n }\n};\n","import { ITspaySettings } from \"../model/ITspaySettings\";\n\nexport const QUERY_PARAM = '_d';\n\n// queryString util\nfunction encodeToBase64Url(value: string) { \n return btoa(value).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n}\n\nfunction decodeFromBase64Url(value: string) {\n return atob(value.replace(/-/g, '+').replace(/_/g, '/'));\n}\n\nexport function getQueryParams(): ITspaySettings | undefined {\n const search = window.location.search;\n const params = new URLSearchParams(search);\n const query = params.get(QUERY_PARAM);\n if (query) {\n try {\n return JSON.parse(decodeFromBase64Url(query));\n } catch (e) {\n return undefined;\n }\n }\n}\n\nexport function addQueryParams(baseUrl: string, tspaySetting: ITspaySettings): string {\n const search = window.location.search;\n const params = new URLSearchParams(search);\n params.set(QUERY_PARAM, encodeToBase64Url(JSON.stringify(tspaySetting)));\n return`${baseUrl}?${params}`;\n}","export const curriedCompare =\n (staticComparator: T) =>\n (comparator?: T) =>\n staticComparator === comparator;\n","import { curriedCompare } from \"./curriedCompare\";\n\nconst orderTypes = ['payme', 'link2save', 'link2pay'];\n\nexport const [isPayme, isLink2Save, isLink2Pay] = orderTypes.map(curriedCompare);\n","import { IOrder } from \"../model/IOrder\";\nimport { hasAndItsFilled } from \"./has\";\n\nconst keysToSearch: (keyof IOrder)[] = [\n \"plan\",\n \"confirmationPageNote\",\n \"contactRequest\",\n];\n\nexport const [hasPlan, hasConfirmationPageNote, hasContactRequest] = keysToSearch.map(\n (key) => hasAndItsFilled(key),\n);\n\n","export const has = (param: keyof T) => (obj: T): boolean => {\n return param in obj;\n};\n\nexport const hasAndItsFilled = (param: keyof T) => (obj: T): boolean => {\n return !!obj?.[param];\n};\n\n","export const elementCount = (lenghtToFind: number) => (x?: Array) => {\n return x?.length === lenghtToFind;\n};\n\nconst lengths = [1];\n\nexport const [arrayHasExactlyOneElement] = lengths.map(elementCount);\n\n","import { PaymentMethodType } from \"../model/PaymentMethodType\";\nimport { curriedCompare } from \"./curriedCompare\";\n\nconst orderTypes: PaymentMethodType[] = [PaymentMethodType.PIS_CHARGE];\n\nexport const [isPisCharge] = orderTypes.map(curriedCompare)\n\n","import errorMapping from './pay-webapp-error-mapping.json';\nimport { render as mustacheRender } from \"mustache\";\nimport { DEFAULT_LOCALE, LanguageLocale } from '../constants/locales';\nimport { PaymentMethodType } from '../model/PaymentMethodType';\nimport { IOrder } from '../model/IOrder';\nimport { ITspaySettings } from '../model/ITspaySettings';\nimport store from '../store';\nimport { addQueryParams } from '../utils/queryStringUtils';\nimport { arrayHasExactlyOneElement, hasConfirmationPageNote, hasContactRequest, hasPlan, isLink2Save, isPayme } from '../functions';\n\n/**\n * A Basic interface used to define a JSON object type. The key\n * difference to `Any` type is that the key must be a string\n */\nexport interface IJson {\n [key: string]: any;\n}\n\ninterface IConfig {\n dataUrl: string;\n stripe: {\n apiVersion: string;\n }\n}\n\nconst defaultConfig = {\n decimal: 2,\n decimalSign: ',',\n showCurrency: true\n};\n\nconst englishConfig = {\n decimalSign: '.',\n}\n\nexport interface IPriceConverterConfig {\n decimal: number;\n decimalSign: string;\n showCurrency: boolean;\n}\n\n// $APP_CONFIG loaded in index.html\nexport type WindowWithCustomAppConfig = Window & {\n $APP_CONFIG?: {\n /**\n * if true will display test/iban cards\n */\n displayTestCard?: boolean,\n /**\n * home url webapp page\n */\n homeWebappUrl?: string,\n /**\n * stp url webapp page\n */\n stpWebappUrl?: string,\n /**\n * pp url webapp page\n */\n ppWebappUrl?: string,\n /**\n * cko url webapp page\n */\n ckoWebappUrl?: string,\n /**\n * cbi url webapp page\n */\n cbiWebappUrl?: string, \n /**\n * allow to change dashboard url displayed in /api-key-activated page\n */\n dashboardUrl?: string,\n /**\n * gainsight analytics Id\n */\n gainsightId?: string,\n\n /**\n * privacy policy url\n */\n privacyPolicyUrl: string,\n\n /**\n * terms of service url\n */\n termsOfServiceUrl: string,\n\n /**\n * informational pdf url\n */\n informationalPdfUrl: string\n },\n /**\n * function for theme\n */\n applyTheme?: (...args: any[])=>void\n};\n\nexport function Config(): IConfig {\n return {\n dataUrl: '/d/web',\n stripe: {\n apiVersion: '2020-08-27'\n }\n }\n}\n\n/**\n * from language locale get a clean generic locale\n * e.g. from en-US returns en\n */\nexport function getGenericLocale(langLocale: LanguageLocale | string) {\n let cleanLocale = langLocale.split('-')?.[0]?.toLowerCase() || DEFAULT_LOCALE;\n if (\n cleanLocale !== 'en' &&\n cleanLocale !== 'it'\n ) {\n cleanLocale = DEFAULT_LOCALE;\n }\n\n return cleanLocale as 'en' | 'it';\n}\n\n/**\n * by providing an errorKey and errorMessagePayload returned translated\n * error based on langLocale used\n */\nexport function getTranslatedError(\n languageLocale: (LanguageLocale | string),\n errorKey: string,\n payload: IJson = {}\n) {\n const availableErrors = errorMapping;\n\n // check if we have a matching of errorKey\n if (\n !(errorKey in availableErrors)\n ) {\n return undefined;\n }\n\n // ~~~ matching errorKey found, going to translate the message\n const matchError = availableErrors[errorKey as keyof typeof availableErrors];\n\n console.log('matching error found', matchError);\n\n // get only the initial generic lang prefix (e.g. en / it)\n const locale = getGenericLocale(languageLocale);\n\n // add extra checks for infering/ts\n const templateMessage = locale in matchError.message ? matchError.message[locale as 'en'] : matchError.message.en;\n const description = locale in matchError.description ? matchError.description[locale as 'en'] : matchError.description.en;\n\n const renderedMessage = mustacheRender(templateMessage, payload);\n\n return {\n raw: matchError,\n message: renderedMessage,\n description: description ? description : undefined\n }\n}\n\nexport function getPriceConverterConfigFromLanguage(selectedLang?: LanguageLocale, inputConfig?: IPriceConverterConfig): IPriceConverterConfig {\n const deepCopyConfig = JSON.parse(JSON.stringify(defaultConfig));\n let config: IPriceConverterConfig = deepCopyConfig;\n\n if (!inputConfig) {\n config = deepCopyConfig;\n } else {\n if(!inputConfig.decimal) {\n config['decimal'] = deepCopyConfig['decimal'];\n }\n if (!inputConfig.decimalSign) {\n config['decimalSign'] = deepCopyConfig['decimalSign'];\n }\n if(!inputConfig.decimal) {\n config['showCurrency'] = deepCopyConfig['showCurrency'];\n }\n }\n\n // if language used is english must use . as decimal sign\n // ref https://gitlab.com/tspay/pay-webapp/-/issues/78\n if (selectedLang === LanguageLocale.EN) {\n config['decimalSign'] = englishConfig.decimalSign;\n }\n\n return config;\n}\n\n/**\n * if a paymethod is included in both acquirer, cko has the priority\n */ \nexport function getRedirectFromAcquirerAvailableForPayMethod(order: IOrder, payMethod: PaymentMethodType, requiredAcquirer?: string): string {\n const stpAcquirerConfig = order.acquire?.stp;\n const ppAcquirerConfig = order.acquire?.pp;\n const ckoAcquirerConfig = order.acquire?.cko;\n const cbiAcquirerConfig = order.acquire?.cbi;\n\n let acquirerRedirect = null;\n \n // When requiredAcquirer is set force redirect to that specific acquirer\n if(\n requiredAcquirer === 'stp' ||\n (stpAcquirerConfig && stpAcquirerConfig.payMethod?.includes(payMethod))\n ) {\n const APP_CONFIG = (window as WindowWithCustomAppConfig).$APP_CONFIG;\n const stpWebappUrl = APP_CONFIG?.stpWebappUrl;\n acquirerRedirect = `${stpWebappUrl}/stp`;\n }\n \n if(\n requiredAcquirer === 'pp' ||\n (ppAcquirerConfig && ppAcquirerConfig.payMethod?.includes(payMethod))\n ) {\n const APP_CONFIG = (window as WindowWithCustomAppConfig).$APP_CONFIG;\n const ppWebappUrl = APP_CONFIG?.ppWebappUrl;\n acquirerRedirect = `${ppWebappUrl}/pp`;\n }\n\n if(\n requiredAcquirer === 'cko' ||\n (ckoAcquirerConfig && ckoAcquirerConfig.payMethod?.includes(payMethod))\n ) {\n const APP_CONFIG = (window as WindowWithCustomAppConfig).$APP_CONFIG;\n const ckoWebappUrl = APP_CONFIG?.ckoWebappUrl;\n acquirerRedirect = `${ckoWebappUrl}/cko`;\n }\n\n if(\n requiredAcquirer === 'cbi' ||\n (cbiAcquirerConfig && cbiAcquirerConfig.payMethod?.includes(payMethod))\n ) {\n const APP_CONFIG = (window as WindowWithCustomAppConfig).$APP_CONFIG;\n const cbiWebappUrl = APP_CONFIG?.cbiWebappUrl;\n acquirerRedirect = `${cbiWebappUrl}/cbi`;\n }\n\n if(!acquirerRedirect) {\n throw new Error(\"Invalid paymethod acquirer\");\n }\n\n return acquirerRedirect;\n}\n\nexport function navigateToAcquirerDedicateWebApp(order:IOrder, payMethodType: PaymentMethodType, requiredAcquirer?: string) {\n const acquirerRedirect = getRedirectFromAcquirerAvailableForPayMethod(order, payMethodType, requiredAcquirer);\n \n //TODO: Remove this, to use just window.location.pathname, when PayMeC is deprecated\n var formatterPathName = window.location.pathname\n if(order.type === 'payme') {\n formatterPathName = `/payMe/${order.orderKey}`;\n }\n\n let hrefUrl = `${acquirerRedirect}/${payMethodType}${formatterPathName}`\n\n const linkSlice = store.getState().linkData;\n const sageSlice = store.getState().saga;\n const lang = sageSlice.language;\n const contactEmail = linkSlice.contactEmail;\n const validUntil = linkSlice.validUntil;\n const payMeOrderAmount = linkSlice.payMeOrderAmount;\n const chargePaymentRef = linkSlice.chargePaymentRef;\n\n let tspaySetting: ITspaySettings | undefined = undefined;\n if(lang || contactEmail || validUntil || payMeOrderAmount || chargePaymentRef) {\n tspaySetting = {};\n if(lang) {\n tspaySetting.lang = lang;\n }\n if(contactEmail) {\n tspaySetting.e = contactEmail;\n }\n if(validUntil) {\n tspaySetting.vu = validUntil;\n }\n if(payMeOrderAmount) {\n tspaySetting.poa = payMeOrderAmount;\n }\n if(chargePaymentRef) {\n tspaySetting.cpr = chargePaymentRef;\n }\n }\n\n if(tspaySetting) {\n hrefUrl = addQueryParams(hrefUrl, tspaySetting);\n }\n\n window.location.href = hrefUrl;\n}\n\n\n/**\n * Determines whether the home page should be skipped based on the given order.\n * \n * @param {IOrder} order - The order object to evaluate.\n * @returns {boolean} - Returns true if the home page should be skipped, otherwise false.\n */\nexport const shouldSkipHome = (order: IOrder): boolean => {\n // If the order has a confirmation page note, do not skip the home page.\n if (hasConfirmationPageNote(order)) {\n return false;\n }\n\n // If the order has a contact request, do not skip the home page.\n if (hasContactRequest(order)) {\n return false;\n }\n\n // If the order type is Link2Save and it has a plan, do not skip the home page.\n if (isLink2Save(order?.type)) {\n if (hasPlan(order)) {\n return false;\n }\n }\n\n // If the order type is Payme, do not skip the home page.\n if (isPayme(order?.type)) {\n return false;\n }\n\n // If the order has exactly one source type and it is a PIS charge, do not skip the home page.\n if (arrayHasExactlyOneElement(order?.sourceTypes)) {\n if (order?.sourceTypes?.includes(PaymentMethodType.PIS_CHARGE)) {\n return false;\n }\n // If the order has exactly one source type and it is not a PIS charge, skip the home page.\n return true;\n }\n\n // By default, do not skip the home page.\n return false;\n};\n\nexport const redirectToPayMethodWebappIfRequired = (order: IOrder) => {\n if(shouldSkipHome(order)) {\n const [ payMethodType ] = order?.sourceTypes || [];\n navigateToAcquirerDedicateWebApp(order, payMethodType);\n }\n }\n","export enum LinkStep {\n PaymentDetails = \"PaymentDetails\",\n PaymentMethodList = \"PaymentMethodList\",\n PaymentMethodAdd = \"PaymentMethodAdd\",\n Error = \"Error\",\n Redirect = \"Redirect\"\n}\n","export enum ErrorType {\n Stripe = 'stripe',\n Internal = 'internal',\n RestApi = ' restApi',\n}\n\nexport interface IError {\n message?: string;\n type: ErrorType;\n customErrorTitle?: string;\n errorDetails?: {\n declineCode?: string;\n errorKey?: string;\n description?: string;\n }\n}","import {injectable} from 'inversify';\nimport store from '../store';\nimport {changeActiveStep, changeError} from '../store/reducers/sagaSlice';\nimport {changeRedirectData} from '../store/reducers/linkDataSlice';\nimport {LinkStep} from '../model/LinkStep';\nimport {ErrorType} from '../model/IError';\nimport {getGenericLocale, getTranslatedError, IJson} from '../core';\nimport stripeDeclineCode from '../core/stripe-decline-code.json';\nimport {DEFAULT_LOCALE} from '../constants/locales';\n\nexport interface IErrorHandlerService {\n handleStripeError(error: any, intentId: string, expectKey?: string): void;\n handleInternalError(message: string): void;\n handleRestApiError(error: any): void;\n}\n\n@injectable()\nexport class ErrorHandlerService implements IErrorHandlerService {\n\n handleStripeError(error: any, intentId: string, expectKey?: string): void {\n console.log(error);\n\n // if (error.code) {\n // store.dispatch(changeRedirectData({\n // state: error.code,\n // stripeId: intentId,\n // }));\n // } else {\n store.dispatch(changeRedirectData({\n state: 'expectation_error',\n stripeId: intentId,\n expectKey,\n }));\n // }\n\n this.changeAndTranslateError(error)\n }\n\n handleGenericError(error: any, canceled: boolean = false): void {\n store.dispatch(changeRedirectData({\n state: 'expectation_error',\n stripeId: 'stripeId',\n canceled: canceled\n }));\n\n this.changeAndTranslateError(error, false);\n }\n\n changeAndTranslateError(error: any, stripeError: boolean = true): void {\n\n // try to get translated italian message from composed stripe error key\n let errorKey = undefined;\n if(stripeError) {\n errorKey = typeof error?.code === 'string' ? `STP_${error.code.toUpperCase()}` : undefined;\n } else {\n errorKey = typeof error?.code === 'string' ? `${error.code.toUpperCase()}` : undefined;\n }\n\n let message: string | undefined;\n\n if (typeof errorKey === 'string') {\n const errorFound = this.getTranslatedError(errorKey);\n message = errorFound?.message;\n }\n\n let declineErrorTranslatedFromStripe = undefined;\n let declineErrorTranslatedGeneric = undefined;\n \n if(typeof error?.decline_code === 'string'){\n declineErrorTranslatedFromStripe = this.getTranslatedDecline(error.decline_code)\n }\n\n if(!declineErrorTranslatedFromStripe && errorKey){\n const locale = this.getActiveLocale();\n declineErrorTranslatedGeneric = getTranslatedError(\n locale,\n errorKey,\n );\n }\n store.dispatch(changeError({\n message,\n type: stripeError ? ErrorType.Stripe : ErrorType.Internal,\n errorDetails: {\n errorKey,\n description: declineErrorTranslatedFromStripe?.description ? declineErrorTranslatedFromStripe.description : declineErrorTranslatedGeneric?.description,\n declineCode: error?.decline_code,\n }\n }));\n store.dispatch(changeActiveStep(LinkStep.Error));\n }\n\n handleInternalError(message: string): void {\n console.log(message);\n\n store.dispatch(changeError({\n // this message is not translated, cannot pass it to the error page\n // message: message,\n message: undefined,\n type: ErrorType.Internal,\n }));\n store.dispatch(changeActiveStep(LinkStep.Error));\n }\n\n /**\n * get active locale based on state\n */\n getActiveLocale() {\n const currentState = store.getState();\n\n return getGenericLocale(currentState?.saga?.language || DEFAULT_LOCALE);\n }\n\n /**\n * get translated decline payload based on langLocale used\n */\n getTranslatedDecline(declineCode: string) {\n const availableDeclineCodeList = stripeDeclineCode;\n\n // find matching decline\n const matchingDecline = availableDeclineCodeList.find((d) => d.code === declineCode);\n if (!matchingDecline) {\n return undefined;\n }\n\n // get active locale\n const locale = this.getActiveLocale();\n\n // translate also nextStep\n let nextStep: string | undefined;\n if (\n typeof matchingDecline?.nextStep === 'object' &&\n locale in matchingDecline.nextStep &&\n matchingDecline.nextStep[locale] !== ''\n ) {\n nextStep = matchingDecline.nextStep[locale]\n }\n\n return {\n raw: matchingDecline,\n code: declineCode,\n description: matchingDecline.description[locale],\n nextStep, \n }\n\n }\n\n /**\n * by providing an errorKey and errorMessagePayload returned translated\n * error based on langLocale used\n */\n getTranslatedError(errorKey: string, payload: IJson = {}) {\n const locale = this.getActiveLocale();\n return getTranslatedError(\n locale,\n errorKey,\n payload,\n );\n /*\n const availableErrors = errorMapping;\n\n // check if we have a matching of errorKey\n if (\n !(errorKey in availableErrors)\n ) {\n return undefined;\n }\n\n // ~~~ matching errorKey found, going to translate the message\n const matchError = availableErrors[errorKey as keyof typeof availableErrors];\n\n console.log('matching error found', matchError);\n\n const locale = this.getActiveLocale();\n\n // add extra checks for infering/ts\n const templateMessage = locale in matchError.message ? matchError.message[locale as 'en'] : matchError.message.en;\n\n\n const renderedMessage = mustacheRender(templateMessage, payload);\n\n return {\n raw: matchError,\n message: renderedMessage,\n }*/\n }\n\n handleRestApiError(error: any): void {\n console.log('handle REST API error', error)\n console.log(error.response.data);\n\n const errorKey: string | undefined = error?.response?.data?.errorKey;\n const errorMessagePayload: IJson | undefined = error?.response?.data?.errorMessagePayload ? error?.response?.data?.errorMessagePayload : error?.response?.data?.payload ? error?.response?.data?.payload : undefined;\n\n const translatedError = typeof errorKey === 'string' ?\n this.getTranslatedError(errorKey, errorMessagePayload) :\n this.getTranslatedError(\"PW_GENERIC_ERROR\");\n\n // set translated error if present or fallback to generic one\n let message: string = typeof translatedError?.message === 'string' ?\n translatedError.message : 'Spiacente, si è verificato un errore. Ti preghiamo di riprovare.';\n \n // if customErrorTitle is undefined the error title won't be shown\n // if customErrorTitle is populalted with a string it will be used as custom error title\n let customErrorTitle: string | undefined;\n\n /*\n // OLD CODE START\n // ~~~ legacy error code managing\n // customize displayed error message based on errorType (if recevied)\n switch(error?.response?.data?.errorType) {\n case 'ExceededPaymentAllocationException':\n case 'LinkAlreadyExecutedError':\n message = 'Grazie, hai già effettuato questo pagamento.'\n break;\n case 'LinkExpiredError':\n case 'LinkExpiredException':\n message = 'Spiacente, questo link non è più utilizzabile.'\n break;\n // fallback to this message if unknown error type\n default:\n message = 'Spiacente, si è verificato un errore. Ti preghiamo di riprovare.'\n break;\n }\n\n // ~~~ overwrite error message based on new errorKey\n // customize displayed error message based on errorKey (if recevied)\n switch(error?.response?.data?.errorKey) {\n case 'CHARGE_ORDER_MAX_NUMBER_EXCEEDED':\n case 'LINK2PAY_ALREADY_EXECUTED':\n message = 'Grazie, hai già effettuato questo pagamento.'\n break;\n case 'SOURCE_ORDER_MAX_AMOUNT_EXCEEDED':\n case 'SOURCE_ORDER_MAX_NUMBER_EXCEEDED':\n case 'LINK2SAVE_ALREADY_EXECUTED':\n message = 'Hai raggiunto il numero massimo di utilizzi per il link.'\n break;\n default:\n break;\n }\n // END OLD CODE\n */\n\n store.dispatch(changeError({\n message: message,\n type: ErrorType.RestApi,\n customErrorTitle,\n }));\n store.dispatch(changeActiveStep(LinkStep.Error));\n }\n}\n","import {inject, injectable} from 'inversify';\nimport axios, {AxiosResponse} from 'axios';\nimport {IJson, Config} from '../../core';\nimport {from, Observable, of, throwError} from 'rxjs';\nimport {catchError, first, filter} from 'rxjs/operators';\nimport {ErrorHandlerService} from '../errorHandlerService';\nimport type {IErrorHandlerService} from '../errorHandlerService';\n\n/**\n * A Simple Rest Service interface exposing only get method\n */\nexport interface IRestGetService {\n get(url: string): Observable;\n post(url: string, data: IJson): Observable;\n put(url: string, data: IJson): Observable;\n delete(url: string): Observable;\n query(url?: string): Observable | null>;\n}\n\n@injectable()\nexport abstract class AbstractRestGetService implements IRestGetService {\n\n abstract rootUrl: string;\n\n @inject(ErrorHandlerService) protected errorHandler: IErrorHandlerService;\n\n private config = Config();\n\n post(url: string, data: IJson): Observable {\n const resp = axios.post(this.getUrl(url), data);\n return this.createResponse(resp);\n }\n\n put(url: string, data: IJson): Observable {\n const resp = axios.put(this.getUrl(url), data);\n return this.createResponse(resp);\n }\n\n get(url: string): Observable {\n const resp = axios.get(this.getUrl(url));\n return this.createResponse(resp);\n }\n\n query(url: string = '/'): Observable | null> {\n const resp = axios.get>(this.getUrl(url));\n return this.createResponse>(resp);\n }\n\n delete(url: string): Observable {\n const resp = axios.delete(this.getUrl(url));\n return this.createResponse(resp);\n }\n\n /**\n * Generate url for given resource\n *\n * @param url \n */\n protected getUrl(url: string = ''): string {\n //TODO: this is just an hotfix, remove it\n let dataUrl = this.config.dataUrl;\n if(url.startsWith('stp/')) {\n dataUrl = dataUrl.replace('/web','/stp');\n url = url.replace('stp/','');\n }\n return dataUrl + this.rootUrl + url;\n }\n\n /**\n * Wrapper allowing the response to be used as react hook\n * @param resp \n */\n protected createResponse(response: Promise): Observable {\n const p = response.then(resp => resp.data as O);\n return from(p).pipe(\n first(),\n catchError((httpError: any) => {\n // if error key is RATE_LIMIT use a custom error handling\n // on the UI\n // ref https://gitlab.com/tspay/pay-webapp/-/issues/80\n if (\n httpError &&\n httpError?.response?.data &&\n httpError?.response?.data?.errorKey === 'RATE_LIMIT'\n ) {\n // throw throwError(httpError);\n httpError.error = true;\n return Promise.resolve(httpError);\n }\n\n this.errorHandler.handleRestApiError(httpError);\n return of(null);\n }),\n filter((e: any) => !!e)\n )\n }\n}\n","import {IJson} from '../../core';\nimport { AbstractRestGetService } from './base';\nimport {ITargetRequest, IValidationRequest} from '../../model/IVerification';\nimport {Observable} from 'rxjs';\n\nexport interface IAuthenticationDaoService {\n // VerificationRequest(data: ITargetRequest): Observable;\n // VerificationValidation(data: any): Observable;\n TOTPRequest(data: ITargetRequest): Observable;\n TOTPValidation(data: IValidationRequest): Observable;\n}\n\nexport class AuthenticationDaoService extends AbstractRestGetService implements IAuthenticationDaoService {\n rootUrl: string = '/authentication';\n\n TOTPRequest(data: ITargetRequest): Observable {\n return this.put('/', {\n type: 'TOTPRequest',\n data: data\n })\n }\n\n TOTPValidation(data: IValidationRequest): Observable {\n return this.put('/', {\n type: 'TOTPValidation',\n data: data\n })\n }\n}\n","import {IJson} from '../../core';\nimport { AbstractRestGetService } from './base';\nimport {Observable} from 'rxjs';\nimport {inject} from 'inversify';\nimport {ErrorHandlerService, IErrorHandlerService} from '../errorHandlerService';\nimport {ICustomerCreate} from '../../model/ICustomer';\n\nexport interface ICustomerDaoService {\n create(data: ICustomerCreate): Observable;\n}\n\nexport class CustomerDaoService extends AbstractRestGetService implements ICustomerDaoService {\n rootUrl: string = '/customer';\n\n create(data: ICustomerCreate): Observable {\n return this.post('/', data)\n }\n}\n","import {IJson} from '../../core';\nimport {AbstractRestGetService} from './base';\nimport {Observable} from 'rxjs';\nimport {IConfirmIntent, ICreateExpect} from '../../model/IExpect';\n\nexport interface ILink2PayDaoService {\n retrieveOrder(orderKey: string): Observable;\n createPaymentIntent(data: ICreateExpect): Observable;\n confirmPaymentIntent(data: IConfirmIntent, chargeKey: string): Observable;\n}\n\nexport class Link2PayDaoService extends AbstractRestGetService implements ILink2PayDaoService {\n rootUrl: string = '/link2Pay/';\n\n retrieveOrder(orderKey: string): Observable {\n return this.get(orderKey);\n }\n\n createPaymentIntent(data: ICreateExpect): Observable {\n return this.post(`${data.orderKey}/expect`, data);\n }\n\n confirmPaymentIntent(data: IConfirmIntent, chargeKey: string): Observable {\n return this.put(`${data.orderKey}/expect/${chargeKey}`, data);\n }\n}\n","import {IJson} from '../../core';\nimport {AbstractRestGetService} from './base';\nimport {ICreateExpect, IConfirmExpect} from '../../model/IExpect';\nimport {Observable} from 'rxjs';\n\nexport interface ILink2SaveDaoService {\n retrieveOrder(orderKey: string): Observable;\n createExpect(data: ICreateExpect): Observable;\n confirmExpect(data: IConfirmExpect, expectKey: string): Observable;\n}\n\nexport class Link2SaveDaoService extends AbstractRestGetService implements ILink2SaveDaoService {\n rootUrl: string = '/link2Save/';\n\n retrieveOrder(orderKey: string): Observable {\n return this.get(orderKey);\n }\n\n createExpect(data: ICreateExpect): Observable {\n return this.post('expect', data);\n }\n\n confirmExpect(data: IConfirmExpect, expectKey: string): Observable {\n return this.put(`expect/${expectKey}`, data);\n }\n}\n","import {IJson} from '../../core';\nimport {AbstractRestGetService} from './base';\nimport {Observable} from 'rxjs';\nimport {IConfirmExpect, ICreateExpect, ICreateExpectForPayMe} from '../../model/IExpect';\n\nexport interface IPayMeDaoService {\n retrieveOrder(orderKey: string): Observable;\n createPaymentIntent(data: ICreateExpect): Observable;\n confirmPaymentIntent(data: IConfirmExpect, chargeKey: string): Observable;\n}\n\nexport class PayMeDaoService extends AbstractRestGetService implements IPayMeDaoService {\n rootUrl: string = '/payme/';\n\n retrieveOrder(orderKey: string): Observable {\n return this.get(orderKey);\n }\n\n //TODO: remove stp here!!\n createPaymentIntent(data: ICreateExpectForPayMe): Observable {\n return this.post(`stp/${data.orderKey}/intent`, data);\n }\n\n confirmPaymentIntent(data: any, chargeKey: string): Observable {\n return this.put(`stp/${data.orderKey}/intent/${chargeKey}`, data);\n }\n}\n","import {IJson} from '../../core';\nimport { AbstractRestGetService } from './base';\nimport {Observable} from 'rxjs';\n\nexport interface IHashDaoService {\n getHash(data: any): Observable;\n}\n\nexport class HashDaoService extends AbstractRestGetService implements IHashDaoService {\n rootUrl: string = '/hash';\n\n getHash(data: any): Observable {\n return this.put('/', data);\n }\n}\n","import {IJson} from '../../core';\nimport { AbstractRestGetService } from './base';\n\nexport class PaypalService extends AbstractRestGetService {\n rootUrl: string = '/paypal/';\n\n createOrder(data: any, orderKey: string) {\n return this.post(`/${orderKey}/order`, data);\n }\n\n getClientToken() {\n return this.get(`token`);\n }\n }\n","import {injectable} from 'inversify';\n\nexport interface ILinkHelperService {\n getTOTPRequestPayload(credential: string): any\n}\n\n@injectable()\nexport class LinkHelperService implements ILinkHelperService {\n\n getTOTPRequestPayload(credential: string): any {\n if (credential[0] === '+') {\n return { mobile: credential }\n } else {\n return { email: credential }\n }\n }\n}\n\n\n","import {inject, injectable} from 'inversify';\nimport {Link2SaveDaoService} from './dao/link2Save';\nimport {LinkStep} from '../model/LinkStep';\nimport {ErrorHandlerService} from './errorHandlerService';\nimport {changeRedirectData} from '../store/reducers/linkDataSlice';\nimport {changeActiveStep} from '../store/reducers/sagaSlice';\nimport store from '../store'\nimport {IConfirmSourceExpect, ICreateExpect, ICreateExpectResp} from '../model/IExpect';\nimport {PaymentMethodType} from '../model/PaymentMethodType';\nimport {first, switchMap, tap} from 'rxjs/operators';\nimport {from, Observable, of} from 'rxjs';\nimport { IPlan } from '../model/IOrder';\nimport type {ILink2SaveDaoService} from './dao/link2Save';\nimport type {IErrorHandlerService} from './errorHandlerService';\n\nexport interface ILink2SaveService {\n //createAndConfirmExpect(stripe: stripeJs.Stripe): Observable;\n}\n\n@injectable()\nexport class Link2SaveService implements ILink2SaveService {\n\n @inject(Link2SaveDaoService) private link2SaveDaoService: ILink2SaveDaoService;\n @inject(ErrorHandlerService) private errorHandlerService: IErrorHandlerService;\n\n public createAndConfirmExpect(/*stripe: stripeJs.Stripe*/): Observable {\n\n const linkSlice = store.getState().linkData;\n\n if (!linkSlice.order || !linkSlice.order.orderKey) {\n this.errorHandlerService.handleInternalError('[Link2SaveService]: Invalid payload data');\n return of(null);\n }\n\n if (!linkSlice.paymentMethod || !linkSlice.paymentMethod.id) {\n this.errorHandlerService.handleInternalError('[Link2SaveService]: Invalid payload data');\n return of(null);\n }\n\n const createExpectPayload: ICreateExpect = {\n orderKey: linkSlice.order.orderKey,\n paymentMethodType: linkSlice.paymentMethodType,\n paymentMethodId: linkSlice.paymentMethod.id,\n savePaymentMethod: linkSlice.savePaymentMethod\n };\n\n if (linkSlice.customerId) {\n createExpectPayload.customerId = linkSlice.customerId;\n }\n\n if (linkSlice.validUntil) {\n createExpectPayload.validUntil = linkSlice.validUntil;\n }\n\n if (linkSlice.contactEmail) {\n createExpectPayload.contactEmail = linkSlice.contactEmail;\n }\n\n const paymentPlan = linkSlice.order?.plan ? {\n recurrent: linkSlice.order.plan.recurrent,\n schedules: linkSlice.order.plan.schedules?.plans,\n oneTime: linkSlice.order.plan.onetime,\n netAmountFlag: linkSlice.order.netAmountFlag\n } as IPlan : undefined;\n\n return this.link2SaveDaoService.createExpect(createExpectPayload).pipe(\n first(),\n switchMap((createExpectResp: any) => {\n switch(linkSlice.paymentMethodType) {\n case PaymentMethodType.CARD:\n return this.confirmPaymentMethod(null, createExpectResp, paymentPlan);\n\n case PaymentMethodType.SEPA_DEBIT:\n return this.confirmPaymentMethod(null, createExpectResp, paymentPlan, createExpectPayload.paymentMethodId);\n\n default:\n this.errorHandlerService.handleInternalError(`[Link2SaveService]: Invalid PaymentMethodType: ${linkSlice.paymentMethodType}`);\n return of(null);\n }\n })\n );\n }\n\n private confirmPaymentMethod(stripeService: any,\n createExpectResp: ICreateExpectResp, paymentPlan?: IPlan, paymentMethodId?: string): Observable {\n\n const optionalParams = paymentMethodId ? { payment_method: paymentMethodId} : undefined;\n\n return from(stripeService(createExpectResp.client_secret, optionalParams)).pipe(\n first(),\n switchMap((stripeServiceResp: any) => {\n\n console.log(\"PaymentPlan: \" + JSON.stringify(paymentPlan));\n const confirmExpectPayload: IConfirmSourceExpect = {\n setupIntentId: createExpectResp.id,\n stripeStatus: stripeServiceResp.error ? 'expectation_error' : stripeServiceResp.setupIntent.status,\n paymentPlan\n };\n\n return this.link2SaveDaoService.confirmExpect(confirmExpectPayload, createExpectResp.expectKey).pipe(\n first(),\n tap((confirmExpectResp: any) => {\n\n if (stripeServiceResp.error) {\n this.errorHandlerService.handleStripeError(\n stripeServiceResp.error,\n createExpectResp.id,\n createExpectResp.expectKey,\n );\n return;\n }\n\n store.dispatch(changeRedirectData({\n expectKey: createExpectResp.expectKey,\n stripeId: createExpectResp.id,\n state: confirmExpectResp.state,\n }));\n\n store.dispatch(changeActiveStep(LinkStep.Redirect));\n }),\n )\n })\n )\n }\n}\n\n\n","import React, {useContext} from 'react';\nimport { Container, interfaces } from 'inversify';\nimport { Store, Action, AnyAction } from 'redux';\nimport { Provider } from 'react-redux';\nimport {RootState} from '../store/reducers';\n\n/**\n * Context use by InjectionReduxProvider for inversify\n */\nconst InversifyContext = React.createContext<{ container: Container | null }>({ container: null });\n\ninterface InjectionReduxProps {\n store: Store;\n container: Container;\n};\n\n\n/**\n * A provider that wrap Redux Provider and create a inversify provider\n * \n * @param props \n */\nexport const InjectionReduxProvider: React.FC = (props) => {\n return (\n \n \n {props.children}\n \n \n );\n};\n\n\n/**\n * A injection hook\n * \n * @param identifier \n */\nexport function useInjection(identifier: interfaces.ServiceIdentifier) {\n const { container } = useContext(InversifyContext);\n if (!container) { throw new Error(); }\n return container.get(identifier);\n};","import { Container } from 'inversify';\nimport {\n AuthenticationDaoService,\n Link2PayDaoService,\n Link2SaveDaoService,\n HashDaoService,\n CustomerDaoService,\n PaypalService,\n PayMeDaoService\n} from '../service/dao';\nimport {\n ErrorHandlerService,\n} from '../service';\n\nexport const container = new Container();\n\ncontainer.bind(ErrorHandlerService).to(ErrorHandlerService).inSingletonScope();\n\ncontainer.bind(Link2PayDaoService).to(Link2PayDaoService).inSingletonScope();\ncontainer.bind(Link2SaveDaoService).to(Link2SaveDaoService).inSingletonScope();\ncontainer.bind(PayMeDaoService).to(PayMeDaoService).inSingletonScope();\ncontainer.bind(AuthenticationDaoService).to(AuthenticationDaoService).inSingletonScope();\ncontainer.bind(CustomerDaoService).to(CustomerDaoService).inSingletonScope();\ncontainer.bind(HashDaoService).to(HashDaoService).inSingletonScope();\ncontainer.bind(PaypalService).to(PaypalService).inSingletonScope();\n\nexport {InjectionReduxProvider, useInjection} from './provider';\n","export enum LinkName {\n Link2Save = \"Link2Save\",\n Link2Pay = \"Link2Pay\",\n PayMe = \"PayMe\"\n}\n","var _path;\n\nvar _excluded = [\"svgRef\", \"title\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar SvgIconOptionCard = function SvgIconOptionCard(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 16,\n height: 13,\n viewBox: \"0 0 16 13\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", null, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14 1.9375H1.75C1.50391 1.9375 1.3125 2.15625 1.3125 2.375V3.25H14.4375V2.375C14.4375 2.15625 14.2188 1.9375 14 1.9375ZM14.4375 5.875H1.3125V11.125C1.3125 11.3711 1.50391 11.5625 1.75 11.5625H14C14.2188 11.5625 14.4375 11.3711 14.4375 11.125V5.875ZM1.75 0.625H14C14.957 0.625 15.75 1.41797 15.75 2.375V11.125C15.75 12.1094 14.957 12.875 14 12.875H1.75C0.765625 12.875 0 12.1094 0 11.125V2.375C0 1.41797 0.765625 0.625 1.75 0.625ZM3.28125 8.9375H4.59375C4.94922 8.9375 5.25 9.23828 5.25 9.59375C5.25 9.97656 4.94922 10.25 4.59375 10.25H3.28125C2.89844 10.25 2.625 9.97656 2.625 9.59375C2.625 9.23828 2.89844 8.9375 3.28125 8.9375ZM6.78125 8.9375H9.84375C10.1992 8.9375 10.5 9.23828 10.5 9.59375C10.5 9.97656 10.1992 10.25 9.84375 10.25H6.78125C6.39844 10.25 6.125 9.97656 6.125 9.59375C6.125 9.23828 6.39844 8.9375 6.78125 8.9375Z\"\n })));\n};\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(SvgIconOptionCard, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/icon-option-card.0a60344a.svg\";\nexport { ForwardRef as ReactComponent };","import * as React from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\ninterface ITranslateProps {\n readonly text: string;\n}\n\nconst Translate = (props: ITranslateProps) => {\n const { t } = useTranslation();\n return {t(props.text)};\n};\n\nexport default Translate;\n","import { RootState } from \"../reducers\";\nimport { createSelector } from \"reselect\";\nimport { ISagaState } from \"../reducers/sagaSlice\";\n\nexport const selectLink = (state: RootState): ISagaState => {\n return state.saga;\n};\n\nexport const activeStepSelector = createSelector(\n [selectLink],\n (state: ISagaState) => state.activeStep\n);\n\nexport const activeLinkNameSelector = createSelector(\n [selectLink],\n (state: ISagaState) => state.activeLinkName\n);\n\nexport const languageSelector = createSelector(\n [selectLink],\n (state: ISagaState) => state.language\n);\n\nexport const flowSelector = createSelector(\n [selectLink],\n (state: ISagaState) => state.flow\n);\n\nexport const errorSelector = createSelector(\n [selectLink],\n (state: ISagaState) => state.error\n);\n","import { RootState } from \"../reducers\";\nimport { createSelector } from \"reselect\";\nimport {ILinkDataState} from '../reducers/linkDataSlice';\n\nexport const selectLink = (state: RootState): ILinkDataState => {\n return state.linkData;\n};\n\nexport const orderSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.order\n);\n\nexport const credentialSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.credential\n);\n\nexport const contactEmailSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.contactEmail\n);\n\nexport const customerNameSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.customerName\n);\n\nexport const customerAddressSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.customerAddress\n);\n\nexport const customerIdSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => {\n // return undefined instead of null if customer id is not set\n if (!state.customerId) {\n return undefined;\n }\n\n return state.customerId;\n }\n);\n\nexport const savePaymentMethodSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.savePaymentMethod\n);\n\nexport const paymentMethodTypeSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.paymentMethodType\n);\n\nexport const paymentMethodSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.paymentMethod\n);\n\nexport const customerPaymentMethodsSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.customerPaymentMethods\n);\n\nexport const redirectDataSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.redirectData\n);\n\nexport const validUntilSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.validUntil\n);\n\nexport const payMeOrderAmountSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.payMeOrderAmount\n);\n\nexport const chargePaymentRefSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.chargePaymentRef\n);\n\nexport const transactionCodeSelector = createSelector(\n [selectLink],\n (state: ILinkDataState) => state.transactionCode\n);","import React, {FC} from 'react';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {orderSelector, redirectDataSelector} from '../../../store/selectors/linkDataSelectors';\nimport {cleanState} from '../../../store/reducers/linkDataSlice';\nimport {IOrder} from '../../../model/IOrder';\nimport {useInjection} from '../../../ioc';\nimport {HashDaoService} from '../../../service/dao';\nimport {RouteComponentProps, withRouter} from \"react-router-dom\";\nimport {activeLinkNameSelector, languageSelector} from '../../../store/selectors/sagaSelectors';\nimport {LinkName} from '../../../model/LinkName';\nimport {Redirect as RouterRedirect} from 'react-router-dom';\nimport {first, tap} from 'rxjs/operators';\nimport { LanguageLocale } from '../../../constants/locales';\nimport Translate from '../../Common/Translate';\n\nexport interface IRedirectProps extends RouteComponentProps {\n order: IOrder | null;\n redirectData: any;\n activeLinkName: LinkName | null;\n cleanState: typeof cleanState;\n activeLanguage: LanguageLocale;\n}\n\nconst Redirect:FC = (props: IRedirectProps) => {\n const hashDaoService = useInjection(HashDaoService);\n const order = props.order as IOrder;\n const now = new Date();\n const timestamp = now.toISOString();\n\n if (!props.redirectData) {\n console.log('No redirect data, show error');\n return ;\n }\n\n // no callbackUrl redirect to thank you\n if (!order.callbackUrl) {\n props.history.push('/thank-you');\n return null;\n }\n\n const getHashPayload: any = {\n orderKey: order.orderKey,\n state: props.redirectData.state,\n expectKey: props.redirectData.expectKey,\n timestamp,\n };\n\n // add selectedLangLocale only if present\n if (typeof props.activeLanguage === 'string') {\n getHashPayload.selectedLangLocale = props.activeLanguage;\n }\n\n hashDaoService.getHash(getHashPayload).pipe(\n first(),\n tap((resp: any) => {\n // no callbackUrl\n if (!order.callbackUrl) {\n props.history.push('/thank-you');\n return;\n }\n\n const token = resp.token;\n // add token as 'data' to callbackUrl\n window.location.href = `${order.callbackUrl}${order.callbackUrl.indexOf(\"?\") === -1 ? \"?\" : \"&\" }data=${token}`;\n\n\n // OLD CODE BELOW\n /*\n const paramsObj: any = {\n timestamp,\n orderKey: order.orderKey,\n hash: resp.hash,\n state: props.redirectData.state,\n };\n\n if (props.redirectData.expectKey) {\n switch(props.activeLinkName) {\n case LinkName.Link2Save:\n paramsObj.sourceKey = props.redirectData.expectKey;\n break;\n case LinkName.Link2Pay:\n paramsObj.chargeKey = props.redirectData.expectKey;\n break;\n }\n }\n\n let urlParams = Object.entries(paramsObj).map(e => e.join('=')).join('&');\n\n // no callbackUrl\n if (!order.callbackUrl) {\n props.history.push('/thank-you');\n return;\n }\n\n // compose redirect url\n window.location.href = `${order.callbackUrl}${order.callbackUrl.indexOf(\"?\") === -1 ? \"?\" : \"&\" }${urlParams}`;\n */\n })\n ).subscribe();\n\n\n return (\n \n \n \n );\n};\n\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n redirectData: redirectDataSelector(state),\n activeLinkName: activeLinkNameSelector(state),\n activeLanguage: languageSelector(state),\n };\n },{\n cleanState\n }\n)(withRouter(Redirect));\n","import React from 'react';\nimport {inject} from 'inversify';\nimport {ErrorHandlerService} from '../../../service';\nimport type {IErrorHandlerService} from '../../../service/errorHandlerService';\n\ninterface ICurrencySymbolProps {\n currency?: string;\n}\n\n/**\n * Return currency symbol according. Default is $\n */\nclass CurrencySymbol extends React.Component {\n\n @inject(ErrorHandlerService) private errorHandlerService: IErrorHandlerService;\n\n render() {\n let currency: string = '';\n switch(this.props.currency) {\n case 'EUR':\n currency = '€';\n break;\n\n case 'USD':\n currency = '$';\n break;\n\n default:\n currency = '$';\n return;\n }\n\n return `${currency}`;\n }\n}\n\nexport default CurrencySymbol;","import React from 'react';\nimport {inject} from 'inversify';\nimport {ErrorHandlerService} from '../../../service';\nimport type {IErrorHandlerService} from '../../../service/errorHandlerService';\nimport { DEFAULT_LANG_LOCALE, LanguageLocale } from '../../../constants/locales';\nimport i18n from '../../../i18n';\nimport CurrencySymbol from '../CurrencySymbol';\nimport {getPriceConverterConfigFromLanguage, IPriceConverterConfig} from '../../../core/index';\n\n\ninterface IPriceConverterProps {\n amount?: any;\n currency?: string;\n config?: IPriceConverterConfig;\n language?: LanguageLocale;\n}\n\nclass CurrencyConverter extends React.Component {\n\n @inject(ErrorHandlerService) private errorHandlerService: IErrorHandlerService;\n\n render() {\n if (!this.props.amount) {\n this.errorHandlerService.handleInternalError('[CurrencyConverter]: Amount or Currency not specified.');\n return null;\n }\n\n const language: LanguageLocale = this.props.language || i18n.language as LanguageLocale || DEFAULT_LANG_LOCALE;\n\n let config: IPriceConverterConfig = getPriceConverterConfigFromLanguage(language, this.props.config);\n\n let amount: any = null;\n try {\n amount = parseInt(this.props.amount) / 100;\n } catch {\n this.errorHandlerService.handleInternalError('[CurrencyConverter]: Wrong amount type.');\n return null;\n }\n\n amount = amount.toFixed(config.decimal);\n amount = amount.replace('.', config.decimalSign);\n\n return \n {amount} \n ;\n }\n}\n\nexport default CurrencyConverter;","import React from 'react';\nimport styles from \"./styles.module.scss\";\n\nexport interface ICustomError {\n showError: boolean;\n content: React.ReactFragment;\n}\n\nconst CustomError = (props: ICustomError) => {\n if (!props.showError) {\n return null;\n }\n\n return (
{props.content}
);\n};\n\nexport default CustomError;","import React, {FC} from 'react';\nimport {connect} from 'react-redux';\nimport {changePayMeOrderAmount} from '../../../store/reducers/linkDataSlice';\nimport { LanguageLocale } from '../../../constants/locales';\nimport {RootState} from '../../../store/reducers';\nimport {useTranslation} from 'react-i18next';\nimport styles from \"./styles.module.scss\";\nimport CurrencySymbol from '../CurrencySymbol';\nimport CustomError from '../../Common/CustomError';\nimport Translate from '../Translate';\nimport CurrencyConverter from '../CurrencyConverter';\nimport { getPriceConverterConfigFromLanguage, IPriceConverterConfig } from '../../../core';\n\ninterface IOrderAmountInputProps {\n currency?: string;\n language?: LanguageLocale;\n config?: any;\n minChargeAmount: number | undefined;\n maxChargeAmount: number | undefined;\n changePayMeOrderAmount: typeof changePayMeOrderAmount;\n}\n\nconst OrderAmountInput:FC = (props: IOrderAmountInputProps) => {\n const { t } = useTranslation();\n\n // Allow to insert , or .\n // This because we cannot know the input keyboard virtual language\n const inputAmountRegex = /^(\\s*|((?:[1-9][0-9]*|0)(((\\,|\\.)\\d{0,2})?)))$/;\n\n const amountClass = props.config && props.config.amount ? props.config.amount.class : '';\n\n let config: IPriceConverterConfig = getPriceConverterConfigFromLanguage(props.language);\n\n // State\n const [amount, setAmount] = React.useState(undefined);\n const [isAmountUnderMinAmount, setIsAmountUnderMinAmount] = React.useState(false);\n const [isAmountOverMaxAmount, setIsAmountOverMaxAmount] = React.useState(false);\n\n const onInputChange = (e: any) => {\n // todo validate min max amount\n if (inputAmountRegex.test(e.target.value)) {\n // This is required to support . and , as input. The number seprator inserted is replaced by congi.decimalSign\n const formattedTextAmount = e.target.value.replace('.',config.decimalSign).replace(',',config.decimalSign);\n\n var formattedAmount = parseFloat(e.target.value.replace(config.decimalSign,'.'));\n formattedAmount = parseInt((formattedAmount * 100).toFixed(0));\n \n var isAmountValid = true;\n if(props.minChargeAmount) {\n const minAmountExceeded = formattedAmount < props.minChargeAmount;\n setIsAmountUnderMinAmount(minAmountExceeded);\n isAmountValid = isAmountValid && !minAmountExceeded;\n }\n if(props.maxChargeAmount) {\n const maxAmountExceeded = formattedAmount > props.maxChargeAmount;\n setIsAmountOverMaxAmount(maxAmountExceeded);\n isAmountValid = isAmountValid && !maxAmountExceeded;\n }\n \n setAmount(formattedTextAmount);\n\n if(isAmountValid) {\n props.changePayMeOrderAmount(formattedAmount);\n }\n else {\n props.changePayMeOrderAmount(null);\n }\n }\n };\n\n const getInputWidth = () => {\n if(amount) {\n return `${amount?.toString().length}ch`;\n } else {\n return '3.5ch';\n }\n }\n\n const formatInsertedAmount = () => {\n if(amount) {\n var formattedAmount = parseFloat(amount.replace(config.decimalSign,'.'));\n setAmount(formattedAmount.toFixed(2).replace('.',config.decimalSign));\n }\n }\n\n return (\n
\n
\n
\n onInputChange(e)}\n onBlur={e => formatInsertedAmount()}\n />\n {` `}\n \n
\n
\n\n \n \n \n \n {` `}\n \n \n }\n />\n \n \n \n \n {` `}\n \n \n }\n />\n
\n );\n};\n\nexport default connect(\n (state: RootState) => { \n return {\n }; \n },\n {\n changePayMeOrderAmount\n }\n)(OrderAmountInput);","import React, {FC} from 'react';\nimport {connect} from 'react-redux';\nimport {changeChargePaymentRef} from '../../../store/reducers/linkDataSlice';\nimport {useTranslation} from 'react-i18next';\n\ninterface IChargePaymentRefInputProps {\n changeChargePaymentRef: typeof changeChargePaymentRef;\n}\n\nconst ChargePaymentRefInput:FC = (props: IChargePaymentRefInputProps) => {\n const { t } = useTranslation();\n\n const MAX_INPUT_LENGTH = 140;\n\n const onInputChange = (e: any) => {\n \n if (!e.target || !e.target.value || e.target.value === '') {\n props.changeChargePaymentRef(null);\n return;\n }\n\n props.changeChargePaymentRef(e.target.value);\n };\n\n return (\n
\n onInputChange(e)}\n maxLength={MAX_INPUT_LENGTH}\n />\n
\n );\n};\n\nexport default connect(\n () => { return {}; },\n {\n changeChargePaymentRef\n }\n)(ChargePaymentRefInput);","import React, {FC} from 'react';\nimport {ILogoOrderTemplateResponse, ILogoTemplateResponse, IOrder, ISimpleOrderTemplateResponse} from '../../../model/IOrder';\nimport CurrencyConverter from '../CurrencyConverter';\nimport styles from \"./styles.module.scss\";\nimport Translate from '../Translate/index';\nimport {useInjection} from '../../../ioc';\nimport {ErrorHandlerService} from '../../../service';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {chargePaymentRefSelector, orderSelector, payMeOrderAmountSelector} from '../../../store/selectors/linkDataSelectors';\nimport { languageSelector } from '../../../store/selectors/sagaSelectors';\nimport { LanguageLocale } from '../../../constants/locales';\nimport OrderAmountInput from '../OrderAmountInput';\nimport ChargePaymentRefInput from '../ChargePaymentRefInput';\n\n\nexport interface IOrderDetailsProps {\n order: IOrder | null;\n config?: any;\n language?: LanguageLocale,\n editableAmount?: boolean,\n payMeOrderAmount?: number | null;\n chargePaymentRef?: string | null;\n}\n\nconst OrderDetails:FC = (props: IOrderDetailsProps) => {\n const errorHandlerService = useInjection(ErrorHandlerService);\n\n if (!props.order || !props.order.template || !props.order.template.type) {\n return null;\n }\n\n let template: ISimpleOrderTemplateResponse | ILogoTemplateResponse | null = null;\n switch(props.order.template.type) {\n case 'simple':\n template = props.order.template.simple;\n break;\n case 'logo':\n template = props.order.template.logo;\n break;\n default:\n errorHandlerService.handleInternalError(`[OrderDetails]: Invalid template type: ${props.order.template['type']}`);\n return null;\n }\n\n const titleClass = props.config && props.config.title ? props.config.title.class : '';\n const subtitleClass = props.config && props.config.subtitle ? props.config.subtitle.class : '';\n const headerClass = props.config && props.config.header ? props.config.header.class : '';\n const amountClass = props.config && props.config.amount ? props.config.amount.class : '';\n const maxAmountClass = props.config && props.config.maxAmount ? props.config.maxAmount.class : '';\n const positionSubTitleClass = props.config && props.config.positionSubTitle ? styles[props.config.positionSubTitle.class] : '';\n const maxAmountTitleClass = props.config && props.config.maxAmountTitle ? props.config.maxAmountTitle.class : '';\n const underOrderTitlesClass = props.config && props.config.underOrderTitlesSeparator ? styles.smallUnder : '';\n const underAmountClass = props.config && props.config.underAmountSeparator ? styles.under : '';\n\n const renderMaxAmount = () => {\n if (!props.order || !props.order.maxAmount) {\n return null;\n }\n\n return (\n \n
\n \n
\n
\n \n
\n
\n )\n };\n\n // render logo url if present\n const renderLogoUrl = () => {\n if (!template || !('logoUrl' in template)) {\n return null;\n }\n\n const templateLogo: ILogoOrderTemplateResponse = template as ILogoOrderTemplateResponse;\n\n return (\n \"logo\"/\n );\n }\n\n const renderAmount = () => {\n if (!props.order) {\n return null;\n }\n\n const amount = props.order.type === 'payme' ? props.payMeOrderAmount : props.order.amount;\n if(!amount) {\n return null;\n }\n\n return (\n \n
\n \n
\n
\n )\n };\n\n const renderEditableAmount = () => {\n if (!props.order || props.order.amount) {\n return null;\n }\n\n var minChargeAmount = props.order.minChargeAmount;\n var maxChargeAmount = props.order.maxChargeAmount;\n\n return (\n \n
\n \n
\n
\n )\n };\n\n const renderOrderDetailAmount = () => {\n if(props.editableAmount) {\n return renderEditableAmount();\n } else {\n return renderAmount();\n }\n }\n\n const renderChargePaymentRef = () => {\n if(props.editableAmount) {\n return (\n
\n \n
\n );\n } else {\n if(props.chargePaymentRef)\n return

{ props.chargePaymentRef }

;\n }\n\n }\n\n return (\n
\n
{ props.order.companyName }
\n
\n { renderLogoUrl() }\n\n
\n

{ template.title }

\n

{ template.desc }

\n

{ template.paymentRef }

\n
\n\n
\n { renderOrderDetailAmount() }\n { renderMaxAmount() }\n { renderChargePaymentRef() }\n
\n
\n );\n};\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n language: languageSelector(state),\n payMeOrderAmount: payMeOrderAmountSelector(state),\n chargePaymentRef: chargePaymentRefSelector(state)\n };\n },\n {}\n)(OrderDetails);","import React from 'react';\nimport Translate from '../Translate';\nimport Moment from 'react-moment';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {orderSelector} from '../../../store/selectors/linkDataSelectors';\nimport {IOrder} from '../../../model/IOrder';\nimport i18n from '../../../i18n';\nimport { languageSelector } from '../../../store/selectors/sagaSelectors';\n\ninterface IExpirationInfoProps {\n order: IOrder | null;\n}\n\nclass ExpirationInfo extends React.Component {\n\n render() {\n if (!this.props.order || !this.props.order.validityEndDate) {\n return null;\n }\n\n return (\n
\n \n {this.props.order.validityEndDate}\n
\n );\n }\n\n}\n\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n language: languageSelector(state),\n };\n },\n {\n\n }\n)(ExpirationInfo);\n","import React, {FC} from 'react';\nimport Translate from '../Translate';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport { languageSelector } from '../../../store/selectors/sagaSelectors';\nimport { LanguageLocale } from '../../../constants/locales';\nimport { WindowWithCustomAppConfig } from '../../../core';\n\ninterface ITspayInformationalPdfProps {\n language?: LanguageLocale\n orderFee: number\n}\n\nconst TspayInformationalPdf:FC = (props: ITspayInformationalPdfProps) => {\n \n const APP_CONFIG = (window as WindowWithCustomAppConfig).$APP_CONFIG;\n const urlInformationalPdf = APP_CONFIG?.informationalPdfUrl || '#';\n console.log(\"urlInformationalPdf \" + urlInformationalPdf);\n console.log(\"termsOfServiceUrl \" + APP_CONFIG?.termsOfServiceUrl);\n\n const formatNumberForLang = (value: number) => {\n const intlFormatter = Intl.NumberFormat(props.language, {minimumFractionDigits: 2});\n\n return intlFormatter.format(value);\n }\n \n\n return (\n
\n \n );\n}\n\n\nexport default connect(\n (state: RootState) => {\n return {\n language: languageSelector(state),\n };\n },\n {\n\n }\n)(TspayInformationalPdf);","import React from 'react';\nimport Translate from '../Translate';\nimport {connect} from 'react-redux';\nimport { RootState } from '../../../store/reducers';\nimport { useInjection } from '../../../ioc';\nimport { ErrorHandlerService } from '../../../service';\n\nexport const CancelButton= () => {\n const errorHandlerService = useInjection(ErrorHandlerService);\n function cancel(){\n errorHandlerService.handleGenericError(\n {\n code: \"OPERATION_CANCELLED_BY_USER\"\n }, true\n );\n }\n\n return (\n
\n \n
\n );\n};\n\nexport default connect(\n (state: RootState) => {},{}\n)(CancelButton);","import React from 'react';\nimport Translate from '../Translate/index';\nimport styles from './styles.module.scss';\n\n\ninterface IPaymentMethodOptionProps {\n style?: any;\n icon?: React.ComponentType>;\n title?: string;\n image?: string;\n action: () => void;\n}\n\nclass PaymentMethodOption extends React.Component {\n\n renderTitle() {\n if(this.props.title) {\n return (\n \n \n \n );\n }\n }\n\n renderIconButtonContent() {\n return (\n <>\n {this.renderIcon()}\n {this.renderTitle()}\n \n )\n }\n\n renderIcon() {\n if(this.props.icon) {\n const IconComponent = this.props.icon;\n return (\n
\n \n
\n );\n }\n }\n\n renderImageButtonContent() {\n return
;\n }\n\n renderButtonContent() {\n if(this.props.icon) {\n return this.renderIconButtonContent();\n } else {\n return this.renderImageButtonContent();\n }\n }\n\n render() {\n return (\n //pmoContainer di default e per decidere se il button è abilitato \n
\n {this.renderButtonContent()}\n
\n );\n }\n}\n\nexport default (PaymentMethodOption);\n","var _path;\n\nvar _excluded = [\"svgRef\", \"title\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar SvgIconOptionSepa = function SvgIconOptionSepa(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 18,\n height: 15,\n viewBox: \"0 0 18 15\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", null, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.2578 2.5L14.6289 1.87109C14.3555 1.625 14.3555 1.21484 14.6289 0.96875C14.875 0.695312 15.2852 0.695312 15.5312 0.96875L17.2812 2.71875C17.418 2.82812 17.4727 2.99219 17.4727 3.18359C17.4727 3.34766 17.418 3.51172 17.2812 3.64844L15.5312 5.39844C15.2852 5.64453 14.875 5.64453 14.6289 5.39844C14.3555 5.125 14.3555 4.71484 14.6289 4.46875L15.2578 3.83984H13.4805H4.375V4.27734C4.375 5.23438 3.58203 6.02734 2.625 6.02734H2.1875V8.57031L1.36719 9.36328L0.875 9.88281V4.25C0.875 3.29297 1.64062 2.5 2.625 2.5H10.4727H10.5H15.2578ZM15.3125 9.5V6.95703L16.1055 6.16406L16.625 5.64453V11.25C16.625 12.2344 15.832 13 14.875 13H3.99219H2.21484L2.84375 13.6289C3.11719 13.9023 3.11719 14.3125 2.84375 14.5586C2.59766 14.832 2.1875 14.832 1.94141 14.5586L0.191406 12.8086C0.0546875 12.6992 0 12.5352 0 12.3438C0 12.1797 0.0546875 12.0156 0.191406 11.8789L1.94141 10.1289C2.1875 9.88281 2.59766 9.88281 2.84375 10.1289C3.11719 10.4023 3.11719 10.8125 2.84375 11.0586L2.21484 11.6875H7H13.125V11.25C13.125 10.293 13.8906 9.5 14.875 9.5H15.3125ZM8.75 5.125C9.67969 5.125 10.5273 5.64453 11.0195 6.4375C11.4844 7.25781 11.4844 8.26953 11.0195 9.0625C10.5273 9.88281 9.67969 10.375 8.75 10.375C7.79297 10.375 6.94531 9.88281 6.45312 9.0625C5.98828 8.26953 5.98828 7.25781 6.45312 6.4375C6.94531 5.64453 7.79297 5.125 8.75 5.125Z\"\n })));\n};\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(SvgIconOptionSepa, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/icon-option-sepa.e239da3a.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\n\nvar _excluded = [\"svgRef\", \"title\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar SvgIconOptionPis = function SvgIconOptionPis(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 14,\n height: 15,\n viewBox: \"0 0 14 15\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", null, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.30078 0.832031L13.5078 4.27734C13.8086 4.44141 14 4.74219 14 5.07031C14 5.58984 13.5625 6 13.043 6H0.929688C0.410156 6 0 5.58984 0 5.07031C0 4.74219 0.164062 4.44141 0.464844 4.27734L6.67188 0.832031C6.86328 0.722656 7.10938 0.722656 7.30078 0.832031ZM6.23438 4.6875C6.15234 4.57812 6.125 4.41406 6.125 4.25C6.125 3.78516 6.50781 3.375 7 3.375C7.46484 3.375 7.875 3.78516 7.875 4.25C7.875 4.41406 7.82031 4.57812 7.73828 4.6875H11.5664L7 2.17188L2.40625 4.6875H6.23438ZM1.75 6.875H3.0625V11.25H4.8125V6.875H6.125V11.25H7.875V6.875H9.1875V11.25H10.9375V6.875H12.25V11.25H12.4688C12.8242 11.25 13.125 11.5508 13.125 11.9062C13.125 12.2891 12.8242 12.5625 12.4688 12.5625H1.75C1.36719 12.5625 1.09375 12.2891 1.09375 11.9062C1.09375 11.5508 1.36719 11.25 1.75 11.25V6.875ZM0.875 13.4375H13.3438C13.6992 13.4375 14 13.7383 14 14.0938C14 14.4766 13.6992 14.75 13.3438 14.75H0.875C0.492188 14.75 0.21875 14.4766 0.21875 14.0938C0.21875 13.7383 0.492188 13.4375 0.875 13.4375Z\"\n })));\n};\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(SvgIconOptionPis, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/icon-option-pis.97ebc15e.svg\";\nexport { ForwardRef as ReactComponent };","import { useState } from \"react\";\n\nexport const useToggle = (defaultState = false) => {\n const [toggleState, setToggleState] = useState(defaultState);\n const toggle = () => {\n setToggleState((old) => !old);\n };\n\n const handleTrue = ()=>{\n setToggleState(true)\n }\n\n const handleFalse = ()=>{\n setToggleState(false)\n }\n\n return { toggleState, toggle, handleTrue, handleFalse };\n};\n\n","import styles from \"./styles.module.scss\";\nimport React,{ FC, ReactNode } from 'react';\nimport Popup from 'reactjs-popup';\nimport { Divider } from \"./Divider\";\nimport { HeaderContainer } from \"./HeaderContainer\";\nimport { CloseButton } from \"./CloseButton\";\nimport { BodyWrapper } from \"./BodyWrapper\";\nimport { PopupFooter } from \"./Footer\";\nimport { PopupContainer } from \"./PopupContainer\";\n\nexport interface IModelPopupProps {\n open: boolean;\n onClose: (event?: React.SyntheticEvent | KeyboardEvent | TouchEvent | MouseEvent) => void;\n children?: ReactNode;\n}\n\nexport interface IModelPopupPropsCompoundComponent extends FC {\n Divider: typeof Divider;\n Header: typeof HeaderContainer;\n CloseButton: typeof CloseButton;\n BodyWrapper: typeof BodyWrapper;\n Footer: typeof PopupFooter;\n Container: typeof PopupContainer;\n}\n\nconst ModalPopup: IModelPopupPropsCompoundComponent = (props: IModelPopupProps) => {\n return (\n \n
\n {props.children}\n
\n
\n );\n};\n\nModalPopup.Divider = Divider;\nModalPopup.Header = HeaderContainer;\nModalPopup.CloseButton = CloseButton;\nModalPopup.BodyWrapper = BodyWrapper;\nModalPopup.Footer = PopupFooter;\nModalPopup.Container = PopupContainer;\n\nexport default ModalPopup;\n","import React, { FC, HtmlHTMLAttributes } from \"react\";\nimport styles from \"./styles.module.scss\"\n\nexport interface DividerProps\n extends HtmlHTMLAttributes {}\n\nexport const Divider: FC<\nDividerProps\n> = () => {\n const Element:keyof JSX.IntrinsicElements = \"div\"\n return ;\n};\n","import React, { FC, HtmlHTMLAttributes } from \"react\";\nimport styles from \"./styles.module.scss\"\n\nexport interface HeaderContainerProps\n extends HtmlHTMLAttributes {}\n\nexport const HeaderContainer: FC<\nHeaderContainerProps\n> = ({children}) => {\n const Element:keyof JSX.IntrinsicElements = \"div\"\n return {children};\n};\n","import React, { FC, HtmlHTMLAttributes } from \"react\";\nimport styles from \"./styles.module.scss\"\n\nexport interface CloseButtonProps\n extends HtmlHTMLAttributes {}\n\nexport const CloseButton: FC<\nCloseButtonProps\n> = ({onClick}) => {\n const Element:keyof JSX.IntrinsicElements = \"button\"\n return ×;\n};\n","import React, { FC, HtmlHTMLAttributes } from \"react\";\nimport styles from \"./styles.module.scss\"\n\nexport interface BodyWrapperProps\n extends HtmlHTMLAttributes {}\n\nexport const BodyWrapper: FC<\nBodyWrapperProps\n> = ({children}) => {\n const Element:keyof JSX.IntrinsicElements = \"div\"\n return {children};\n};\n","\nimport React,{ FC, HtmlHTMLAttributes } from \"react\";\nimport styles from \"./styles.module.scss\";\nimport Translate from \"../../Common/Translate\";\n\nexport interface PopupFooterProps extends HtmlHTMLAttributes {\n confirmLabel?: string;\n abortLabel?: string;\n confirmAction?: () => void;\n abortAction?: () => void;\n confirmDisabled?:boolean;\n}\n\nexport const PopupFooter: FC = ({\n confirmAction,\n abortAction,\n confirmLabel=\"button.confirm\",\n abortLabel=\"button.cancel\",\n confirmDisabled\n}) => {\n const Element: keyof JSX.IntrinsicElements = \"div\";\n return (\n \n \n \n \n );\n}\n","import React,{ FC, HtmlHTMLAttributes } from \"react\";\nimport styles from \"./styles.module.scss\"\n\nexport interface PopupContainerProps\n extends HtmlHTMLAttributes {}\n\nexport const PopupContainer: FC<\nPopupContainerProps\n> = ({children}) => {\n const Element:keyof JSX.IntrinsicElements = \"div\"\n return {children};\n};\n","import { LanguageLocale } from '../constants/locales';\nimport { PaymentMethodType } from './PaymentMethodType';\n\nexport interface ITSAppOrderReferenceResponse {\n appRef: string;\n merchantRef: string;\n merchantClientRef: string;\n callerRef?: string;\n merchantContextRef?: string;\n meta?: { [key: string]: any; };\n}\nexport interface ISimpleTemplateResponse {\n type: 'simple';\n simple: ISimpleOrderTemplateResponse;\n}\n\nexport interface ILogoTemplateResponse {\n type: 'logo';\n logo: ILogoOrderTemplateResponse;\n}\n\nexport interface ISimpleOrderTemplateResponse {\n title: string;\n desc: string;\n paymentRef: string;\n}\n\nexport interface ILogoOrderTemplateResponse {\n title: string;\n desc: string;\n paymentRef: string;\n logoUrl: string;\n}\n\nexport interface IRecurrentDetails {\n // amount in cents\n amount: string,\n // intdate YYYYMMDD\n startOn: number,\n repeatEvery?: number,\n repeatPeriod?: string,\n // intdate YYYYMMDD\n endOnDate?: number;\n endAfterTimes?: number;\n}\n\nexport interface SchedulePlan {\n // intdate YYYYMMDD\n chargeDate: number,\n // intdate YYYYMMDD\n originalChargeDate: number,\n // amount in cents\n amount: string,\n}\n\nexport interface IAcquireConfig {\n payMethod: string[];\n info?: {\n [key: string]: string;\n }\n}\n\nexport interface ISTPAcquire extends IAcquireConfig {\n publishableKey: string;\n}\n\nexport interface IPPAcquire extends IAcquireConfig {\n client_token: string;\n accountId: string;\n}\n\nexport interface ICKOAcquire extends IAcquireConfig {\n}\n\nexport interface ICBIAcquire extends IAcquireConfig {\n}\n\nexport interface IAcquire {\n stp: ISTPAcquire,\n pp: IPPAcquire,\n cko: ICKOAcquire,\n cbi: ICBIAcquire\n}\n\nexport interface IOneshotPaymentOrderResponse {\n externalRef?: string;\n metadata?: { [key: string]: any };\n currency?: string;\n langLocale: LanguageLocale;\n callbackUrl?: string,\n cancelUrl?: string,\n maxAmount?: number,\n validityStartDate?: number;\n validityEndDate?: number;\n contextId?: string,\n sourceTypes?: PaymentMethodType[];\n template?: ISimpleTemplateResponse | ILogoTemplateResponse;\n type?: string,\n orderKey?: string,\n confirmationPageNote?: string,\n contactRequest: boolean\n cardBrands: string[],\n cardLink2SaveFunding: string[],\n minChargeAmount?: number,\n maxChargeAmount?: number,\n acquire?: IAcquire,\n\n // link2save - plan related\n plan?: {\n schedules?: {\n plans: SchedulePlan[]\n },\n recurrent?: IRecurrentDetails,\n onetime?: SchedulePlan,\n }\n\n // old not used???\n state?: string;\n modifiedBy?: string;\n modifiedOn?: string;\n createdOn?: string;\n tsapp?: ITSAppOrderReferenceResponse;\n amount?: number;\n amounts?: IOrderAmounts\n netAmountFlag?: boolean;\n}\n\n\n// \"amounts\": {\n// \"sepa_debit\": {\n// \"source\": \"SEPA_DEBIT\",\n// \"amount\": \"2110\",\n// \"netAmount\": \"2000\",\n// \"fee\": {\n// \"event\": \"CHARGE\",\n// \"type\": \"withhold_fees\",\n// \"amount\": \"110\",\n// \"composition\": {\n// \"source\": \"SEPA_DEBIT\",\n// \"feePercent\": 0.004999999888241291,\n// \"feeFixed\": \"100\"\n// }\n// }\n// }\n\nexport interface IOrderAmounts{\n sepa_debit: {\n source: string,\n amount: string,\n netAmount: string,\n fee: {\n event: string,\n type: string,\n amount: string,\n composition:{\n source: string,\n feePercent: number,\n feeFixed: string\n }\n }\n }\n}\nexport interface IOrder extends IOneshotPaymentOrderResponse {\n publishableKey: string;\n companyName: string;\n customTheme?: CustomTheme;\n}\n\n\nexport enum EnumCustomColor{\n BLACK = \"BLACK\",\n WHITE = \"WHITE\"\n}\nexport interface CustomTheme {\n headerColor?: string\n backgroundMain?: string\n title?: string;\n textColor?: string\n primaryColor?: string\n primaryButtonG1?: string;\n primaryButtonG2?: string;\n primaryButtonText?: string;\n accordionForeground?: string;\n accordionBackground?: string;\n secondaryButtonBackground?: string;\n foregroundMain?: string;\n paymentRef?: string;\n description?: string;\n amount?: string;\n wallet?: string;\n hintColor?: string;\n secondaryColor?: string;\n inputBorderColor?: string;\n calendarIcon?: EnumCustomColor;\n calendarIconColor?: string;\n}\n\nexport interface IPlan {\n recurrent?: IRecurrentDetails;\n schedules?: SchedulePlan[];\n oneTime?: SchedulePlan;\n netAmountFlag?: boolean;\n}\n","import React, { FC, HtmlHTMLAttributes } from \"react\";\nimport ModalPopup, { IModelPopupProps } from \"../ModalPopup\";\nimport { useToggle } from \"../../../hooks/useToggle\";\nimport styles from \"./styles.module.scss\";\nimport { Trans } from \"react-i18next\";\n\nexport interface PisModalProps extends HtmlHTMLAttributes {\n modalSettings: IModelPopupProps;\n confirmAction: () => void;\n}\n\nexport const PisModal: FC = ({\n modalSettings,\n confirmAction,\n ...args\n}) => {\n const { toggleState: checked, toggle, handleFalse } = useToggle();\n\n const listPoints = [\n \"pisModal.listOne\",\n \"pisModal.listTwo\",\n \"pisModal.listThree\",\n ];\n\n const close = ()=>{\n modalSettings?.onClose();\n handleFalse();\n }\n\n return (\n \n \n \n \n \n \n \n
\n
\n \n
\n
    \n {listPoints?.map((item) => (\n
  • \n \n
  • \n ))}\n
\n
\n \n \n
\n
\n
\n \n
\n );\n};\n","import React, { FC, Fragment } from 'react';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {PaymentMethodType} from '../../../model/PaymentMethodType';\nimport PaymentMethodOption from '../PaymentMethodOption';\nimport Translate from '../Translate';\nimport styles from \"./styles.module.scss\";\nimport { IOrder } from '../../../model/IOrder';\nimport { contactEmailSelector, orderSelector, payMeOrderAmountSelector } from '../../../store/selectors/linkDataSelectors';\nimport { navigateToAcquirerDedicateWebApp } from '../../../core';\nimport { useInjection } from '../../../ioc';\nimport { ErrorHandlerService } from '../../../service';\nimport {ReactComponent as iconOptionCard} from '../../../assets/images/icon-option-card.svg';\nimport {ReactComponent as iconOptionSepa} from '../../../assets/images/icon-option-sepa.svg';\nimport {ReactComponent as iconOptionPis} from '../../../assets/images/icon-option-pis.svg';\nimport { useToggle } from '../../../hooks/useToggle';\nimport { PisModal } from '../PisModal';\n\ninterface IPaymentMethodOptionListProps {\n order: IOrder | null;\n contactEmail: string | null;\n payMeOrderAmount: number | null;\n cardRequiredAcquired?: string;\n}\n\nconst PaymentMethodOptionList:FC = (props: IPaymentMethodOptionListProps) => {\n const errorHandlerService = useInjection(ErrorHandlerService);\n const {toggleState:isModalOpen, handleTrue:openModal, handleFalse:closeModal} = useToggle()\n\n if(props.order?.sourceTypes?.length === 0) {\n errorHandlerService.handleGenericError({code: \"PAMENT_NOT_AVAILABLE_ACQUIRER\"});\n }\n\n let disabledPayMethod: boolean =\n (props.order?.contactRequest && !props.contactEmail) ||\n (props.order?.type === \"payme\" && !props.payMeOrderAmount);\n\n const renderPayPalPayMethodIfAllowed = () => {\n const payMethodType = PaymentMethodType.PAYPAL;\n const order = props.order;\n\n if(order && order.sourceTypes?.includes(payMethodType)) {\n return navigateToAcquirerDedicateWebApp(order, payMethodType)}\n />;\n }\n }\n\n const renderPisPayMethodIfAllowed = () => {\n const payMethodType = PaymentMethodType.PIS_CHARGE;\n const order = props.order;\n if(order && order.sourceTypes?.includes(payMethodType)) {\n return (\n \n navigateToAcquirerDedicateWebApp(order, payMethodType)}\n modalSettings={{\n open: isModalOpen ,\n onClose: closeModal ,\n }}\n />\n \n \n );\n }\n }\n\n const renderCardPayMethodIfAllowed = () => {\n const payMethodType = PaymentMethodType.CARD;\n const order = props.order;\n\n if(order && order.sourceTypes?.includes(payMethodType)) {\n return navigateToAcquirerDedicateWebApp(order, payMethodType, props.cardRequiredAcquired)}\n />;\n }\n }\n \n const renderSepaDebitPayMethodIfAllowed = () => {\n const payMethodType = PaymentMethodType.SEPA_DEBIT;\n const order = props.order;\n if(order && order.sourceTypes?.includes(payMethodType)) {\n return navigateToAcquirerDedicateWebApp(order, payMethodType)}\n />;\n }\n }\n\n return (\n
\n
\n
\n {renderPayPalPayMethodIfAllowed()}\n {renderCardPayMethodIfAllowed()}\n {renderPisPayMethodIfAllowed()} \n {renderSepaDebitPayMethodIfAllowed()}\n
\n
\n );\n}\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n contactEmail: contactEmailSelector(state),\n payMeOrderAmount: payMeOrderAmountSelector(state)\n };\n },\n {\n }\n)(PaymentMethodOptionList);\n","import React from 'react';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {contactEmailSelector} from '../../../store/selectors/linkDataSelectors';\nimport {changeContactEmail} from '../../../store/reducers/linkDataSlice';\nimport i18n from '../../../i18n';\n\ninterface IExternalContactEmailInputProps {\n}\n\ninterface IConnectedContactEmailInputProps {\n contactEmail: string | null;\n changeContactEmail: typeof changeContactEmail;\n}\n\ninterface IContactEmailInputProps extends IExternalContactEmailInputProps, IConnectedContactEmailInputProps {}\n\nexport interface IcontactEmailInputState {\n contactEmail: string | null;\n isValid: boolean;\n isTouched: boolean;\n}\n\n// source: https://stackoverflow.com/questions/46155/whats-the-best-way-to-validate-an-email-address-in-javascript\n// dis-allow spaces in email and no double @\nconst emailRegex = new RegExp('^[^\\\\s@]+@[^\\\\s@]+\\\\.[^\\\\s@]+$');\n\nclass ContactEmailInput extends React.Component {\n private validate(inputValue?: string | null) { \n const isValid = inputValue ? emailRegex.test(inputValue) : false;\n\n if (isValid && inputValue) {\n this.props.changeContactEmail(inputValue);\n } else {\n this.props.changeContactEmail(null);\n }\n\n this.setState({isValid: isValid});\n return;\n\n };\n\n private onInputChange = (e: React.FormEvent): void => {\n if (!e.currentTarget) {\n return;\n }\n\n // Do not allow for leading or trailing spaces for email\n const targetValue = e.currentTarget.value;\n const email = targetValue ? targetValue.trim() : null;\n\n this.setState({\n contactEmail: email\n });\n\n this.validate(email);\n };\n\n private onInputBlur = () => {\n if ( !this.state || !this.state.isTouched) {\n this.setState({isTouched: true});\n }\n };\n\n componentDidMount() {\n if (!this.props.contactEmail) {\n return;\n }\n\n this.setState({contactEmail: this.props.contactEmail})\n }\n\n render() {\n const value = this.state && this.state.contactEmail ? this.state.contactEmail : '',\n showError = this.state ? this.state.isTouched && !this.state.isValid : false;\n \n return (\n\n
\n \n
{ showError }
\n
\n );\n }\n}\n\nexport default connect(\n (state: RootState) => {\n return {\n contactEmail: contactEmailSelector(state),\n };\n },\n {\n changeContactEmail\n }\n)(ContactEmailInput);","import React from 'react';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {contactEmailSelector, orderSelector} from '../../../store/selectors/linkDataSelectors';\nimport {changeContactEmail} from '../../../store/reducers/linkDataSlice';\nimport i18n from '../../../i18n';\nimport ContactEmailInput from '../ContactEmailInput';\nimport { IOrder } from '../../../model/IOrder';\n\ninterface IOrderEmailNoteBoxProps {\n order: IOrder | null;\n}\n\n// source: https://stackoverflow.com/questions/46155/whats-the-best-way-to-validate-an-email-address-in-javascript\n// dis-allow spaces in email and no double @\nconst emailRegex = new RegExp('^[^\\\\s@]+@[^\\\\s@]+\\\\.[^\\\\s@]+$');\n\nclass OrderEmailNoteBox extends React.Component {\n\n private renderContactEmail() {\n if (!this.props.order?.contactRequest) {\n return null;\n }\n\n return (\n
\n \n
\n );\n }\n\n private renderNote() {\n if (!this.props.order?.confirmationPageNote ) {\n return null;\n }\n\n return (\n
\n { this.props.order.confirmationPageNote }\n
);\n }\n\n render() {\n if (!this.props.order?.contactRequest && !this.props.order?.confirmationPageNote) {\n return null;\n }\n\n return (\n
\n
\n { this.renderContactEmail() }\n { this.renderNote() }\n
\n
\n );\n }\n}\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n };\n },\n {\n changeContactEmail\n }\n)(OrderEmailNoteBox);","import React from 'react';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {orderSelector, savePaymentMethodSelector} from '../../../store/selectors/linkDataSelectors';\nimport {IOrder} from '../../../model/IOrder';\nimport Translate from '../../Common/Translate';\nimport OrderDetails from '../../Common/OrderDetails';\nimport 'moment/locale/it';\nimport {LinkStep} from '../../../model/LinkStep';\nimport {changeFlow, changeActiveStep, FlowType} from '../../../store/reducers/sagaSlice';\nimport {changeSavePaymentMethod} from '../../../store/reducers/linkDataSlice';\nimport ExpirationInfo from '../../Common/ExpirationInfo';\nimport TspayInformationalPdf from '../../Common/TspayInformationalPdf';\nimport CancelButton from '../../Common/CancelButton';\nimport PaymentMethodOptionList from '../../Common/PaymentMethodOptionList';\nimport OrderEmailNoteBox from '../../Common/OrderEmailNoteBox';\n\n\ninterface IPaymentDetailsProps {\n order: IOrder | null;\n savePaymentMethod: boolean;\n changeFlow: typeof changeFlow;\n changeSavePaymentMethod: typeof changeSavePaymentMethod;\n changeActiveStep: typeof changeActiveStep;\n}\n\nclass PaymentDetails extends React.Component {\n\n componentDidMount() {\n const flow = this.props.savePaymentMethod ?\n FlowType.PM_PROVIDED_BY_USER_AND_SAVED : FlowType.PM_PROVIDED_BY_USER_AND_NOT_SAVED;\n this.props.changeFlow(flow);\n }\n\n renderNetAmountChargePdf = () => {\n if(this.props.order?.netAmountFlag){\n let orderFee = 0;\n if(this.props.order.amounts?.sepa_debit.fee.amount) {\n orderFee = +(this.props.order.amounts.sepa_debit.fee.amount) / 100;\n }\n return \n }\n }\n\n renderCancelButton = () => {\n if(this.props.order?.cancelUrl){\n return ;\n }\n }\n\n render() {\n if (!this.props.order || !this.props.order.sourceTypes || !Array.isArray(this.props.order.sourceTypes)) {\n return null;\n }\n\n return (\n \n

\n \n {this.renderNetAmountChargePdf()}\n\n \n\n
\n \n \n
\n
\n {this.renderCancelButton()}\n
\n \n\n
\n
\n );\n }\n\n private goToPaymentMethodList = () => {\n this.props.changeFlow(FlowType.PM_TAKEN_FROM_LIST);\n };\n}\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n savePaymentMethod: savePaymentMethodSelector(state),\n };\n },\n {\n changeFlow,\n changeActiveStep,\n changeSavePaymentMethod\n }\n)(PaymentDetails);","import React, {FC} from 'react';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {activeStepSelector} from '../../../store/selectors/sagaSelectors';\nimport {LinkStep} from '../../../model/LinkStep';\nimport TsPayRedirect from '../../Common/Redirect';\nimport Translate from '../../Common/Translate';\nimport {useInjection} from '../../../ioc';\nimport {ErrorHandlerService} from '../../../service';\nimport PaymentDetails from '../PaymentDetails';\nimport {Redirect} from 'react-router';\n\nexport interface IStepManagerProps {\n activeStep: LinkStep | null;\n}\n\nconst StepManager: FC = (props: IStepManagerProps) => {\n const errorHandlerService = useInjection(ErrorHandlerService);\n\n if (!props.activeStep) {\n return ();\n }\n\n const getActiveStep = (activeStep: LinkStep | null) => {\n switch(activeStep) {\n case LinkStep.PaymentDetails:\n return ;\n case LinkStep.Redirect:\n return ;\n case LinkStep.Error:\n return ;\n default:\n errorHandlerService.handleInternalError(`[StepManager]: active step name is invalid:${activeStep}`);\n return null;\n }\n };\n\n return getActiveStep(props.activeStep);\n};\n\nexport default connect(\n (state: RootState) => {\n return {\n activeStep: activeStepSelector(state),\n };\n },\n {}\n)(StepManager);\n","import React, {FC} from 'react';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {activeStepSelector, languageSelector} from '../../../store/selectors/sagaSelectors';\nimport {orderSelector} from '../../../store/selectors/linkDataSelectors';\nimport {IOrder} from '../../../model/IOrder';\nimport Translate from '../../Common/Translate';\nimport StepManager from '../StepManager';\nimport { Config } from '../../../core';\nimport { LinkStep } from '../../../model/LinkStep';\n\nexport interface IStepManagerProps {\n order: IOrder | null;\n language: string;\n activeStep: LinkStep | null;\n}\n\nconst LinkHost: FC = (props: IStepManagerProps) => {\n\n // todo: support props.order.publishableKey\n if (!props.order /*|| !props.order.publishableKey*/) {\n return ();\n }\n \n return (\n
\n
\n \n
\n
\n );\n};\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n language: languageSelector(state),\n activeStep: activeStepSelector(state),\n };\n },\n {}\n)(LinkHost);\n","import React, { FC, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Redirect, useParams } from \"react-router\";\nimport { catchError, first, tap } from \"rxjs/operators\";\nimport { WindowWithCustomAppConfig, redirectToPayMethodWebappIfRequired } from \"../../core\";\nimport i18n from \"../../i18n\";\nimport { useInjection } from \"../../ioc\";\nimport { IOrder } from \"../../model/IOrder\";\nimport { LinkName } from \"../../model/LinkName\";\nimport { LinkStep } from \"../../model/LinkStep\";\nimport { Link2PayDaoService } from \"../../service/dao\";\nimport { changeOrder, cleanState } from \"../../store/reducers/linkDataSlice\";\nimport { changeActiveLinkName, changeActiveStep, changeLanguage } from \"../../store/reducers/sagaSlice\";\nimport Translate from \"../Common/Translate\";\nimport LinkHost from \"./LinkHost\";\nimport { IUrlParams } from \"../../model/IUrlParams\";\n\nexport interface ILink2PayProps {\n changeOrder: typeof changeOrder;\n changeActiveStep: typeof changeActiveStep;\n changeActiveLinkName: typeof changeActiveLinkName;\n changeLanguage: typeof changeLanguage;\n cleanState: typeof cleanState;\n}\n\nconst Link2Pay: FC = (props: ILink2PayProps) => {\n // setup link\n props.changeActiveLinkName(LinkName.Link2Pay);\n props.changeActiveStep(LinkStep.PaymentDetails);\n\n const [isLoading, setIsLoading] = useState(true);\n const [isError, setIsError] = useState(false);\n\n const { orderKey } = useParams();\n const link2PayDaoService = useInjection(Link2PayDaoService);\n\n useEffect(() => {\n const fetchData = async () => {\n return await link2PayDaoService\n .retrieveOrder(orderKey as string)\n .pipe(\n first(),\n tap((order: IOrder) => {\n if(order.orderKey === 'DiPpB_VrCc8yiFEvSavH0ZuM5Us'){\n order.customTheme = {\n \"title\": \"white\",\n \"textColor\": \"white\",\n \"primaryButtonG1\": \"rgb(243, 130, 55)\",\n \"primaryButtonG2\": \"rgb(243, 130, 55)\",\n \"primaryButtonText\": \"white\",\n \"accordionForeground\": \"white\",\n \"accordionBackground\": \"black\",\n \"secondaryButtonBackground\": \"black\",\n \"foregroundMain\": \"black\",\n \"paymentRef\": \"white\",\n \"description\": \"white\",\n \"amount\": \"white\",\n \"wallet\": \"white\",\n \"hintColor\": \"#535658\",\n \"secondaryColor\": \"white\",\n \"headerColor\": \"#152935\",\n \"primaryColor\": \"white\",\n \"inputBorderColor\": \"#535658\"\n };\n }\n const orderFound = order;\n\n // set type of order if not returned\n orderFound.type = orderFound.type || \"link2pay\";\n props.changeOrder(orderFound);\n\n i18n.changeLanguage(orderFound.langLocale);\n\n setTimeout(() => props.changeLanguage(orderFound.langLocale), 0);\n (window as WindowWithCustomAppConfig).applyTheme?.(orderFound.customTheme);\n\n //redirect to stp or pp when exist a single paymethod\n redirectToPayMethodWebappIfRequired(order);\n\n //dealy loading if exist a single paymethod\n hideLoading(order);\n\n }),\n catchError((e: any) => {\n setIsLoading(false);\n setIsError(true);\n return e;\n })\n )\n .subscribe();\n };\n\n // Call GainSight\n const aptrinsic: (id: string, payload: Object) => void = (window as any).aptrinsic;\n if (typeof aptrinsic !== 'undefined') {\n console.log('### Calling gainsight with id: ', orderKey);\n aptrinsic('identify', {\n id: orderKey,\n type: 'link2Pay'\n });\n }\n\n\n\n\n fetchData();\n }, [link2PayDaoService,orderKey,props]);\n\n const hideLoading = (order: IOrder) => {\n const sourceTypes = order.sourceTypes\n if(sourceTypes?.length == 1) {\n setTimeout(() => {\n setIsLoading(false);\n }, 1000);\n } else {\n setIsLoading(false);\n }\n }\n\n if (isLoading) {\n return ;\n }\n\n if (isError) {\n return ;\n }\n\n return (\n
\n TS Pay - Checkout\n \n
\n );\n};\n\nexport default connect(\n () => {\n return {};\n },\n {\n changeOrder,\n changeActiveStep,\n changeActiveLinkName,\n changeLanguage,\n cleanState,\n }\n)(Link2Pay);\n","import React, {FC} from 'react';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {orderSelector, redirectDataSelector} from '../../../store/selectors/linkDataSelectors';\nimport {IOrder} from '../../../model/IOrder';\nimport {HashDaoService} from '../../../service/dao';\nimport {errorSelector, languageSelector} from '../../../store/selectors/sagaSelectors';\nimport {first, tap} from 'rxjs/operators';\nimport {ErrorType, IError} from '../../../model/IError';\nimport {useInjection} from '../../../ioc';\nimport { LanguageLocale } from '../../../constants/locales';\n\nexport interface IErrorProps {\n order: IOrder | null;\n error: IError;\n redirectData: any;\n activeLanguage: LanguageLocale;\n}\n\nconst Error:FC = (props: IErrorProps) => {\n console.log('props', props);\n\n const hashDaoService = useInjection(HashDaoService);\n\n const order = props.order as IOrder;\n\n const handleStripeError = (url: string) => {\n if (!props.order || !props.redirectData) {\n return (\n
\n
Spiacente, si è verificato un errore. Ti preghiamo di riprovare.
\n
\n );\n }\n\n const now = new Date();\n const timestamp = now.toISOString();\n\n const getHashPayload: any = {\n orderKey: order.orderKey,\n state: props.redirectData.state,\n timestamp,\n // add expectKey if present (chargeKey/sourceKey)\n expectKey: props.redirectData?.expectKey,\n // add stripe decline code if set\n declineCode: typeof props?.error?.errorDetails?.declineCode === 'string' ?\n props.error.errorDetails.declineCode : undefined,\n // add stripe errorKey if set\n errorKey: typeof props?.error?.errorDetails?.errorKey === 'string' ?\n props.error.errorDetails.errorKey : undefined,\n // add error message if set\n errorMessage: props?.error?.errorDetails?.description\n };\n \n // add selectedLangLocale only if present\n if (typeof props.activeLanguage === 'string') {\n getHashPayload.selectedLangLocale = props.activeLanguage;\n }\n\n hashDaoService.getHash(getHashPayload).pipe(\n first(),\n tap((resp: any) => {\n // for infering - this function is executed only if callbackUrl or cancelUrl is set\n // canceled is set to true only when cancel button is clicked\n if (!url) {\n return;\n }\n\n const token = resp.token;\n // add token as 'data' to callbackUrl\n window.location.href = `${url}${url.indexOf(\"?\") === -1 ? \"?\" : \"&\" }data=${token}`;\n })\n ).subscribe();\n\n return (\n
\n

Redirecting...

\n
\n );\n };\n\n if (!props.error) {\n return (\n
\n

Welcome to error page

\n
\n );\n }\n\n // This is required to handle cancel button events\n if (props.redirectData?.canceled && order?.cancelUrl) {\n return handleStripeError(order?.cancelUrl);\n }\n\n // This handle error coming from stripe payment method\n if (props.error.type === ErrorType.Stripe && order?.callbackUrl) {\n return handleStripeError(order?.callbackUrl);\n }\n\n return (\n
\n

{ typeof props?.error?.customErrorTitle === 'string' ? props.error.customErrorTitle : ''}

\n
\n { typeof props?.error?.message === 'string' ? props?.error?.message : 'Spiacente, si è verificato un errore. Ti preghiamo di riprovare.'}\n
\n\n
\n {\n typeof props?.error?.errorDetails?.declineCode === 'string' ? props?.error?.errorDetails?.declineCode : ''\n }\n\n
\n\n
\n {\n typeof props?.error?.errorDetails?.description === 'string' ? props?.error?.errorDetails?.description : ''\n }\n
\n {\n /*\n // refresh button not needed\n \n */\n }\n
\n );\n};\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n error: errorSelector(state),\n redirectData: redirectDataSelector(state),\n activeLanguage: languageSelector(state),\n };\n },\n)(Error);\n","import React from 'react';\nimport {useTranslation} from 'react-i18next';\n\nexport const BrowserNotCompatibleError = () => {\n const { t } = useTranslation();\n\n return (\n
\n
\n { t('browserNotSupported') }\n
\n
\n );\n};\n","import React from \"react\";\nimport { connect } from \"react-redux\";\nimport { RootState } from \"../../../store/reducers\";\nimport queryString from 'querystring';\nimport { WindowWithCustomAppConfig } from \"../../../core\";\n\nclass ApiKeyActivated extends React.Component {\n componentDidMount() {\n // change page title\n document.title = 'TS Pay - Attivazione';\n }\n\n render() {\n\n // load url config\n const dashboardUrl = (window as WindowWithCustomAppConfig).$APP_CONFIG?.dashboardUrl || 'https://dashboard.tspay.app';\n\n // if ?/&state is provided in url run other actions\n if (\n 'location' in this.props &&\n 'search' in (this.props as any)?.location &&\n typeof (this.props as any)?.location?.search === 'string'\n ) {\n // pares query\n const queryStringPassed: string = (this.props as any).location.search\n const parsedQueryParams = queryString.parse(queryStringPassed.replace('?', ''));\n console.log('parsedQueryParams', parsedQueryParams)\n // get state\n const statePassed = parsedQueryParams?.state;\n \n // run actions based on state\n if (statePassed === 'failed') {\n // return generic error\n return (\n
\n
\n Spiacente, si è verificato un errore. Ti preghiamo di riprovare.\n
\n
\n );\n }\n if(statePassed === 'isnotowner'){\n return (\n
\n
\n Spiacente, solo l'utente proprietario può attivare il software gestionale.\n
\n
\n );\n }\n\n if(statePassed === 'isactive'){\n // the apiKey was previously activated\n return (\n
\n
\n Grazie, questo software gestionale è già stato attivato.\n
\n\n
\n Ora puoi accedere al portale per impostare il conto di accredito,\n verificare le transazioni e collegare i tuoi conti correnti:\n {\" \"}\n {dashboardUrl}\n
\n
\n );\n }\n }\n\n return (\n
\n
\n Grazie, il tuo software gestionale è stato attivato.\n
\n\n
\n Ora puoi accedere al portale per impostare il conto di accredito,\n verificare le transazioni e collegare i tuoi conti correnti:\n {\" \"}\n {dashboardUrl}\n
\n
\n );\n }\n}\n\nexport default connect((state: RootState) => {\n return {};\n})(ApiKeyActivated);\n","// storage util\nimport { compress, decompress } from 'lz-string';\nimport { ITspaySettings } from '../model/ITspaySettings';\n\nexport const LANGUAGE = 'tspay_lang';\n\nexport const setLocalStorage = (key: string, items: any) => {\n localStorage.setItem(key, compress(JSON.stringify(items)));\n}\n\nexport const getLocalStorage = (key: string) => {\n let items = localStorage.getItem(key);\n if (items) {\n return JSON.parse(decompress(items));\n } else {\n return null;\n }\n}\n","import * as React from \"react\";\nimport { withTranslation, WithTranslation } from \"react-i18next\";\nimport styles from \"./styles.module.scss\";\nimport { changeLanguage } from \"../../../store/reducers/sagaSlice\";\nimport { connect } from \"react-redux\";\nimport { LanguageLocale } from \"../../../constants/locales\";\nimport { languageSelector } from \"../../../store/selectors/sagaSelectors\";\nimport {RootState} from '../../../store/reducers';\nimport { orderSelector } from \"../../../store/selectors/linkDataSelectors\";\nimport { IOrder } from \"../../../model/IOrder\";\nimport { getLocalStorage, LANGUAGE, setLocalStorage } from \"../../../utils/storageUtils\";\n\ninterface IExternalLanguageSelectorProps extends WithTranslation {}\n\ninterface IConnectedLanguageSelectorProps {\n readonly activeLanguage: LanguageLocale;\n readonly changeLanguage: typeof changeLanguage;\n}\n\ninterface ILanguageSelectorProps\n extends IExternalLanguageSelectorProps,\n IConnectedLanguageSelectorProps {\n order: IOrder | null;\n }\n\ninterface ILanguageEditableState {\n dropdownOpen: boolean;\n}\n\nconst languages = [LanguageLocale.IT, LanguageLocale.EN];\n\n/**\n * language dropdown component \n */\nclass Index extends React.Component {\n\n componentDidMount(): void {\n if(getLocalStorage(LANGUAGE)){\n const localSetting = getLocalStorage(LANGUAGE)\n this.props.changeLanguage(localSetting.language);\n console.log('localSetting', localSetting.language)\n }\n if (this.props.i18n.language !== this.props.activeLanguage) {\n this.props.i18n.changeLanguage(this.props.activeLanguage);\n console.log('this.props.i18n.language', this.props.i18n.language)\n }\n\n }\n\n componentDidUpdate(prevProps: Readonly): void {\n if(getLocalStorage(LANGUAGE)){\n const localSetting = getLocalStorage(LANGUAGE)\n this.props.changeLanguage(localSetting.language);\n console.log('localSetting A', localSetting.language)\n } else {\n // set defulat\n this.props.changeLanguage(LanguageLocale.IT);\n }\n if (this.props.i18n.language !== this.props.activeLanguage) {\n this.props.i18n.changeLanguage(this.props.activeLanguage);\n console.log('this.props.i18n.language A', this.props.i18n.language)\n }\n\n }\n\n changeLanguage = (language: LanguageLocale) => {\n if (this.props.activeLanguage !== language) {\n this.props.changeLanguage(language);\n this.closeDropdown();\n this.forceUpdate();\n\n let storeLanguage = {\n language: language\n };\n setLocalStorage(LANGUAGE, storeLanguage);\n console.log('storeLanguage', storeLanguage)\n }\n };\n\n /**\n * from a full language naming to a language that\n * can be displayed to the end user\n * e.g. input: it-IT will display IT\n */\n prettyLanguageName(fullLang: string) {\n return fullLang?.split('-')?.[0]?.trim()?.toUpperCase();\n }\n\n constructor(props: ILanguageSelectorProps) {\n super(props);\n\n this.state = {\n dropdownOpen: false,\n }\n }\n\n openDropdown() {\n // window.alert('open dropdown!');\n // this.dropdownOpen = true;\n this.setState({ dropdownOpen: true })\n }\n\n dropdownBox() {\n if (this.state.dropdownOpen === true) {\n return (
open here!
);\n }\n }\n\n closeDropdown() {\n this.setState({ dropdownOpen: false });\n }\n\n toggleDropdown() {\n if (!this.state.dropdownOpen) {\n this.openDropdown();\n } else {\n this.closeDropdown();\n }\n }\n\n render() {\n // if order is not fully loaded don't show language switcher\n // as if the language is english the user will see the italian\n // language being selected by default for few seconds before the\n // order has loaded\n if (!this.props.order) {\n return null;\n }\n\n return (\n
\n this.toggleDropdown()}\n >\n {this.prettyLanguageName(this.props.activeLanguage)}\n \n \n this.closeDropdown()}\n className={`${styles.dropdownBox} ${\n this.state.dropdownOpen === true ?\n styles.display : styles.hide\n }`\n }\n >\n {\n languages.map((lang: LanguageLocale, i: number) => (\n this.changeLanguage(lang)}\n >\n {this.prettyLanguageName(lang)}\n
\n ))\n }\n
\n \n );\n }\n}\n\nexport default connect(\n (state: RootState) => ({\n activeLanguage: languageSelector(state),\n order: orderSelector(state),\n }),\n {\n changeLanguage\n }\n)(withTranslation()(Index));\n","import React from 'react';\nimport {useTranslation} from 'react-i18next';\n\nexport const InvalidUrlError = () => {\n const { t } = useTranslation();\n\n return (\n
\n
\n { t('invalidUrl') }\n
\n
\n );\n};\n","import React from 'react';\nimport styles from \"./styles.module.scss\";\nimport TooltipInfo from './TooltipInfo';\nimport Translate from '../Translate';\n\nexport enum TooltipIconSize {\n Small = 'small',\n Big = 'big',\n}\n\nexport enum TooltipType {\n Web = 'web',\n Mobile = 'mobile',\n}\n\ninterface ITooltipProps {\n infoKey: string\n size?: TooltipIconSize,\n}\n\ninterface ITooltipState {\n showInfo: boolean,\n type: TooltipType,\n}\n\nclass Tooltip extends React.Component {\n\n constructor(props: ITooltipProps) {\n super(props);\n\n this.state = {\n showInfo: false,\n type: TooltipType.Web,\n }\n }\n\n componentWillMount() {\n this.onResize();\n }\n\n componentDidMount() {\n window.addEventListener('resize', this.onResize);\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.onResize);\n }\n\n render() {\n const size = this.props.size ? styles[this.props.size] : '';\n\n return (\n
\n
\n { this.renderInfo() }\n
\n )\n }\n\n private renderInfo() {\n if (!this.state.showInfo) {\n return null;\n }\n\n return (}\n content={}\n type={this.state.type}/>\n )\n }\n\n private onMouseAction = () => {\n if (this.state.type !== TooltipType.Web) {\n return;\n }\n\n this.setState({showInfo: !this.state.showInfo})\n };\n\n private onClick = () => {\n if (this.state.type !== TooltipType.Mobile) {\n return;\n }\n\n this.setState({showInfo: !this.state.showInfo})\n };\n\n private onResize = () => {\n if (window.innerWidth > 992) {\n this.setState({\n type: TooltipType.Web,\n showInfo: false\n });\n return;\n }\n\n this.setState({type: TooltipType.Mobile});\n }\n}\n\nexport default Tooltip;","import React from 'react';\nimport styles from './styles.module.scss';\nimport Translate from '../../Translate';\nimport {TooltipType} from '../index';\n\ninterface ITooltipInfoProps {\n header: React.ReactFragment;\n content: React.ReactFragment;\n type: TooltipType;\n}\n\ninterface ITooltipInfoState {\n height: number\n}\n\nclass TooltipInfo extends React.Component {\n private divElement:React.Ref;\n\n constructor(props: ITooltipInfoProps) {\n super(props);\n\n this.divElement = React.createRef();\n\n this.state = {\n height: 0\n }\n }\n\n componentDidMount() {\n const tooltipInfo = document.getElementById('tooltipInfo');\n\n if (tooltipInfo) {\n this.setState({height: tooltipInfo.clientHeight})\n }\n }\n\n render() {\n const style = this.props.type === TooltipType.Web ? {top: -(this.state.height / 2 - 10)} : {};\n\n return (\n
\n
\n
\n {this.props.header && this.props.header}\n
\n
\n {this.props.content}\n
\n
\n
\n )\n }\n\n}\n\nexport default TooltipInfo;","import React from 'react';\nimport styles from \"./styles.module.scss\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faAsterisk } from '@fortawesome/free-solid-svg-icons'\nimport TooltipInfo from '../../Tooltip/TooltipInfo'\nimport { SchedulePlan } from '../../../../model/IOrder';\nimport Translate from '../../Translate';\nimport Moment from \"react-moment\";\n\nexport enum TooltipIconSize {\n Small = 'small',\n Big = 'big',\n}\n\nexport enum TooltipType {\n Web = 'web',\n Mobile = 'mobile',\n}\n\ninterface ISchedulePlanTooltipProps {\n className: string\n schedulePlan: SchedulePlan\n}\n\ninterface ITooltipState {\n showInfo: boolean,\n type: TooltipType,\n}\n\nclass SchedulePlanTooltip extends React.Component {\n\n constructor(props: ISchedulePlanTooltipProps) {\n super(props);\n\n this.state = {\n showInfo: false,\n type: TooltipType.Web,\n }\n }\n\n componentWillMount() {\n this.onResize();\n }\n\n componentDidMount() {\n window.addEventListener('resize', this.onResize);\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.onResize);\n }\n\n render() {\n return (\n
\n \n { this.renderInfo() }\n
\n )\n }\n\n private renderInfo() {\n if (!this.state.showInfo) {\n return null;\n }\n\n return (}\n content={{this.props.schedulePlan.originalChargeDate}} type={this.state.type}/>)\n }\n\n private onMouseAction = () => {\n if (this.state.type !== TooltipType.Web) {\n return;\n }\n\n this.setState({showInfo: !this.state.showInfo})\n };\n\n private onClick = () => {\n if (this.state.type !== TooltipType.Mobile) {\n return;\n }\n\n this.setState({showInfo: !this.state.showInfo})\n };\n\n private onResize = () => {\n if (window.innerWidth > 992) {\n this.setState({\n type: TooltipType.Web,\n showInfo: false\n });\n return;\n }\n\n this.setState({type: TooltipType.Mobile});\n }\n}\n\nexport default SchedulePlanTooltip;","import React from 'react';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {orderSelector, validUntilSelector} from '../../../store/selectors/linkDataSelectors';\nimport {changeValidUntil} from '../../../store/reducers/linkDataSlice';\nimport {EnumCustomColor, IOrder} from '../../../model/IOrder';\nimport Tooltip from '../Tooltip';\nimport i18n from '../../../i18n';\nimport { languageSelector } from '../../../store/selectors/sagaSelectors';\n\ninterface IExternalDateInputProps {\n}\n\ninterface IConnectedDateInputProps {\n order: IOrder | null;\n validUntil: string | null;\n changeValidUntil: typeof changeValidUntil;\n}\n\ninterface IDateInputProps extends IExternalDateInputProps, IConnectedDateInputProps {}\n\nexport interface IDateInputState {\n validUntil: string | null;\n isValid: boolean;\n isTouched: boolean;\n}\n\nclass DateInput extends React.Component {\n\n private onInputChange = (e: any) => {\n if (!e.target) {\n return;\n }\n\n this.setState({\n validUntil: e.target.value\n });\n\n this.props.changeValidUntil(e.target.value);\n\n };\n\n private onInputBlur = () => {\n if ( !this.state || !this.state.isTouched) {\n this.setState({isTouched: true});\n }\n };\n\n componentDidMount() {\n if (!this.props.validUntil) {\n return;\n }\n\n this.setState({validUntil: this.props.validUntil})\n }\n\n render() {\n if (this.props.order?.contextId) {\n return null;\n }\n const value = this.state && this.state.validUntil ? this.state.validUntil : '';\n\n return (\n
\n \n
\n \n
\n \n
\n );\n }\n\n private getMinDate(): string {\n const now = new Date(),\n year = now.getFullYear();\n let day: any = now.getDate(),\n month: any = now.getMonth() + 1;\n\n if(month < 10) month = '0' + month.toString();\n if(day < 10) day = '0' + day.toString();\n\n return year + '-' + month + '-' + day;\n }\n\n private _getCustomDateInputClass(): string {\n // base class\n let customDateInputClassName = 'customDateInput';\n \n // add white or black based on order's settings\n if (this.props.order?.customTheme?.calendarIcon === EnumCustomColor.WHITE) {\n customDateInputClassName += '--white';\n } else {\n customDateInputClassName += '--black';\n }\n\n // check if browser is chrome alike (webkit engine) and add -webkit suffix\n // ref https://stackoverflow.com/a/21756811\n if (navigator.userAgent.indexOf('AppleWebKit') !== -1) {\n customDateInputClassName += '-webkit';\n }\n\n return customDateInputClassName;\n }\n}\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n validUntil: validUntilSelector(state),\n language: languageSelector(state),\n };\n },\n {\n changeValidUntil\n }\n)(DateInput);","import React from \"react\";\nimport Moment from \"react-moment\";\nimport { connect } from \"react-redux\";\nimport { RootState } from \"../../../store/reducers\";\nimport { orderSelector } from \"../../../store/selectors/linkDataSelectors\";\nimport { IOrder, IRecurrentDetails, SchedulePlan } from \"../../../model/IOrder\";\nimport CurrencyConverter from \"../CurrencyConverter\";\nimport i18n from \"../../../i18n\";\nimport { languageSelector } from \"../../../store/selectors/sagaSelectors\";\nimport SchedulePlanTooltip from \"./SchedulePlanTooltip\"\nimport styles from \"./styles.module.scss\";\n\ninterface IPlanInfoProps {\n order: IOrder | null;\n requiredEndDivider?: boolean;\n}\n\nclass PlanInfo extends React.Component {\n private splitSchedulesInHalf(rawSchedulesList: SchedulePlan[]) {\n // sort schedules by chargeDate (intdate field)\n const sortedRawSchedulesList = rawSchedulesList.sort(\n (a, b) => a.chargeDate - b.chargeDate\n );\n\n // ~~ create react elements\n const formattedSchedules = [];\n for (const thisSchedule of sortedRawSchedulesList) {\n formattedSchedules.push(\n this.renderSchedulePlan(thisSchedule)\n );\n }\n\n // split schedules array in half so\n // we can easily populate the two UI columns\n // split code taken from https://stackoverflow.com/a/47777083\n // using ceil so the first column has more elements\n const halfwayThrough = Math.ceil(formattedSchedules.length / 2);\n\n const arrayFirstHalf = formattedSchedules.slice(0, halfwayThrough);\n const arraySecondHalf = formattedSchedules.slice(\n halfwayThrough,\n formattedSchedules.length\n );\n\n return {\n left: arrayFirstHalf,\n right: arraySecondHalf,\n };\n }\n\n private formatOneTime(rawOneTimePlan: SchedulePlan) {\n return (\n
\n {i18n.t(`plan.planOneTime`)}\n
\n
\n {i18n.t(`orderDetails.amount`)}: \n \n \n \n
\n\n
\n {i18n.t(`plan.date`)}: \n \n \n {rawOneTimePlan.chargeDate}\n \n \n
\n
\n
\n );\n }\n\n private formatSchedules(rawSchedulePlan: SchedulePlan[] | undefined) {\n if (!rawSchedulePlan) {\n return null;\n }\n\n const schedulesResult = this.splitSchedulesInHalf(rawSchedulePlan);\n\n // sanity check - for inferring should never happen\n if (!schedulesResult) {\n return null;\n }\n\n const left = schedulesResult.left;\n const right = schedulesResult.right;\n\n return (\n
\n {i18n.t(`plan.planSchedule`)}\n
\n
{left}
\n
{right}
\n
\n
\n );\n }\n\n private getFrequencyMessage(recurrentData: IRecurrentDetails) {\n // map proto enum key to the key that rapresents the translation\n // as we are displaying \"day\" we cannot use \"daily\" as it has a different meaning\n let frequencyPeriodMapping = \"day\";\n\n if (recurrentData.repeatPeriod === \"DAILY\") {\n frequencyPeriodMapping = \"day\";\n } else if (recurrentData.repeatPeriod === \"MONTHLY\") {\n frequencyPeriodMapping = \"month\";\n } else if (recurrentData.repeatPeriod === \"YEARLY\") {\n frequencyPeriodMapping = \"year\";\n }\n\n let messagePrefix: string = '';\n\n if (\n typeof recurrentData.repeatEvery === \"number\" &&\n recurrentData.repeatEvery !== 0\n ) {\n if (recurrentData.repeatEvery > 1) {\n // plural with number in message\n messagePrefix = `${i18n.t(\"plan.every\")} ${recurrentData.repeatEvery} ${i18n.t(\n `plan.period.${frequencyPeriodMapping}`,\n { count: recurrentData.repeatEvery }\n )}`;\n // return `Ogni ${recurrentData.repeatEvery} ${frequencyPeriodMapping}`\n } else {\n // singular with no number in message\n messagePrefix = `${i18n.t(\"plan.every\")} ${i18n.t(\n `plan.period.${frequencyPeriodMapping}`\n )}`;\n }\n }\n\n if (\n typeof recurrentData.endAfterTimes === \"number\" &&\n recurrentData.endAfterTimes !== 0\n ) {\n messagePrefix = `${messagePrefix} ${i18n.t(\"plan.for\")} ${recurrentData.endAfterTimes} ${i18n.t(\n \"orderDetails.charge\",\n { count: recurrentData.endAfterTimes }\n )}`;\n // return per ${recurrentData.endAfterTimes} addebiti`;\n }\n\n if (\n typeof recurrentData.endOnDate === \"number\" &&\n recurrentData.endOnDate !== 0\n ) {\n const formattedEndOnDate = (\n \n {recurrentData.endOnDate}\n \n );\n\n return (\n \n {`${messagePrefix} ${i18n.t(\"plan.till\")} `}\n {formattedEndOnDate}\n \n );\n // return fino al ${formattedEndOnDate}`;\n }\n\n\n // at this point no end* was provided, return just prefix as the final message\n return messagePrefix;\n }\n\n private formatRecurrent() {\n if (!this.props.order?.plan?.recurrent) {\n return null;\n }\n\n const frequencyMessage = this.getFrequencyMessage(\n this.props.order?.plan?.recurrent\n );\n\n return (\n
\n {i18n.t(`plan.planRecurrent`)}\n
\n
\n {i18n.t(`orderDetails.amount`)}: \n \n \n \n
\n\n
\n {i18n.t(`plan.startDate`)}: \n \n \n {this.props.order?.plan?.recurrent?.startOn}\n \n \n
\n\n {\n // if frequencyMessage is set display it\n frequencyMessage ? (\n
\n {i18n.t(\"plan.frequency\")}: \n {frequencyMessage}\n
\n ) : null\n }\n
\n
\n );\n }\n\n private renderSchedulePlan(schedulePlan: SchedulePlan) {\n return (\n
\n {schedulePlan.originalChargeDate \n ? \n : \n }\n
\n \n \n {schedulePlan.chargeDate}\n \n \n \n \n \n
\n
\n );\n }\n\n /**\n * recognize type of plan based on order.plan structure,\n * with additional workaround for proto on empty objects {}\n */\n getTypeOfPlan() {\n const planObject = this.props.order?.plan;\n\n if (typeof planObject?.schedules?.plans !== \"undefined\") {\n return \"schedules\";\n }\n\n if (typeof planObject?.recurrent?.amount !== \"undefined\") {\n return \"recurrent\";\n }\n\n if (typeof planObject?.onetime?.amount !== \"undefined\") {\n return \"onetime\";\n }\n }\n\n renderEndDivider() {\n if (this.props.requiredEndDivider) {\n return (\n
\n );\n }\n }\n\n render() {\n const typeOfPlan = this.getTypeOfPlan();\n\n if (!this.props.order || !this.props.order.plan || !typeOfPlan) {\n return null;\n }\n\n let planContent: JSX.Element | null = null;\n\n if (typeOfPlan === \"onetime\") {\n const oneTime = this.props.order.plan.onetime;\n // for infering\n if (!oneTime) {\n return null;\n }\n planContent = this.formatOneTime(oneTime);\n } else if (typeOfPlan === \"schedules\") {\n planContent = this.formatSchedules(\n this.props.order.plan.schedules?.plans\n );\n } else if (typeOfPlan === \"recurrent\") {\n planContent = this.formatRecurrent();\n }\n\n // sanity check - should never happen\n if (!planContent) {\n return null;\n }\n\n return (\n
\n
\n\n
\n {planContent}\n
\n\n { this.renderEndDivider() }\n
\n );\n }\n}\n\nexport default connect((state: RootState) => {\n return {\n order: orderSelector(state),\n activeLanguage: languageSelector(state)\n };\n}, {})(PlanInfo);\n","import React, {FC} from 'react';\nimport Translate from '../../Common/Translate';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {orderSelector} from '../../../store/selectors/linkDataSelectors';\nimport {IOrder} from '../../../model/IOrder';\nimport {changeActiveStep, changeFlow, FlowType} from '../../../store/reducers/sagaSlice';\nimport {changeSavePaymentMethod} from '../../../store/reducers/linkDataSlice';\nimport OrderDetails from '../../Common/OrderDetails';\nimport DateInput from '../../Common/DatelInput';\nimport ExpirationInfo from '../../Common/ExpirationInfo';\nimport PlanInfo from '../../Common/PlanInfo';\nimport { languageSelector } from '../../../store/selectors/sagaSelectors';\nimport CancelButton from '../../Common/CancelButton';\nimport PaymentMethodOptionList from \"../../Common/PaymentMethodOptionList\";\nimport OrderEmailNoteBox from '../../Common/OrderEmailNoteBox';\n\ninterface IPaymentDetailsProps {\n order: IOrder | null;\n changeActiveStep: typeof changeActiveStep;\n changeSavePaymentMethod: typeof changeSavePaymentMethod;\n changeFlow: typeof changeFlow;\n}\n\nconst PaymentDetails:FC = (props: IPaymentDetailsProps) => {\n\n props.changeFlow(FlowType.PM_PROVIDED_BY_USER_AND_NOT_SAVED);\n\n if (!props.order || !props.order.sourceTypes || !Array.isArray(props.order.sourceTypes)) {\n return null;\n }\n\n const hasAPlan = props.order.plan;\n\n const renderCancelButton = () => {\n if(props.order?.cancelUrl){\n return ;\n }\n };\n\n return (\n \n

\n \n\n {\n // if order has a plan display it otherwise display the validUntil date form input\n hasAPlan ? : \n }\n\n \n\n
\n \n \n
\n
\n {renderCancelButton()}\n
\n \n\n
\n\n
\n );\n};\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n activeLanguage: languageSelector(state),\n };\n },\n {\n changeSavePaymentMethod,\n changeActiveStep,\n changeFlow\n }\n)(PaymentDetails);\n","import React, {FC} from 'react';\n\nimport {connect} from 'react-redux';\nimport {Redirect} from 'react-router';\nimport PaymentDetails from '../PaymentDetails';\nimport TsPayRedirect from '../../Common/Redirect';\nimport {RootState} from '../../../store/reducers';\nimport {orderSelector} from '../../../store/selectors/linkDataSelectors';\nimport {activeStepSelector, languageSelector} from '../../../store/selectors/sagaSelectors';\nimport {changeActiveStep} from '../../../store/reducers/sagaSlice';\nimport {IOrder} from '../../../model/IOrder';\nimport {LinkStep} from '../../../model/LinkStep';\nimport Translate from '../../Common/Translate';\nimport {useInjection} from '../../../ioc';\nimport {ErrorHandlerService} from '../../../service';\nimport { Config } from '../../../core';\n\nexport interface IStepManagerProps {\n order: IOrder | null;\n language: string;\n activeStep: LinkStep | null;\n changeActiveStep: typeof changeActiveStep;\n}\n\nconst StepManager: FC = (props: IStepManagerProps) => {\n\n const errorHandlerService = useInjection(ErrorHandlerService);\n\n // TODO manage publishableKey. why is this required for source?\n //if (!props.order || !props.activeStep || !props.order.publishableKey) {\n if (!props.order || !props.activeStep) {\n return ();\n }\n\n const getActiveStep = (activeStep: LinkStep) => {\n switch(activeStep) {\n case LinkStep.PaymentDetails:\n return ;\n case LinkStep.Redirect:\n return ;\n case LinkStep.Error:\n return ;\n default:\n errorHandlerService.handleInternalError(`[StepManager]: active step name is invalid:${activeStep}`);\n return null;\n }\n };\n const config = Config();\n\n return (\n
\n
\n { getActiveStep(props.activeStep) }\n
\n
\n );\n};\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n activeStep: activeStepSelector(state),\n language: languageSelector(state)\n };\n },\n {\n changeActiveStep\n }\n)(StepManager);\n","import React, { FC, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Redirect, useParams } from \"react-router\";\nimport { catchError, first, tap } from \"rxjs/operators\";\nimport { WindowWithCustomAppConfig, redirectToPayMethodWebappIfRequired } from \"../../core\";\nimport i18n from \"../../i18n\";\nimport { useInjection } from \"../../ioc\";\nimport { IOrder } from \"../../model/IOrder\";\nimport { LinkName } from \"../../model/LinkName\";\nimport { LinkStep } from \"../../model/LinkStep\";\nimport { Link2SaveDaoService } from \"../../service/dao\";\nimport { changeOrder, cleanState } from \"../../store/reducers/linkDataSlice\";\nimport { changeActiveLinkName, changeActiveStep, changeFlow, changeLanguage, FlowType } from \"../../store/reducers/sagaSlice\";\nimport Translate from \"../Common/Translate\";\nimport StepManager from \"./StepManager\";\nimport { IUrlParams } from \"../../model/IUrlParams\";\n\nexport interface ILink2SaveProps {\n changeOrder: typeof changeOrder;\n changeActiveStep: typeof changeActiveStep;\n changeActiveLinkName: typeof changeActiveLinkName;\n changeLanguage: typeof changeLanguage;\n changeFlow: typeof changeFlow;\n cleanState: typeof cleanState;\n}\n\nconst Link2Save: FC = (props: ILink2SaveProps) => {\n props.changeActiveStep(LinkStep.PaymentDetails);\n props.changeActiveLinkName(LinkName.Link2Save);\n props.changeFlow(FlowType.PM_PROVIDED_BY_USER_AND_NOT_SAVED);\n\n const [isLoading, setIsLoading] = useState(true);\n const [isError, setIsError] = useState(false);\n\n const { orderKey } = useParams();\n const link2SaveDaoService = useInjection(Link2SaveDaoService);\n\n useEffect(() => {\n const fetchData = async () => {\n return await link2SaveDaoService\n .retrieveOrder(orderKey as string)\n .pipe(\n first(),\n tap((order: IOrder) => {\n const orderFound = order;\n\n // set type of order if not returned\n orderFound.type = orderFound.type || \"link2save\";\n\n props.changeOrder(orderFound);\n\n i18n.changeLanguage(orderFound.langLocale);\n\n setTimeout(() => props.changeLanguage(orderFound.langLocale), 0);\n (window as WindowWithCustomAppConfig).applyTheme?.(orderFound.customTheme);\n\n //redirect to stp or pp when exist a single paymethod\n redirectToPayMethodWebappIfRequired(order);\n\n //dealy loading if exist a single paymethod\n hideLoading(order);\n }),\n catchError((e: any) => {\n setIsLoading(false);\n setIsError(true);\n return e;\n })\n )\n .subscribe();\n };\n\n fetchData();\n }, []);\n\n const hideLoading = (order: IOrder) => {\n const sourceTypes = order.sourceTypes\n if(sourceTypes?.length == 1) {\n setTimeout(() => {\n setIsLoading(false);\n }, 1000);\n } else {\n setIsLoading(false);\n }\n }\n\n \n\n if (isLoading) {\n return ;\n }\n\n if (isError) {\n return ;\n }\n\n return (\n
\n TS Pay - Checkout\n \n
\n );\n};\n\nexport default connect(\n () => {\n return {};\n },\n {\n changeOrder,\n changeActiveStep,\n changeActiveLinkName,\n changeLanguage,\n cleanState,\n changeFlow,\n }\n)(Link2Save);\n","import React from 'react';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {orderSelector, savePaymentMethodSelector} from '../../../store/selectors/linkDataSelectors';\nimport {IOrder} from '../../../model/IOrder';\nimport Translate from '../../Common/Translate';\nimport OrderDetails from '../../Common/OrderDetails';\nimport 'moment/locale/it';\nimport {changeFlow, changeActiveStep, FlowType} from '../../../store/reducers/sagaSlice';\nimport {changeSavePaymentMethod} from '../../../store/reducers/linkDataSlice';\nimport ExpirationInfo from '../../Common/ExpirationInfo';\nimport TspayInformationalPdf from '../../Common/TspayInformationalPdf';\nimport CancelButton from '../../Common/CancelButton';\nimport PaymentMethodOptionList from '../../Common/PaymentMethodOptionList';\nimport OrderEmailNoteBox from '../../Common/OrderEmailNoteBox';\n\ninterface IPaymentDetailsProps {\n order: IOrder | null;\n savePaymentMethod: boolean;\n changeFlow: typeof changeFlow;\n changeSavePaymentMethod: typeof changeSavePaymentMethod;\n changeActiveStep: typeof changeActiveStep;\n}\n\nclass PaymentDetails extends React.Component {\n\n componentDidMount() {\n const flow = this.props.savePaymentMethod ?\n FlowType.PM_PROVIDED_BY_USER_AND_SAVED : FlowType.PM_PROVIDED_BY_USER_AND_NOT_SAVED;\n this.props.changeFlow(flow);\n }\n\n renderNetAmountChargePdf = () => {\n if(this.props.order?.netAmountFlag){\n let orderFee = 0;\n if(this.props.order.amounts?.sepa_debit.fee.amount) {\n orderFee = +(this.props.order.amounts.sepa_debit.fee.amount) / 100;\n }\n return \n }\n }\n\n renderCancelButton = () => {\n if(this.props.order?.cancelUrl){\n return ;\n }\n }\n\n render() {\n if (!this.props.order || !this.props.order.sourceTypes || !Array.isArray(this.props.order.sourceTypes)) {\n return null;\n }\n\n return (\n \n

\n \n {this.renderNetAmountChargePdf()}\n\n \n\n
\n \n \n
\n
\n {this.renderCancelButton()}\n
\n \n\n
\n
\n );\n }\n}\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n savePaymentMethod: savePaymentMethodSelector(state),\n };\n },\n {\n changeFlow,\n changeActiveStep,\n changeSavePaymentMethod\n }\n)(PaymentDetails);","import React, {FC} from 'react';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {activeStepSelector} from '../../../store/selectors/sagaSelectors';\nimport {LinkStep} from '../../../model/LinkStep';\nimport TsPayRedirect from '../../Common/Redirect';\nimport Translate from '../../Common/Translate';\nimport {useInjection} from '../../../ioc';\nimport {ErrorHandlerService} from '../../../service';\nimport PaymentDetails from '../PaymentDetails';\nimport {Redirect} from 'react-router';\n\nexport interface IStepManagerProps {\n activeStep: LinkStep | null;\n}\n\nconst StepManager: FC = (props: IStepManagerProps) => {\n const errorHandlerService = useInjection(ErrorHandlerService);\n\n if (!props.activeStep) {\n return ();\n }\n\n const getActiveStep = (activeStep: LinkStep | null) => {\n switch(activeStep) {\n case LinkStep.PaymentDetails:\n return ;\n case LinkStep.Redirect:\n return ;\n case LinkStep.Error:\n return ;\n default:\n errorHandlerService.handleInternalError(`[StepManager]: active step name is invalid:${activeStep}`);\n return null;\n }\n };\n\n return getActiveStep(props.activeStep);\n};\n\nexport default connect(\n (state: RootState) => {\n return {\n activeStep: activeStepSelector(state),\n };\n },\n {}\n)(StepManager);\n","import React, {FC} from 'react';\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport {activeStepSelector, languageSelector} from '../../../store/selectors/sagaSelectors';\nimport {orderSelector} from '../../../store/selectors/linkDataSelectors';\nimport {IOrder} from '../../../model/IOrder';\nimport Translate from '../../Common/Translate';\nimport StepManager from '../StepManager';\nimport { Config } from '../../../core';\nimport { LinkStep } from '../../../model/LinkStep';\n\nexport interface IStepManagerProps {\n order: IOrder | null;\n language: string;\n activeStep: LinkStep | null;\n}\n\nconst LinkHost: FC = (props: IStepManagerProps) => {\n\n const publishableKey = props.order?.acquire?.stp.publishableKey || props.order?.acquire?.stp?.info?.publishableKey;\n if (!props.order || !publishableKey) {\n return ();\n }\n\n const config = Config();\n\n return (\n
\n
\n \n
\n
\n );\n};\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state),\n language: languageSelector(state),\n activeStep: activeStepSelector(state),\n };\n },\n {}\n)(LinkHost);\n","import React, { FC, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Redirect, useParams } from \"react-router\";\nimport { catchError, first, tap } from \"rxjs/operators\";\nimport { WindowWithCustomAppConfig } from \"../../core\";\nimport i18n from \"../../i18n\";\nimport { useInjection } from \"../../ioc\";\nimport { IOrder } from \"../../model/IOrder\";\nimport { LinkName } from \"../../model/LinkName\";\nimport { LinkStep } from \"../../model/LinkStep\";\nimport { PayMeDaoService } from \"../../service/dao\";\nimport { changeOrder, cleanState } from \"../../store/reducers/linkDataSlice\";\nimport { changeActiveLinkName, changeActiveStep, changeLanguage } from \"../../store/reducers/sagaSlice\";\nimport Translate from \"../Common/Translate\";\nimport LinkHost from \"./LinkHost\";\nimport { IUrlParams } from \"../../model/IUrlParams\";\n\nexport interface IPayMeProps {\n changeOrder: typeof changeOrder;\n changeActiveStep: typeof changeActiveStep;\n changeActiveLinkName: typeof changeActiveLinkName;\n changeLanguage: typeof changeLanguage;\n cleanState: typeof cleanState;\n}\n\nconst PayMe: FC = (props: IPayMeProps) => {\n // setup link\n props.changeActiveLinkName(LinkName.PayMe);\n props.changeActiveStep(LinkStep.PaymentDetails);\n\n const [isLoading, setIsLoading] = useState(true);\n const [isError, setIsError] = useState(false);\n\n const { orderKey } = useParams();\n const payMeDaoService = useInjection(PayMeDaoService);\n\n useEffect(() => {\n const fetchData = async () => {\n return await payMeDaoService\n .retrieveOrder(orderKey as string)\n .pipe(\n first(),\n tap((order: IOrder) => {\n const orderFound = order;\n\n // set type of order if not returned\n orderFound.type = orderFound.type || \"payme\";\n props.changeOrder(orderFound);\n\n i18n.changeLanguage(orderFound.langLocale);\n\n setTimeout(() => props.changeLanguage(orderFound.langLocale), 0);\n (window as WindowWithCustomAppConfig).applyTheme?.(orderFound.customTheme);\n\n setIsLoading(false);\n }),\n catchError((e: any) => {\n setIsLoading(false);\n setIsError(true);\n return e;\n })\n )\n .subscribe();\n };\n\n fetchData();\n }, []);\n\n if (isLoading) {\n return ;\n }\n\n if (isError) {\n return ;\n }\n\n return (\n
\n TS Pay - POS digitale\n \n
\n );\n};\n\nexport default connect(\n () => {\n return {};\n },\n {\n changeOrder,\n changeActiveStep,\n changeActiveLinkName,\n changeLanguage,\n cleanState,\n }\n)(PayMe);\n","import React, { FC } from 'react';\nimport styles from \"../../../styles.module.scss\";\nimport {connect} from 'react-redux';\nimport {RootState} from '../../../store/reducers';\nimport { languageSelector } from '../../../store/selectors/sagaSelectors';\nimport {orderSelector} from '../../../store/selectors/linkDataSelectors';\nimport {IOrder} from '../../../model/IOrder';\n\n\nexport interface TspayDetailIconProps {\n order: IOrder | null;\n}\nconst TspayDetailIcon:FC = (props: TspayDetailIconProps) => {\n //private detailUrl = 'www.google.it?test='+this.props.order?.type;//'https://www.teamsystempayments.com/ts-pay';\n if (!props.order || !props.order.type) {\n return null;\n }\n const detailUrl = props.order.type === 'payme' ?\n 'https://www.teamsystempayments.com/ts-pay/pos-digitale' :\n 'https://www.teamsystempayments.com/ts-pay';\n\n return (\n \n );\n}\n\n\nexport default connect(\n (state: RootState) => {\n return {\n language: languageSelector(state),\n order: orderSelector(state)\n };\n },\n {}\n)(TspayDetailIcon);","import React from 'react';\nimport { WindowWithCustomAppConfig } from '../../../core';\nimport { IOrder } from '../../../model/IOrder';\nimport { RootState } from '../../../store/reducers';\nimport { connect } from 'react-redux';\nimport { orderSelector } from '../../../store/selectors/linkDataSelectors';\n\nexport interface IDevtHinBoxProps {\n order: IOrder | null;\n}\n\nclass DevHinBox extends React.Component {\n\n\n render() {\n if ((window as WindowWithCustomAppConfig)?.$APP_CONFIG?.displayTestCard !== true) {\n return null;\n }\n\n if (!this.props.order) {\n return null;\n }\n\n if(this.props.order.type !== \"payme\") {\n return null;\n }\n\n return (\n
\n
test visa card: 4242424242424242
\n
test 3d secure: 4000002500003155
\n
test 3d secure: 4000002760003184
\n\n
test iban: IT40S0542811101000000123456
\n
\n )\n }\n}\n\nexport default connect(\n (state: RootState) => {\n return {\n order: orderSelector(state)\n };\n },\n {\n }\n)(DevHinBox);","import 'reflect-metadata';\nimport React from 'react';\nimport {BrowserRouter as Router, Switch, Route,} from 'react-router-dom';\nimport {container, InjectionReduxProvider} from './ioc';\nimport './assets/styles/global.scss';\nimport styles from \"./styles.module.scss\";\nimport store from './store';\nimport Link2Pay from './components/Link2Pay';\nimport Error from './components/Common/Error';\nimport { BrowserNotCompatibleError } from './components/Common/Error/BrowserNotCompatible';\nimport ApiKeyActivated from './components/Common/ApiKeyActivated';\nimport Index from './components/Common/LanguageSelector'\nimport { InvalidUrlError } from './components/Common/Error/InvalidUrl';\nimport Link2Save from './components/Link2Save';\nimport PayMe from './components/PayMe';\nimport TspayDetailIcon from './components/Common/TspayDetailIcon';\nimport DevHinBox from './components/Common/DevHinBox';\n\nexport default function Main() {\n\n\n return (\n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n\n \n
\n \n \n );\n}","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n process.env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","// support ie https://stackoverflow.com/a/62537953\nimport 'react-app-polyfill/ie9';\nimport 'react-app-polyfill/stable';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport \"./i18n\";\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"pmoListContainer\":\"styles_pmoListContainer__2ODRC\",\"selectPayMethod\":\"styles_selectPayMethod__1Gc6L\",\"pmoList\":\"styles_pmoList__3XyqN\",\"cardIcon\":\"styles_cardIcon__2_S9f\",\"pisIcon\":\"styles_pisIcon__3AR5t\",\"sepaIcon\":\"styles_sepaIcon__bxIl2\",\"paypalIcon\":\"styles_paypalIcon__36Q0I\",\"disabledPayMethod\":\"styles_disabledPayMethod__1apEb\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"listItem\":\"styles_listItem__19YUy\",\"listHeader\":\"styles_listHeader__19ThC\",\"listWrapper\":\"styles_listWrapper__2KHmd\",\"contentWrapper\":\"styles_contentWrapper__3XdLp\",\"inputWrapper\":\"styles_inputWrapper__3aYcJ\",\"checkboxLabel\":\"styles_checkboxLabel__3fDG5\",\"checkbox\":\"styles_checkbox__ILlwA\"};"],"sourceRoot":""}