{"version":3,"sources":["store/types/paymentSource.ts","store/types/transaction.ts","store/types/customer.ts","store/actionCreators/addPaymentSource.ts","store/actionCreators/updatePaymentSource.ts","store/actionCreators/dropin.ts","store/actionCreators/addCharge.ts","store/actionCreators/addTip.ts","dropin/notifier.ts","store/selectors/index.ts","api/types.ts","api/client.ts","store/types/index.ts","dropin/utils.ts","message.ts","components/CoBrand.tsx","components/DropinBody.tsx","components/ExitButton.tsx","components/DropinContent.tsx","components/DropinFooter.tsx","components/Loader.tsx","components/EndUserAgreement.tsx","components/AddPaymentSourceStepOne.tsx","components/DropinLoading.tsx","components/AddOrUpdatePaymentSourceStep.tsx","components/AddPaymentSourceStepSuccess.tsx","components/AddPaymentSourceStepSelection.tsx","components/SelectPaymentSourceMethodStep.tsx","components/AddCreditCardPaymentSourceStepOne.tsx","store/actionCreators/retryPaymentSourceLink.ts","components/UpdatePaymentSourceStepOne.tsx","pages/dropin/AddPaymentSourcePage.tsx","pages/dropin/UpdatePaymentSourcePage.tsx","components/PaymentAuthorizationAggreement.tsx","components/AddChargeStepOne.tsx","components/PaymentSucceeded.tsx","store/actionCreators/credits.ts","store/actionCreators/processingFees.ts","pages/dropin/AddChargePage.tsx","components/AddTipStepOne.tsx","pages/dropin/AddTipPage.tsx","pages/HomePage.tsx","components/DropinError.tsx","components/DropinLayout.tsx","store/actionCreators/findCustomer.ts","components/PhoneNumberInput.tsx","components/LoginForm.tsx","components/CustomerFooter.tsx","components/CustomerLoginStepOne.tsx","components/CustomerLoginStepSuccess.tsx","components/VerificationCode.tsx","components/CustomerLoginStepTwo.tsx","components/Login.tsx","components/CustomerSignupStepOne.tsx","components/SignupForm.tsx","components/CustomerSignupStepTwo.tsx","components/CustomerSignupStepThree.tsx","components/CustomerSignupStepSuccess.tsx","components/Signup.tsx","pages/dropin/FindCustomerPage.tsx","App.tsx","registerServiceWorker.ts","index.tsx","datadog.ts","sentry.ts","errorCodes.ts","store/reducers/paymentSource.ts","store/reducers/dropin.ts","store/reducers/error.ts","store/reducers/transaction.ts","store/reducers/aggregator.ts","store/reducers/customer.ts","store/configureStore.ts","store/index.ts"],"names":["PAYMENT_SOURCE_METHOD","ADD_PAYMENT_SOURCE_STEP","UPDATE_PAYMENT_SOURCE_STEP","ADD_CHARGE_STEP","ADD_TIP_STEP","CUSTOMER_PAGE","CUSTOMER_SIGNUP_STEP","CUSTOMER_LOGIN_STEP","getAddPaymentSourceConfigAction","payLinkId","dispatch","a","type","payload","client","getAddPaymentSourceConfig","body","result","plaid","link_token","createPlaidLinkTokenCacheValue","cache_key","customer_token","customerToken","publishable_key","publishableKey","LINK","StrongholdPayError","setAddPaymentSourceMethodAction","method","BANK","CREDIT_CARD","ONE","CC_ONE","plaidAddPaymentSourceSuccessAction","public_token","metadata","account_id","getState","Sentry","DataDog","StatusType","info","account","accounts","accountId","id","dropin","query","undefined","linkPlaidPaymentSource","notifier","success","SUCCESS","config","plaid_account_id","handleBankLinkErrors","yodleeAddPaymentSourceSuccessAction","providerAccountId","sites","linkYodleePaymentSource","provider_account_id","error","aggregatorName","code","ERROR_CODE","INVALID_FIELD","MESSAGE","NO_SUPPORTED_PAYMENT_METHOD","AGGREGATOR_ERROR_CODES","AGGREGATOR_SUPPORT_ERROR","toString","BANK_LINKING_AGGREGATOR_SUPPORT","replace","INCOMPATIBLE_YODLEE_ACCOUNT","BANK_LINKING_STRONGHOLD_SUPPORT","AGGREGATOR_INTEGRATION_ERROR","BANK_LINKING_AGGREGATOR_INTEGRATION_ERROR","AGGREGATOR_RETRYABLE_ACTION","LOGIN_REQUIRED_VERIFY","finicityListAccountsAction","aggregator","listFinicityAccounts","length","finicityAddPaymentSourceSuccessAction","SELECTION","finicityAccountId","linkFinicityPaymentSource","creditCardAddPaymentSourceSuccessAction","data","addPaymentSourceCreditCard","setCardSourceConfigSuccessAction","getUpdatePaymentSourceConfigAction","paymentSourceId","getPaymentSourceId","getUpdatePaymentSourceConfig","payment_source","is_re_authentication_needed","initDropinAction","parsedQuery","pathname","plaidOauth","isPlaidOauth","window","location","href","handleError","ready","setTimeout","exit","cacheKey","getSubdomain","getPlaidLinkTokenCacheValue","cacheResponse","ERROR_TYPE","AUTH_ERROR","INVALID_API_KEY","includes","INVALID_REQUEST_ERROR","INVALID_CUSTOMER_TOKEN","integrationId","payLinkCode","level","Severity","Warning","initDropin","apiVersion","merchant","has_credit_card_payments","METHOD","generateTsepManifest","manifest","isLogin","toLowerCase","LOGIN","SIGNUP","url","parts","URL","hostname","split","getAddChargeConfigAction","getAddChargeConfig","createChargeAction","transactionState","transaction","addConvenienceFee","addChargeConfig","add_convenience_fee","chargeAmount","charge","amount","convenience_fee","postCharge","authorize_only","authorizeOnly","pay_link_id","payment_source_id","external_id","externalId","tip","beneficiary_name","beneficiaryName","details","display_message","displayMessage","drawer_id","drawerId","PAYMENT_SOURCE_LOGIN_REQUIRED","notify","LOGIN_REQUIRED","getAddTipConfigAction","chargeId","getAddTipConfig","createTipAction","postTip","charge_id","Notifier","_parentOrigin","_parent","parent","_readyCalled","event","err","console","debug","JSON","stringify","object","ReactNativeWebView","postMessage","this","parse","e","getDefaultError","property","reference","message","EVENT","ERROR","EXIT","READY","toNumber","str","parseInt","isNaN","toCurrency","number","Intl","NumberFormat","style","currency","format","applicationState","isPropertyError","propertyName","AGGREGATOR_VENDOR","TsepEnvironment","_integrationId","_apiVersion","_pathname","options","axios","querystring","response","strongholdPayError","request","card_holder_name","cardHolderName","tsep_token","tsepToken","cvv2","expiration_date","expirationDate","card_type","cardType","masked_card_number","maskedCardNumber","zip","yodlee","map","value","additional_status","additionalStatus","provider_id","providerId","provider_name","providerName","request_id","requestId","status","finicity_account_id","charge_amount","key","API_ERROR","SERVER_ERROR","getErrorMessage","text","SOMETHING_WENT_WRONG","PAYMENT_SOURCE_ALREADY_EXISTS","PAYMENT_METHOD_ALREADY_ADDED","INSUFFICIENT_BALANCE","PAYMENT_SOURCE_UNAVAILABLE","PAYMENT_SOURCE_LOGIN_UNAVAILABLE","PAYMENT_SOURCE_INACTIVE","PAYMENT_SOURCE_ACTION_REQUIRED","MERCHANT_SOFTWARE_ERROR","CUSTOMER_BLOCKED","ENABLE_TO_USE_STRONGHOLD_PAY","PAYMENT_SOURCE_BLOCKED","FINANCIAL_INSTITUTION_CURRENTLY_NOT_SUPPORTED","CHARGE_BLOCKED_OUTSTANDING_PAYMENT","OUTSTANDING_PAYMENT_NOT_MADE","CHARGE_BLOCKED_EXCEEDS_LIMIT","PURCHASE_LIMIT_EXCEEDED","CHARGE_TIP_ALREADY_CREATED","CHARGE_TIP_ALREADY_EXISTS","PAY_LINK_CANCELED","PAY_LINK_WAS_CANCELED","INVALID_CHARGE_AMOUNT","INVALID_TIP_AMOUNT","INVALID_VERIFICATION_CODE","EXPIRED_CUSTOMER_TOKEN","VERIFICATION_CODE_EXPIRED","VALUE_TAKEN","NOT_FOUND","CONFLICT","BANK_ACCOUNT_VALIDATION_FAILURE","formatDobDisplay","dob","moment","formatDob","isValidDob","isValid","isValidEmail","email","test","NO_SUPPORTED_PAYMENT_METHOD_FOR_INSTITUTION","PAYMENT_METHODS_ALREADY_ADDED","CoBrand","className","props","merchantLogoUrl","height","width","src","alt","React","PureComponent","connect","state","logo_url","DropinBody","join","children","ExitButton","onClick","DropinContent","isMobile","hasExitButton","hasContainer","hasModal","containerClassName","containerId","exitButton","DropinFooter","Loader","isSpinner","size","color","EndUserAgreement","label","target","rel","AddPaymentSourceStepOne","merchantDisplayName","disabled","requesting","block","display_name","paymentSource","bindActionCreators","DropinLoading","AddOrUpdatePaymentSourceStepLink","setupPlaid","document","classList","add","cleanPlaid","remove","aggregatorVendor","Plaid","reinitializePlaid","Yodlee","Finicity","finicity","createConfig","token","plaidLinkToken","clientName","env","product","onSuccess","setTag","link_session_id","institution","name","mode","plaidAccountId","onUpdate","onExit","Error","extra","create","open","cachedValue","receivedRedirectUri","isExitCalled","onSuccessData","fastlink","fastLinkURL","yodleeUrl","accessToken","yodleeAccessToken","params","configName","flow","yodleeProviderAccountId","forceIframe","bankName","onClose","onError","reason","statusCode","finicityConnect","launch","finicityConnectUrl","selector","overlay","cancel","aggregator_vendor","access_token","connect_url","AddPaymentSourceStepSuccess","data-sh","data-dropin","paymentSourceLabel","AddPaymentSourceStepSelection","accountSelected","maxHeight","ListGroup","finicityAccounts","el","ListGroupItem","setState","active","action","real_account_number_last4","SelectPaymentSourceMethodStep","AddCreditCardPaymentSourceStepOne","componentDidMount","setInterval","getElementById","tsepHandler","eventType","responseCode","trim","zipCode","componentDidUpdate","prevProps","creditCardConfig","isAuthorizing","onSubmit","tsepConfig","Helmet","script_path","dangerouslySetInnerHTML","__html","data-validate-name","data-auto-formatting","data-validate-cc","data-detect-card-type","data-validate-expiry-date","data-validate-cvv2","data-validate-zipcode","tsep","getRetryPaymentSourceLinkConfigAction","retryModel","getRetryPaymentSourceLinkConfig","UpdatePaymentSourceStepOne","isRetry","showLoading","isReAuthenticationNeeded","AddPaymentSourcePage","step","hasCreditCardPayments","AddOrUpdatePaymentSourceStep","setStep","addStep","UpdatePaymentSourcePage","UPDATE","updateStep","PaymentAuthorizationAggreement","AddChargeStepOne","totalAmount","subAmount","Fragment","convenienceFee","tipAmount","creditsAmount","processingFee","combinedFees","creditValue","selectors","PaymentSucceeded","ownProps","setCreditValue","getMaxRedeemableCreditValue","setProcessingFee","getProcessingFeeValue","payment_processing_fee","AddChargePage","prev","skipPayScreen","skipSuccessScreen","addChargeStep","AddTipStepOne","AddTipPage","addTipStep","HomePage","DropinError","renderContact","closeButtonText","showContactSupport","DropinLayout","search","parsed","showError","withRouter","show","setCustomerPage","setCustomerLoginStep","setCustomerSignupStep","setAuthenticationMethod","loginAction","login","signupAction","authentication_method","customer_details","mobile","signup","verifyAction","customer","verify","PhoneNumberInput","placeholder","isInvalid","onChange","country","containerClass","inputProps","LoginForm","onLogin","authenticationMethod","username","customerLogin","TWO","preventDefault","toggleAuthMethod","authMethod","bind","submitRef","resetError","isDisabled","Form","noValidate","inline","checked","FormFeedback","autoComplete","currentTarget","invalid","ref","display","CustomerFooter","page","background","border","cursor","fontSize","padding","CustomerLoginStepOne","createRef","toggleLoginButton","content","current","click","CustomerLoginStepSuccess","VerificationCode","isResending","mask","input","inputElement","focus","onResend","signupRequest","CustomerLoginStepTwo","loginRequest","resendToken","toggleVerifyButton","Login","loginStep","CustomerSignupStepOne","SignupForm","showSms","tryLogin","to","dateOfBirth","date_of_birth","firstName","first_name","lastName","last_name","agree","onSignup","customerSignup","THREE","fn","htmlFor","resetCustomerSignup","CustomerSignupStepTwo","toggleSignupButton","CustomerSignupStepThree","CustomerSignupStepSuccess","Signup","signupStep","FindCustomerPage","path","component","exact","Boolean","match","baseUrl","getElementsByTagName","getAttribute","history","createBrowserHistory","basename","store","configureStore","ReactDOM","render","App","navigator","serviceWorker","then","registration","unregister","initializeDataDog","clientToken","site","environment","datadogLogs","init","forwardErrorsToLogs","sampleRate","service","addDataDogLog","messageContext","logger","log","setLoggerGlobalContext","initializeSentry","customerId","dsn","addSentryBreadcrumb","Info","captureSentryEvent","captureSentryException","unloadedState","sentry","api_version","data_dog","client_token","customer_id","chargePaymentSourceId","chargeExternalId","tipPaymentSourceId","tipBeneficiaryName","tipChargeId","tipDetailsDisplayMessage","tipDetailsDrawerId","credit_card_api_url","addTipConfig","initialState","middleware","thunk","routerMiddleware","rootReducer","combineReducers","reducers","router","connectRouter","enhancers","windowIfDefined","__REDUX_DEVTOOLS_EXTENSION__","push","createStore","compose","applyMiddleware"],"mappings":"4IAGO,IAAKA,EAKAC,EAWAC,EAhBZ,sG,SAAYF,K,0BAAAA,E,aAAAA,M,cAKAC,K,UAAAA,E,gBAAAA,E,gBAAAA,E,YAAAA,E,gCAAAA,E,8CAAAA,E,sBAAAA,E,mBAAAA,M,cAWAC,K,UAAAA,E,gBAAAA,E,mBAAAA,M,uCChBL,IAAKC,EAOAC,EAPZ,oE,SAAYD,K,UAAAA,E,kBAAAA,E,gCAAAA,E,iBAAAA,M,cAOAC,K,UAAAA,E,kBAAAA,E,gCAAAA,E,iBA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WAAY7kB,uBAAqB0B,IACjC2hB,UAAWpjB,sBAAoByB,IAC/BiT,YAAY,EACZ0L,qBAAsB,MACtBtK,MAAO,KACPyJ,OAAQ,KACRL,MAAO,MAGEO,EAAsD,WAG7D,IAFF1M,EAEC,uDAFsByU,EACvB/N,EACC,uCACD,OAAQA,EAAOpZ,MACX,IAAK,oBACD,OAAO,2BACA0S,GADP,IAEI2O,KAAMjI,EAAOnZ,UAErB,IAAK,2BACD,OAAO,2BACAyS,GADP,IAEI6R,WAAYnL,EAAOnZ,UAE3B,IAAK,0BACD,OAAO,2BACAyS,GADP,IAEIqQ,UAAW3J,EAAOnZ,UAE1B,IAAK,0BACD,OAAO,2BACAyS,GADP,IAEI2B,WAAY+E,EAAOnZ,UAE3B,IAAK,4BACD,OAAO,2BACAyS,GADP,IAEIqN,qBAAsB3G,EAAOnZ,UAErC,IAAK,2BACD,OAAO,2BACAyS,GADP,IAEI+C,MAAO2D,EAAOnZ,UAEtB,IAAK,sBACD,OAAO,2BACAyS,GADP,IAEIwM,OAAQ9F,EAAOnZ,UAEvB,IAAK,qBACD,OAAO,2BACAyS,GADP,IAEImM,MAAOzF,EAAOnZ,UAEtB,QACI,OAAOyS,I,kCCzCJ,SAAS2S,EAAkBJ,EAAqBiD,GAC3D,IAAMC,EAAa,CAACC,IAAOC,YAAiBpD,IAEtCqD,EAAcC,YAAgB,2BAC7BC,GAD4B,IAE/BC,OAAQC,YAAczD,MAGpB0D,EAAmB,GACnBC,EAAoC,qBAAXjjB,OAAyB,KAAQA,OAKhE,OAJIijB,GAAmBA,EAAgBC,8BACnCF,EAAUG,KAAKF,EAAgBC,gCAG5BE,YAAYT,EAAaJ,EAAcc,IAAO,WAAP,GAAQC,IAAe,WAAf,EAAmBd,IAA3B,OAA2CQ,O,+BCrC7F,wxD","file":"static/js/main.95560054.chunk.js","sourcesContent":["import {PaymentSource} from '@stronghold/pay-dropin';\nimport {AddPaymentSourceConfig, RetryAddPaymentSourceModel, UpdatePaymentSourceConfig} from '../../api';\n\nexport enum PAYMENT_SOURCE_METHOD {\n CREDIT_CARD = 'credit_card',\n BANK = 'bank',\n}\n\nexport enum ADD_PAYMENT_SOURCE_STEP {\n ONE = 'one',\n CC_ONE = 'cc_one',\n METHOD = 'method',\n LINK = 'link',\n LOGIN_REQUIRED = 'login_required',\n LOGIN_REQUIRED_VERIFY = 'login_required_verify',\n SELECTION = 'selection',\n SUCCESS = 'success',\n}\n\nexport enum UPDATE_PAYMENT_SOURCE_STEP {\n ONE = 'one',\n UPDATE = 'update',\n SUCCESS = 'success',\n}\n\nexport interface PaymentSourceState {\n addStep: ADD_PAYMENT_SOURCE_STEP;\n config: AddPaymentSourceConfig | UpdatePaymentSourceConfig | null;\n creditCardConfig: CardSourceConfig | null;\n updateStep: UPDATE_PAYMENT_SOURCE_STEP;\n requesting: boolean;\n paymentSource: PaymentSource | null;\n retryModel: RetryAddPaymentSourceModel | null;\n}\n\nexport interface CardSourceConfig {\n cardHolderName: string | null;\n tsepToken: string | null;\n expirationDate: string | null;\n cvv2: string | null;\n cardType: string | null;\n maskedCardNumber: string | null;\n zip: string | null;\n}\n","import { Charge, Tip } from '@stronghold/pay-dropin';\nimport {AddChargeConfig, AddTipConfig} from '../../api';\n\nexport enum ADD_CHARGE_STEP {\n ONE = 'one',\n SUCCESS = 'success',\n LOGIN_REQUIRED = 'login_required',\n UPDATE = 'update',\n}\n\nexport enum ADD_TIP_STEP {\n ONE = 'one',\n SUCCESS = 'success',\n LOGIN_REQUIRED = 'login_required',\n UPDATE = 'update',\n}\n\nexport interface TransactionState {\n addChargeStep: ADD_CHARGE_STEP | null;\n addChargeConfig: AddChargeConfig | null;\n addTipStep: ADD_TIP_STEP | null;\n addTipConfig: AddTipConfig | null;\n requesting: boolean;\n charge: Charge | null;\n tip: Tip | null;\n creditValue: number | null;\n processingFee: number | null;\n}\n","import { PaymentSource } from '@stronghold/pay-dropin';\n\nexport enum CUSTOMER_PAGE {\n LOGIN = 'login',\n SIGNUP = 'signup',\n}\n\nexport enum CUSTOMER_SIGNUP_STEP {\n ONE = 'one',\n TWO = 'two',\n THREE = 'three',\n SUCCESS = 'success',\n}\n\nexport enum CUSTOMER_LOGIN_STEP {\n ONE = 'one',\n TWO = 'two',\n SUCCESS = 'success',\n}\n\nexport type AuthenticationMethod = 'sms' | 'email';\n\nexport interface CustomerState {\n page: CUSTOMER_PAGE;\n signupStep: CUSTOMER_SIGNUP_STEP;\n loginStep: CUSTOMER_LOGIN_STEP;\n requesting: boolean;\n authenticationMethod: AuthenticationMethod;\n token: string | null;\n signup: CustomerSignupRequestModel | null;\n login: CustomerLoginRequestModel | null;\n}\n\nexport interface AuthenticationModel {\n method: AuthenticationMethod;\n}\n\nexport interface CustomerModel {\n id: string | null;\n country: string | null;\n state: string | null;\n individual: CustomerIndividualDetails;\n payment_sources: PaymentSource[];\n}\n\nexport interface CustomerIndividualDetails {\n email: string | null;\n mobile: string | null;\n first_name: string | null;\n last_name: string | null;\n date_of_birth: string | null;\n}\n\nexport interface CustomerSignupRequestModel {\n authentication_method: string;\n customer_details: CustomerIndividualDetails;\n}\n\nexport interface CustomerSignupResponseModel {\n token: string;\n}\n\nexport interface CustomerLoginRequestModel {\n authentication_method: string;\n username: string;\n}\n\nexport interface CustomerTokenResponseModel {\n token: string;\n}\n\nexport interface CustomerVerifyRequestModel {\n token: string;\n code: string;\n}\n","import {AppThunkAction} from '../configureStore';\nimport {client, Response, RetryAddPaymentSourceModel} from '../../api';\nimport * as Sentry from '../../sentry';\nimport * as DataDog from '../../datadog';\nimport {ApplicationAction} from '../actions';\nimport {ADD_PAYMENT_SOURCE_STEP, CardSourceConfig, PAYMENT_SOURCE_METHOD} from '../types';\nimport notifier from '../../dropin/notifier';\nimport {MESSAGE} from '../../message';\nimport {ERROR_CODE, StrongholdPayError} from '@stronghold/pay-dropin';\nimport {StatusType} from \"@datadog/browser-logs\";\nimport {AGGREGATOR_ERROR_CODES} from \"../../errorCodes\";\nimport {PlaidLinkOnSuccessMetadata} from \"react-plaid-link\";\n\nexport function getAddPaymentSourceConfigAction(payLinkId: string): AppThunkAction {\n return async (dispatch) => {\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: true });\n try {\n const body = await client.getAddPaymentSourceConfig(payLinkId);\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: false });\n dispatch({\n type: 'SET_ADD_PAYMENT_SOURCE_CONFIG',\n payload: body.result,\n });\n\n if (body.result.plaid?.link_token) {\n await client.createPlaidLinkTokenCacheValue(body.result.plaid.cache_key, {\n customer_token: client.customerToken,\n publishable_key: client.publishableKey,\n link_token: body.result.plaid.link_token,\n });\n }\n \n dispatch({\n type: 'SET_ADD_PAYMENT_SOURCE_STEP',\n payload: ADD_PAYMENT_SOURCE_STEP.LINK,\n });\n } catch (error) {\n if (error instanceof StrongholdPayError) {\n dispatch({ type: 'SET_ERROR', payload: error });\n }\n dispatch({ type: 'SHOW_ERROR', payload: true });\n }\n };\n}\n\nexport function setAddPaymentSourceMethodAction(method: PAYMENT_SOURCE_METHOD): AppThunkAction {\n return async (dispatch) => {\n switch (method) {\n case PAYMENT_SOURCE_METHOD.BANK:\n dispatch({\n type: 'SET_ADD_PAYMENT_SOURCE_STEP',\n payload: ADD_PAYMENT_SOURCE_STEP.ONE,\n });\n break;\n case PAYMENT_SOURCE_METHOD.CREDIT_CARD:\n dispatch({\n type: 'SET_ADD_PAYMENT_SOURCE_STEP',\n payload: ADD_PAYMENT_SOURCE_STEP.CC_ONE,\n });\n break;\n }\n };\n}\n\nexport function plaidAddPaymentSourceSuccessAction(\n public_token: string,\n metadata: PlaidLinkOnSuccessMetadata,\n account_id: string | null,\n): AppThunkAction {\n return async (dispatch, getState) => {\n Sentry.addSentryBreadcrumb(`[Plaid] Connect flow succeeded with token: ${public_token}`);\n DataDog.addDataDogLog(`[Plaid] Connect flow succeeded.`,\n {public_token: public_token}, StatusType.info);\n \n const account = metadata.accounts[0];\n const accountId = account?.id ?? account_id;\n\n const payLinkId = getState().dropin.query?.payLinkId || undefined;\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: true });\n\n try {\n const body = await client.linkPlaidPaymentSource(public_token, accountId, payLinkId);\n notifier.success(body.result);\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: false });\n dispatch({ type: 'SET_PAYMENT_SOURCE', payload: body.result });\n dispatch({\n type: 'SET_ADD_PAYMENT_SOURCE_STEP',\n payload: ADD_PAYMENT_SOURCE_STEP.SUCCESS,\n });\n } catch (error) {\n const config = {\n public_token: public_token,\n plaid_account_id: accountId,\n } as RetryAddPaymentSourceModel;\n handleBankLinkErrors(error, \"Plaid\", config, dispatch);\n }\n };\n}\n\nexport function yodleeAddPaymentSourceSuccessAction(\n providerAccountId: number,\n sites: YodleeSite[],\n): AppThunkAction {\n return async (dispatch, getState) => {\n Sentry.addSentryBreadcrumb(`[Yodlee] Connect flow succeeded with providerAccountId: ${providerAccountId}`);\n DataDog.addDataDogLog(`[Yodlee] Connect flow succeeded.`, \n {providerAccountId: providerAccountId}, StatusType.info);\n \n const payLinkId = getState().dropin.query?.payLinkId;\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: true });\n\n try {\n const body = await client.linkYodleePaymentSource({\n providerAccountId,\n sites,\n payLinkId,\n });\n notifier.success(body.result);\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: false });\n dispatch({ type: 'SET_PAYMENT_SOURCE', payload: body.result });\n dispatch({\n type: 'SET_ADD_PAYMENT_SOURCE_STEP',\n payload: ADD_PAYMENT_SOURCE_STEP.SUCCESS,\n });\n } catch (error) {\n const config = {\n provider_account_id: providerAccountId,\n } as RetryAddPaymentSourceModel;\n handleBankLinkErrors(error, \"Yodlee\", config, dispatch);\n }\n };\n}\n\nfunction handleBankLinkErrors(error: any, aggregatorName: string, config: RetryAddPaymentSourceModel, dispatch: any) {\n if (error instanceof StrongholdPayError) {\n if (error.code === ERROR_CODE.INVALID_FIELD) {\n dispatch({\n type: 'SET_ERROR_MESSAGE',\n payload: MESSAGE.NO_SUPPORTED_PAYMENT_METHOD,\n });\n // TODO: Add new BANK_LINKING_* error codes to JS SDK ERROR_CODE enum\n // Temporarily using string value to avoid JS SDK version upgrade\n } else if (AGGREGATOR_ERROR_CODES.AGGREGATOR_SUPPORT_ERROR === error.code.toString()) {\n dispatch({\n type: 'SET_ERROR_MESSAGE',\n payload: MESSAGE.BANK_LINKING_AGGREGATOR_SUPPORT.replace(\"{aggregator}\", aggregatorName),\n });\n } else if (AGGREGATOR_ERROR_CODES.INCOMPATIBLE_YODLEE_ACCOUNT === error.code.toString()) {\n dispatch({\n type: 'SET_ERROR_MESSAGE',\n payload: MESSAGE.BANK_LINKING_STRONGHOLD_SUPPORT,\n })\n } else if (AGGREGATOR_ERROR_CODES.AGGREGATOR_INTEGRATION_ERROR === error.code.toString()) {\n dispatch({\n type: 'SET_ERROR_MESSAGE',\n payload: MESSAGE.BANK_LINKING_AGGREGATOR_INTEGRATION_ERROR,\n })\n } else if (AGGREGATOR_ERROR_CODES.AGGREGATOR_RETRYABLE_ACTION === error.code.toString()) {\n dispatch({\n type: 'SET_RETRY_PAYMENT_SOURCE_LINK_MODEL',\n payload: config,\n });\n dispatch({\n type: 'SET_ADD_PAYMENT_SOURCE_STEP',\n payload: ADD_PAYMENT_SOURCE_STEP.LOGIN_REQUIRED_VERIFY,\n });\n // Returning here to skip the SET_ERROR and SHOW_ERROR dispatches \n return;\n }\n\n dispatch({ type: 'SET_ERROR', payload: error });\n }\n dispatch({ type: 'SHOW_ERROR', payload: true });\n}\n\nexport function finicityListAccountsAction(): AppThunkAction {\n return async (dispatch, getState) => {\n Sentry.addSentryBreadcrumb(`[Finicity] Connect flow succeeded`);\n DataDog.addDataDogLog(`[Finicity] Connect flow succeeded`,\n {aggregator: 'Finicity'}, StatusType.info);\n\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: true });\n\n let body: Response;\n try {\n body = await client.listFinicityAccounts();\n dispatch({ type: 'SET_FINICITY_ACCOUNTS_ACTION', payload: body.result });\n } catch (error) {\n if (error instanceof StrongholdPayError) {\n dispatch({ type: 'SET_ERROR', payload: error });\n }\n dispatch({ type: 'SHOW_ERROR', payload: true });\n return;\n }\n\n if (body.result.length === 1) {\n finicityAddPaymentSourceSuccessAction(body.result[0].id)(dispatch, getState);\n } else {\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: false });\n dispatch({\n type: 'SET_ADD_PAYMENT_SOURCE_STEP',\n payload: ADD_PAYMENT_SOURCE_STEP.SELECTION,\n });\n }\n };\n}\n\nexport function finicityAddPaymentSourceSuccessAction(finicityAccountId: number): AppThunkAction {\n return async (dispatch, getState) => {\n const payLinkId = getState().dropin.query?.payLinkId || undefined;\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: true });\n\n try {\n const body = await client.linkFinicityPaymentSource({\n finicityAccountId,\n payLinkId,\n });\n notifier.success(body.result);\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: false });\n dispatch({ type: 'SET_PAYMENT_SOURCE', payload: body.result });\n dispatch({\n type: 'SET_ADD_PAYMENT_SOURCE_STEP',\n payload: ADD_PAYMENT_SOURCE_STEP.SUCCESS,\n });\n } catch (error) {\n if (error instanceof StrongholdPayError) {\n dispatch({ type: 'SET_ERROR', payload: error });\n }\n dispatch({ type: 'SHOW_ERROR', payload: true });\n return;\n }\n };\n}\n\nexport function creditCardAddPaymentSourceSuccessAction(data: CardSourceConfig): AppThunkAction {\n return async (dispatch, getState) => {\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: true });\n\n try {\n const body = await client.addPaymentSourceCreditCard(data);\n notifier.success(body.result);\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: false });\n dispatch({ type: 'SET_PAYMENT_SOURCE', payload: body.result });\n dispatch({\n type: 'SET_ADD_PAYMENT_SOURCE_STEP',\n payload: ADD_PAYMENT_SOURCE_STEP.SUCCESS,\n });\n } catch (error) {\n if (error instanceof StrongholdPayError) {\n dispatch({ type: 'SET_ERROR', payload: error });\n }\n dispatch({ type: 'SHOW_ERROR', payload: true });\n return;\n }\n };\n}\n\nexport function setCardSourceConfigSuccessAction(data: CardSourceConfig): AppThunkAction {\n return async (dispatch) => {\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: true });\n dispatch({ type: 'SET_CARD_SOURCE_CONFIGURATION', payload: data });\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: false });\n };\n}\n","import { UPDATE_PAYMENT_SOURCE_STEP } from '../types';\nimport { client } from '../../api';\nimport { ApplicationAction } from '../actions';\nimport { AppThunkAction } from '../configureStore';\nimport { getPaymentSourceId } from '../selectors';\n\nexport function getUpdatePaymentSourceConfigAction(): AppThunkAction {\n return async (dispatch, getState) => {\n const paymentSourceId = getPaymentSourceId(getState()) || '';\n\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: true });\n try {\n const body = await client.getUpdatePaymentSourceConfig(paymentSourceId);\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: false });\n dispatch({\n type: 'SET_UPDATE_PAYMENT_SOURCE_CONFIG',\n payload: body.result,\n });\n dispatch({\n type: 'SET_PAYMENT_SOURCE',\n payload: body.result.payment_source,\n });\n if (!body.result.is_re_authentication_needed) {\n dispatch({\n type: 'SET_UPDATE_PAYMENT_SOURCE_STEP',\n payload: UPDATE_PAYMENT_SOURCE_STEP.SUCCESS,\n });\n }\n } catch (error) {\n dispatch({ type: 'SET_ERROR', payload: error });\n dispatch({ type: 'SHOW_ERROR', payload: true });\n }\n };\n}\n","import {ERROR_CODE, ERROR_TYPE, StrongholdPayError} from '@stronghold/pay-dropin';\nimport {ParsedQuery} from 'query-string';\nimport {AppThunkAction} from '../configureStore';\nimport {client} from '../../api';\nimport notifier from '../../dropin/notifier';\nimport {ApplicationAction} from '../actions';\nimport {ADD_PAYMENT_SOURCE_STEP, CUSTOMER_PAGE, QueryData} from '../types';\nimport * as DataDog from \"../../datadog\";\nimport {StatusType} from \"@datadog/browser-logs\";\nimport {Severity} from \"@sentry/react\";\n\nexport function initDropinAction(parsedQuery: ParsedQuery, pathname: string): AppThunkAction {\n return async (dispatch) => {\n const query = (parsedQuery as unknown) as QueryData;\n const plaidOauth = isPlaidOauth(window.location.href);\n \n const handleError = (error: StrongholdPayError) => {\n notifier.ready();\n dispatch({type: 'SET_ERROR', payload: error});\n setTimeout(() => {\n dispatch({type: 'SHOW_ERROR', payload: true});\n dispatch({type: 'SET_AS_READY'});\n }, 50);\n notifier.exit();\n };\n\n let customerToken = '';\n let publishableKey: string;\n if (plaidOauth) {\n let cacheKey = getSubdomain(window.location.href);\n if (cacheKey) {\n let cacheResponse = await client.getPlaidLinkTokenCacheValue(cacheKey);\n customerToken = cacheResponse.result.customer_token;\n publishableKey = cacheResponse.result.publishable_key;\n }\n } else {\n if (query.publishableKey) {\n dispatch({\n type: 'SET_PUBLISHABLE_KEY',\n payload: query.publishableKey,\n });\n\n publishableKey = query.publishableKey;\n } else {\n handleError(new StrongholdPayError(ERROR_TYPE.AUTH_ERROR, ERROR_CODE.INVALID_API_KEY, 'Invalid API Key.'));\n return;\n }\n\n if (query.customerToken) {\n dispatch({\n type: 'SET_CUSTOMER_TOKEN',\n payload: query.customerToken,\n });\n\n customerToken = query.customerToken;\n } else if (!pathname.includes(\"dropin/customers\")) {\n handleError(\n new StrongholdPayError(\n ERROR_TYPE.INVALID_REQUEST_ERROR,\n ERROR_CODE.INVALID_CUSTOMER_TOKEN,\n 'Invalid customer token.',\n ),\n );\n return;\n }\n }\n\n if (query.integrationId) {\n dispatch({\n type: 'SET_INTEGRATION_ID',\n payload: query.integrationId,\n })\n } else {\n // TODO: Eventually add error handling for missing integrationId\n // handleError(\n // new StrongholdPayError(\n // ERROR_TYPE.INVALID_REQUEST_ERROR,\n // ERROR_CODE.MISSING_FIELD,\n // ERROR_MESSAGE.ATTRIBUTE_REQUIRED,\n // 'integrationId',\n // )\n // )\n if (!query.payLinkCode) {\n // Only creating DataDog log if the JS SDK was initialized outside of a PayLink\n DataDog.addDataDogLog(\n `Missing IntegrationId for merchant with publishable key: ${query.publishableKey}`,\n {level: Severity.Warning},\n StatusType.info);\n }\n }\n\n try {\n const body = await client.initDropin(publishableKey!, customerToken, pathname, query.apiVersion, query.integrationId);\n dispatch({ type: 'SET_CONFIGURATION', payload: body.result });\n if (plaidOauth) {\n dispatch({\n type: 'SET_ADD_PAYMENT_SOURCE_STEP',\n payload: ADD_PAYMENT_SOURCE_STEP.LINK,\n });\n } else if (body.result.merchant.has_credit_card_payments) {\n // Enable payment selection page \n dispatch({type: 'SET_ADD_PAYMENT_SOURCE_STEP', payload: ADD_PAYMENT_SOURCE_STEP.METHOD});\n const manifest = await client.generateTsepManifest();\n dispatch({type: 'SET_TSEP_MANIFEST', payload: manifest.result});\n }\n\n dispatch({\n type: 'SET_CUSTOMER_PAGE',\n payload: query.isLogin?.toLowerCase() === 'true' ? CUSTOMER_PAGE.LOGIN : CUSTOMER_PAGE.SIGNUP\n })\n dispatch({type: 'SET_QUERY_DATA', payload: query});\n dispatch({type: 'SET_AS_READY'});\n } catch (error) {\n handleError(error);\n }\n };\n}\n\nexport function getSubdomain(url: string): string | null {\n const parsedUrl = new URL(url);\n const hostname = parsedUrl.hostname;\n const parts = hostname.split('.');\n\n // assume the URLs are in the format of `subdomain.domain.com`\n if (parts.length > 2) {\n return parts[0];\n } else {\n return null;\n }\n}\n\nexport function isPlaidOauth(pathname: string): boolean {\n return pathname.includes('?oauth_state_id=');\n}\n","import {ERROR_CODE, StrongholdPayError} from '@stronghold/pay-dropin';\nimport {client} from '../../api';\nimport notifier from '../../dropin/notifier';\nimport {ApplicationAction} from '../actions';\nimport {AppThunkAction} from '../configureStore';\nimport {getPaymentSourceId} from '../selectors';\nimport {ADD_CHARGE_STEP} from '../types';\n\nexport function getAddChargeConfigAction(): AppThunkAction {\n return async (dispatch, getState) => {\n dispatch({ type: 'SET_TRANSACTION_REQUESTING', payload: true });\n\n const paymentSourceId = getPaymentSourceId(getState()) || '';\n try {\n const body = await client.getAddChargeConfig(paymentSourceId);\n dispatch({ type: 'SET_TRANSACTION_REQUESTING', payload: false });\n dispatch({ type: 'SET_ADD_CHARGE_CONFIG', payload: body.result });\n dispatch({\n type: 'SET_ADD_CHARGE_STEP',\n payload: ADD_CHARGE_STEP.ONE,\n });\n notifier.ready();\n } catch (error) {\n notifier.ready();\n dispatch({ type: 'SET_ERROR', payload: error });\n dispatch({ type: 'SHOW_ERROR', payload: true });\n }\n };\n}\n\nexport function createChargeAction(): AppThunkAction {\n return async (dispatch, getState) => {\n dispatch({ type: 'SET_TRANSACTION_REQUESTING', payload: true });\n\n const query = getState().dropin.query;\n const transactionState = getState().transaction;\n const addConvenienceFee = getState().transaction.addChargeConfig?.add_convenience_fee || false;\n let chargeAmount = query.charge?.amount || 0;\n\n // If Treez or Jane and not using paylinks, add the convenience fee to the total amount.\n if (addConvenienceFee && query.payLinkId === null) {\n chargeAmount += transactionState.addChargeConfig?.convenience_fee || 0;\n }\n\n try {\n const body = await client.postCharge({\n authorize_only: query.authorizeOnly,\n pay_link_id: query.payLinkId || undefined,\n charge: {\n amount: chargeAmount,\n payment_source_id: query.charge?.paymentSourceId || '',\n external_id: query.charge?.externalId || undefined,\n },\n tip: query.tip\n ? {\n amount: query.tip.amount,\n beneficiary_name: query.tip.beneficiaryName,\n details: {\n display_message: query.tip.details.displayMessage,\n drawer_id: query.tip.details.drawerId,\n },\n }\n : null,\n });\n notifier.success(body.result);\n dispatch({ type: 'SET_TRANSACTION_REQUESTING', payload: false });\n dispatch({ type: 'SET_CHARGE', payload: body.result });\n dispatch({\n type: 'SET_ADD_CHARGE_STEP',\n payload: ADD_CHARGE_STEP.SUCCESS,\n });\n } catch (error) {\n notifier.ready();\n dispatch({ type: 'SET_TRANSACTION_REQUESTING', payload: false });\n if (error instanceof StrongholdPayError) {\n if (error.code === ERROR_CODE.PAYMENT_SOURCE_LOGIN_REQUIRED) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n notify: false,\n });\n dispatch({\n type: 'SET_ADD_CHARGE_STEP',\n payload: ADD_CHARGE_STEP.LOGIN_REQUIRED,\n });\n return;\n }\n }\n dispatch({ type: 'SET_ERROR', payload: error });\n dispatch({ type: 'SHOW_ERROR', payload: true });\n }\n };\n}\n","import { ERROR_CODE, StrongholdPayError } from '@stronghold/pay-dropin';\nimport { client } from '../../api';\nimport notifier from '../../dropin/notifier';\nimport { ApplicationAction } from '../actions';\nimport { AppThunkAction } from '../configureStore';\nimport { getPaymentSourceId } from '../selectors';\nimport { ADD_TIP_STEP } from '../types';\n\nexport function getAddTipConfigAction(): AppThunkAction {\n return async (dispatch, getState) => {\n dispatch({ type: 'SET_TRANSACTION_REQUESTING', payload: true });\n\n const paymentSourceId = getPaymentSourceId(getState()) || '';\n const chargeId = getState().dropin.query.tip?.chargeId || '';\n try {\n const body = await client.getAddTipConfig(paymentSourceId, chargeId);\n notifier.ready();\n dispatch({ type: 'SET_TRANSACTION_REQUESTING', payload: false });\n dispatch({ type: 'SET_CHARGE', payload: body.result.charge });\n dispatch({\n type: 'SET_PAYMENT_SOURCE',\n payload: body.result.payment_source,\n });\n dispatch({ type: 'SET_ADD_TIP_STEP', payload: ADD_TIP_STEP.ONE });\n } catch (error) {\n notifier.ready();\n dispatch({ type: 'SET_ERROR', payload: error });\n dispatch({ type: 'SHOW_ERROR', payload: true });\n }\n };\n}\n\nexport function createTipAction(): AppThunkAction {\n return async (dispatch, getState) => {\n dispatch({ type: 'SET_TRANSACTION_REQUESTING', payload: true });\n\n const query = getState().dropin.query;\n try {\n const body = await client.postTip({\n authorize_only: query.authorizeOnly,\n pay_link_id: query.payLinkId || undefined,\n tip: {\n amount: query.tip?.amount || 0,\n beneficiary_name: query.tip?.beneficiaryName || '',\n charge_id: query.tip?.chargeId || '',\n payment_source_id: query.tip?.paymentSourceId || '',\n details: {\n display_message: query.tip?.details?.displayMessage || null,\n drawer_id: query.tip?.details?.drawerId || null,\n },\n },\n });\n notifier.success(body.result);\n dispatch({ type: 'SET_TRANSACTION_REQUESTING', payload: false });\n dispatch({ type: 'SET_TIP', payload: body.result });\n dispatch({\n type: 'SET_ADD_TIP_STEP',\n payload: ADD_TIP_STEP.SUCCESS,\n });\n } catch (error) {\n notifier.ready();\n dispatch({ type: 'SET_TRANSACTION_REQUESTING', payload: false });\n if (error instanceof StrongholdPayError) {\n if (error.code === ERROR_CODE.PAYMENT_SOURCE_LOGIN_REQUIRED) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n notify: false,\n });\n dispatch({\n type: 'SET_ADD_TIP_STEP',\n payload: ADD_TIP_STEP.LOGIN_REQUIRED,\n });\n return;\n }\n }\n dispatch({ type: 'SET_ERROR', payload: error });\n dispatch({ type: 'SHOW_ERROR', payload: true });\n }\n };\n}\n","import { EVENT, StrongholdPayError } from '@stronghold/pay-dropin';\nimport { getDefaultError } from './utils';\n\n// notifier used by integrators w/ mobile apps\nclass Notifier {\n private _parentOrigin = '*';\n private _parent = window.parent;\n\n private _readyCalled = false;\n\n private notify(event: EVENT, err: StrongholdPayError | null = null, data: any = null) {\n console.debug(`notify event \"${event}\" -`, err, JSON.stringify(data || {}));\n const object = {\n event: event,\n payload: {\n err: err,\n data: data,\n },\n };\n\n if (window.ReactNativeWebView) {\n window.ReactNativeWebView.postMessage(JSON.stringify(object));\n } else {\n this._parent.postMessage(JSON.parse(JSON.stringify(object)), '*');\n }\n }\n\n error(e?: StrongholdPayError) {\n e = e ?? getDefaultError();\n console.error(\n `error ${e.type} - ${e.code} (property=\"${e.property || ''}\", reference=\"${e.reference || ''})\": ${\n e.message\n }`,\n );\n this.notify(EVENT.ERROR, e);\n return e;\n }\n\n success(data?: any) {\n this.notify(EVENT.SUCCESS, null, data);\n }\n\n exit() {\n this.notify(EVENT.EXIT);\n }\n\n ready() {\n if (this._readyCalled) {\n return;\n }\n this._readyCalled = true;\n this.notify(EVENT.READY);\n }\n}\n\nexport default new Notifier();\n","import { ApplicationState } from '../configureStore';\nimport {StrongholdPayError} from \"@stronghold/pay-dropin\";\n\nexport function toNumber(str: string | null | undefined): number | null {\n if (!str) {\n return null;\n }\n\n const result = parseInt(str);\n\n if (isNaN(result)) {\n return null;\n }\n\n return result;\n}\n\nexport function toCurrency(number: number | string | null | undefined): string | null {\n if (typeof number === 'string') {\n number = toNumber(number);\n }\n\n if (typeof number !== 'number') {\n return null;\n }\n\n const format = new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: 'USD',\n }).format(number / 100);\n\n return format;\n}\n\nexport function getPaymentSourceId(applicationState: ApplicationState) {\n return (\n applicationState.dropin.query?.paymentSourceId ||\n applicationState.dropin.query?.charge?.paymentSourceId ||\n applicationState.dropin.query?.tip?.paymentSourceId ||\n null\n );\n}\n\nexport function isPropertyError(propertyName: string | null, error: StrongholdPayError | null) {\n return (error && error.property === propertyName) || false;\n}\n","import {Charge, ERROR_CODE, ERROR_TYPE, PaymentSource} from '@stronghold/pay-dropin';\n\nexport interface Response {\n result: T;\n}\n\nexport interface ErrorResponse {\n error: {\n type: ERROR_TYPE;\n code: ERROR_CODE;\n message: string;\n property?: string;\n };\n}\n\nexport interface Merchant {\n display_name: string;\n logo_url: string;\n has_credit_card_payments: boolean;\n}\n\nexport interface SentryConfiguration {\n environment: string;\n dsn: string;\n}\n\nexport interface DataDogConfiguration {\n environment: string;\n client_token: string;\n site: string;\n}\n\nexport interface TsepConfiguration {\n script_path: string;\n credit_card_api_url: string;\n manifest: string;\n}\n\nexport interface Configuration {\n merchant: Merchant;\n api_version: string;\n customer_id: string;\n sentry: SentryConfiguration;\n tsep: TsepConfiguration;\n data_dog: DataDogConfiguration;\n}\n\nexport enum AGGREGATOR_VENDOR {\n Plaid = 'plaid',\n Yodlee = 'yodlee',\n Finicity = 'finicity',\n}\n\nexport enum TsepEnvironment {\n None = 'none',\n Sandbox = 'sandbox',\n Live = 'live',\n}\n\nexport interface AddPaymentSourceConfig {\n aggregator_vendor: AGGREGATOR_VENDOR;\n plaid?: {\n link_token: string;\n cache_key: string;\n };\n yodlee?: {\n url: string;\n access_token: string;\n };\n finicity?: {\n connect_url: string;\n };\n}\n\nexport interface UpdatePaymentSourceConfig extends AddPaymentSourceConfig {\n is_re_authentication_needed: boolean;\n aggregator_vendor: AGGREGATOR_VENDOR;\n payment_source: PaymentSource;\n plaid?: {\n link_token: string;\n cache_key: string;\n account_id?: string;\n };\n yodlee?: {\n url: string;\n access_token: string;\n provider_account_id: number;\n };\n finicity?: {\n connect_url: string;\n };\n}\n\nexport interface RetryAddPaymentSourceModel {\n public_token?: string;\n plaid_account_id?: string;\n provider_account_id?: number;\n}\n\nexport interface AddChargeConfig {\n add_convenience_fee: boolean;\n convenience_fee: number;\n payment_source: PaymentSource;\n}\n\nexport interface AddChargeModel {\n amount: number;\n payment_source_id: string;\n external_id?: string;\n}\n\nexport interface TipChargeDataModel {\n amount: number;\n beneficiary_name: string;\n details: {\n display_message: string | null;\n drawer_id: string | null;\n };\n}\n\nexport interface AddChargeRequestModel {\n pay_link_id?: string | null;\n authorize_only: boolean;\n charge: AddChargeModel;\n tip?: TipChargeDataModel | null;\n}\n\nexport interface AddTipConfig {\n payment_source: PaymentSource;\n charge: Charge;\n}\n\nexport interface TipDataModel extends TipChargeDataModel {\n payment_source_id: string;\n charge_id: string;\n}\n\nexport interface AddTipRequestModel {\n pay_link_id?: string | null;\n authorize_only: boolean;\n tip: TipDataModel;\n}\n\nexport interface MaxPromotionValue {\n value: number;\n}\n\nexport interface ProcessingFeeAmountModel {\n payment_processing_fee: number;\n}","import axios from 'axios';\nimport {\n AddChargeConfig,\n AddChargeRequestModel,\n AddPaymentSourceConfig,\n AddTipConfig,\n AddTipRequestModel,\n Configuration,\n MaxPromotionValue,\n ProcessingFeeAmountModel,\n Response,\n RetryAddPaymentSourceModel,\n TsepEnvironment,\n UpdatePaymentSourceConfig,\n} from './types';\nimport * as querystring from 'query-string';\nimport {Charge, Customer, PaymentSource, StrongholdPayError, Tip} from '@stronghold/pay-dropin';\nimport {getDefaultError} from '../dropin/utils';\nimport {TsepManifest} from '../types/tsep';\nimport {\n CardSourceConfig,\n CustomerLoginRequestModel,\n CustomerSignupRequestModel,\n CustomerTokenResponseModel,\n CustomerVerifyRequestModel,\n PlaidLinkCacheValueModel,\n} from '../store';\n\nclass Client {\n public publishableKey = '';\n public customerToken = '';\n private _integrationId?: string | null | undefined;\n private _apiVersion = 'v2';\n private _pathname = '';\n\n private async request(\n url: string,\n options: {\n method: 'GET' | 'POST';\n data?: object;\n query?: object;\n apiVersion?: string | null | undefined;\n },\n ): Promise> {\n try {\n let apiVersion = options.apiVersion ?? this._apiVersion;\n const response = await axios({\n url: `${apiVersion}/${url}?${querystring.stringify({\n publishableKey: this.publishableKey,\n customerToken: this.customerToken,\n integrationId: this._integrationId,\n pathname: this._pathname,\n ...options.query\n })}`,\n method: options.method,\n data: options.data,\n });\n\n return response.data;\n } catch (error) {\n let strongholdPayError: StrongholdPayError;\n\n if (error.response && error.response.data && error.response.data.error) {\n strongholdPayError = error.response.data.error as StrongholdPayError;\n strongholdPayError = getDefaultError(\n strongholdPayError.type,\n strongholdPayError.code,\n strongholdPayError.message,\n strongholdPayError.property || undefined,\n strongholdPayError.reference || undefined,\n );\n } else {\n strongholdPayError = getDefaultError();\n }\n\n throw strongholdPayError;\n }\n }\n\n async initDropin(publishableKey: string, customerToken: string, pathname: string, apiVersion?: string | null, integrationId?: string | null) {\n this.publishableKey = publishableKey;\n this.customerToken = customerToken;\n this._integrationId = integrationId;\n this._pathname = pathname;\n let config = await this.request('dropin/api/init', {\n method: 'GET',\n apiVersion: 'v2',\n });\n \n if (apiVersion) {\n this._apiVersion = apiVersion;\n }\n \n return config;\n }\n\n async getAddPaymentSourceConfig(payLinkId: string) {\n return await this.request(`dropin/api/payment-sources/add`,\n {\n method: 'GET', \n query: {\n payLinkId: payLinkId,\n },\n apiVersion: 'v2',\n });\n }\n\n async addPaymentSourceCreditCard(data: CardSourceConfig) {\n var body = {\n card_holder_name: data.cardHolderName,\n tsep_token: data.tsepToken,\n cvv2: data.cvv2,\n expiration_date: data.expirationDate,\n card_type: data.cardType,\n masked_card_number: data.maskedCardNumber,\n zip: data.zip,\n };\n return await this.request('dropin/api/payment-sources/add/credit-card', {\n method: 'POST',\n data: body,\n apiVersion: 'v2',\n });\n }\n\n async linkPlaidPaymentSource(public_token: string, account_id: string, pay_link_id?: string | null) {\n return await this.request('dropin/plaid/link', {\n method: 'POST',\n data: {\n pay_link_id,\n plaid: {\n account_id,\n public_token,\n },\n },\n apiVersion: 'v2',\n });\n }\n\n async linkYodleePaymentSource(data: { payLinkId?: string | null; providerAccountId: number; sites: YodleeSite[] }) {\n var body = {\n pay_link_id: data.payLinkId,\n yodlee: {\n provider_account_id: data.providerAccountId,\n sites: data.sites.map((value) => ({\n account_id: value.accountId,\n additional_status: value.additionalStatus,\n provider_account_id: value.providerAccountId,\n provider_id: value.providerId,\n provider_name: value.providerName,\n request_id: value.requestId,\n status: value.status,\n })),\n },\n };\n\n return await this.request('dropin/yodlee/link', {\n method: 'POST',\n data: body,\n apiVersion: 'v2',\n });\n }\n\n async listFinicityAccounts() {\n return await this.request('dropin/finicity/accounts', {\n method: 'GET',\n apiVersion: 'v2',\n });\n }\n\n async linkFinicityPaymentSource(data: { payLinkId?: string | null; finicityAccountId: number }) {\n return await this.request('dropin/finicity/link', {\n method: 'POST',\n data: {\n pay_link_id: data.payLinkId,\n finicity_account_id: data.finicityAccountId,\n },\n apiVersion: 'v2',\n });\n }\n \n async getRetryPaymentSourceLinkConfig(data: RetryAddPaymentSourceModel | undefined) {\n return await this.request('dropin/api/payment-sources/retry', {\n method: 'POST',\n data,\n apiVersion: 'v2',\n });\n }\n\n async getUpdatePaymentSourceConfig(payment_source_id: string) {\n return await this.request('dropin/api/payment-sources/update', {\n method: 'POST',\n data: {\n payment_source_id,\n },\n apiVersion: 'v2',\n });\n }\n\n async getAddChargeConfig(payment_source_id: string) {\n return await this.request('dropin/api/charges/add/config', {\n method: 'POST',\n data: {\n payment_source_id,\n },\n });\n }\n\n async postCharge(data: AddChargeRequestModel) {\n return await this.request('dropin/api/charges/add', {\n method: 'POST',\n data,\n });\n }\n\n async getAddTipConfig(payment_source_id: string, charge_id: string) {\n return await this.request('dropin/api/tips/add/config', {\n method: 'POST',\n data: {\n payment_source_id,\n charge_id,\n },\n });\n }\n\n async postTip(data: AddTipRequestModel) {\n return await this.request('dropin/api/tips/add', {\n method: 'POST',\n data,\n });\n }\n\n async generateTsepManifest() {\n return await this.request('dropin/api/tsep/generate-manifest', {\n method: 'GET',\n apiVersion: 'v2',\n });\n }\n\n async getTsepEnvironment() {\n return await this.request('dropin/api/tsep/environment', {\n method: 'GET',\n apiVersion: 'v2',\n });\n }\n\n async getMaxRedeemableCreditValue(chargeAmount: number) {\n return await this.request(`dropin/api/promotions/max-redeemable-value`, {\n method: 'GET',\n query: {\n charge_amount: chargeAmount,\n },\n });\n }\n\n async getProcessingFeeValue(chargeAmount: number) {\n return await this.request(`dropin/api/processing-fees`, {\n method: 'GET',\n query: {\n charge_amount: chargeAmount,\n },\n });\n }\n\n async signup(data: CustomerSignupRequestModel) {\n return await this.request('dropin/api/customers/signup',{\n method: 'POST',\n data,\n });\n }\n\n async login(data: CustomerLoginRequestModel) {\n return await this.request('dropin/api/customers/login', {\n method: 'POST',\n data,\n });\n }\n\n async verify(data: CustomerVerifyRequestModel) {\n return await this.request('dropin/api/customers/verify-token', {\n method: 'POST',\n data,\n });\n }\n\n async createPlaidLinkTokenCacheValue(key: string, data: PlaidLinkCacheValueModel) {\n return await this.request(`plaid/link-token-cache/${key}`, {\n method: 'POST',\n data,\n apiVersion: 'v2',\n });\n }\n\n async getPlaidLinkTokenCacheValue(key: string) {\n return await this.request(`plaid/link-token-cache/${key}`, {\n method: 'GET',\n apiVersion: 'v2',\n });\n }\n}\n\nexport const client = new Client();\n","export * from './dropin';\nexport * from './error';\nexport * from './paymentSource';\nexport * from './transaction';\nexport * from './aggregator';\nexport * from './customer';\nexport * from './plaid';\n","import { ERROR_CODE, ERROR_TYPE, StrongholdPayError } from '@stronghold/pay-dropin';\nimport { MESSAGE } from '../message';\nimport moment from 'moment/moment';\n\nexport function getDefaultError(\n type?: ERROR_TYPE,\n code?: ERROR_CODE,\n message?: string,\n property?: string,\n reference?: string,\n) {\n type = type || ERROR_TYPE.API_ERROR;\n code = code || ERROR_CODE.SERVER_ERROR;\n message = message || 'A server error occurred.';\n property = property || undefined;\n const e = new StrongholdPayError(type, code, message, property, reference);\n return e;\n}\n\nexport function getErrorMessage(error: StrongholdPayError | null, message: string | null) {\n if (!error) return '';\n\n if (!message) {\n message = MESSAGE.SOMETHING_WENT_WRONG;\n }\n\n let text: string;\n switch (error.code) {\n case ERROR_CODE.PAYMENT_SOURCE_ALREADY_EXISTS:\n text = MESSAGE.PAYMENT_METHOD_ALREADY_ADDED;\n break;\n case ERROR_CODE.INSUFFICIENT_BALANCE:\n text = MESSAGE.INSUFFICIENT_BALANCE;\n break;\n case ERROR_CODE.PAYMENT_SOURCE_UNAVAILABLE:\n text = MESSAGE.PAYMENT_SOURCE_UNAVAILABLE;\n break;\n case ERROR_CODE.PAYMENT_SOURCE_LOGIN_UNAVAILABLE:\n text = MESSAGE.PAYMENT_SOURCE_LOGIN_UNAVAILABLE;\n break;\n case ERROR_CODE.PAYMENT_SOURCE_INACTIVE:\n text = MESSAGE.PAYMENT_SOURCE_INACTIVE;\n break;\n case ERROR_CODE.PAYMENT_SOURCE_ACTION_REQUIRED:\n text = MESSAGE.PAYMENT_SOURCE_ACTION_REQUIRED;\n break;\n case ERROR_CODE.MERCHANT_SOFTWARE_ERROR:\n text = MESSAGE.MERCHANT_SOFTWARE_ERROR;\n break;\n case ERROR_CODE.CUSTOMER_BLOCKED:\n text = MESSAGE.ENABLE_TO_USE_STRONGHOLD_PAY;\n break;\n case ERROR_CODE.PAYMENT_SOURCE_BLOCKED:\n text = MESSAGE.FINANCIAL_INSTITUTION_CURRENTLY_NOT_SUPPORTED;\n break;\n case ERROR_CODE.CHARGE_BLOCKED_OUTSTANDING_PAYMENT:\n text = MESSAGE.OUTSTANDING_PAYMENT_NOT_MADE;\n break;\n case ERROR_CODE.CHARGE_BLOCKED_EXCEEDS_LIMIT:\n text = MESSAGE.PURCHASE_LIMIT_EXCEEDED;\n break;\n case ERROR_CODE.CHARGE_TIP_ALREADY_CREATED:\n text = MESSAGE.CHARGE_TIP_ALREADY_EXISTS;\n break;\n case ERROR_CODE.PAYMENT_SOURCE_LOGIN_REQUIRED:\n text = MESSAGE.PAYMENT_SOURCE_LOGIN_REQUIRED;\n break;\n case ERROR_CODE.PAY_LINK_CANCELED:\n text = MESSAGE.PAY_LINK_WAS_CANCELED;\n break;\n case ERROR_CODE.INVALID_CHARGE_AMOUNT:\n case ERROR_CODE.INVALID_TIP_AMOUNT:\n text = message;\n break;\n case ERROR_CODE.INVALID_VERIFICATION_CODE:\n text = MESSAGE.INVALID_VERIFICATION_CODE;\n break;\n case ERROR_CODE.INVALID_CUSTOMER_TOKEN:\n text = MESSAGE.INVALID_CUSTOMER_TOKEN;\n break;\n case ERROR_CODE.EXPIRED_CUSTOMER_TOKEN:\n text = MESSAGE.VERIFICATION_CODE_EXPIRED;\n break;\n case ERROR_CODE.VALUE_TAKEN:\n text = error.message\n break;\n case ERROR_CODE.INVALID_FIELD:\n text = error.message\n break;\n case ERROR_CODE.NOT_FOUND:\n text = message;\n break;\n case ERROR_CODE.CONFLICT:\n text = error.message\n break;\n case ERROR_CODE.BANK_ACCOUNT_VALIDATION_FAILURE:\n text = MESSAGE.BANK_ACCOUNT_VALIDATION_FAILURE;\n break;\n default:\n text = MESSAGE.SOMETHING_WENT_WRONG;\n }\n\n return text;\n}\n\nexport function formatDobDisplay(dob: string | null | undefined) {\n const format = 'MM/DD/YYYY';\n return dob ? moment(dob).format(format) : '';\n}\n\nexport function formatDob(dob: string | null | undefined) {\n const format = 'YYYY-MM-DD';\n return dob ? moment(dob).format(format) : '';\n}\n\nexport function isValidDob(dob: string | null | undefined) {\n return dob ? moment(dob, 'MM/DD/YYYY', true).isValid() || moment(dob, 'M/D/YYYY', true).isValid() : false;\n}\n\nexport function isValidEmail(email: string | null | undefined) {\n const format = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return email ? format.test(email) : false;\n}\n","export const MESSAGE = {\n SOMETHING_WENT_WRONG: 'An error has occurred with your request. Please try again or contact your merchant.',\n NO_SUPPORTED_PAYMENT_METHOD_FOR_INSTITUTION:\n \"We couldn't find a supported checking account at this institution. Please link a different bank.\",\n NO_SUPPORTED_PAYMENT_METHOD:\n 'The account selected at this institution is not a supported checking account. Please link a different account.',\n PAYMENT_METHODS_ALREADY_ADDED: 'All the bank accounts have already been added.',\n PAYMENT_METHOD_ALREADY_ADDED: 'This bank account has already been added.',\n MERCHANT_SOFTWARE_ERROR:\n 'We are unable to process your payment due to an error with the software the merchant uses.',\n ENABLE_TO_USE_STRONGHOLD_PAY: 'You are unable to use Stronghold Pay at this time.',\n OUTSTANDING_PAYMENT_NOT_MADE: 'You are unable to use Stronghold Pay until an outstanding payment has been made.',\n PURCHASE_LIMIT_EXCEEDED:\n 'You have exceeded your Stronghold Pay purchase limit. This limit takes into account your purchases made in the last three days, so please wait some time or place a smaller order.',\n PAYMENT_SOURCE_BLOCKED:\n 'Your financial institution is not supported at this moment. Please retry with a different bank account or pay with a different payment method.',\n FINANCIAL_INSTITUTION_CURRENTLY_NOT_SUPPORTED:\n 'Your financial institution is not supported at this moment. Please retry with a different bank account or pay with a different payment method.',\n BANK_LINKING_AGGREGATOR_SUPPORT: 'Please try again or contact {aggregator} support for additional assistance.',\n BANK_LINKING_AGGREGATOR_INTEGRATION_ERROR: 'We are unable to link your bank account at this moment.',\n BANK_LINKING_STRONGHOLD_SUPPORT: 'We are unable to link your bank account at this moment.',\n PAY_LINK_WAS_CANCELED: 'This link to pay is no longer active. Please contact the merchant for another way to make your payment.',\n INVALID_VERIFICATION_CODE: 'The provided verification code was invalid. Please try again or resend a new code.',\n VERIFICATION_CODE_EXPIRED: 'The provided verification code has expired. Please resend a new code.',\n INVALID_CUSTOMER_TOKEN: 'The provided customer token was invalid. Please try again or resend a new code.',\n VALUE_TAKEN: 'Value is already taken.',\n INVALID_FIELD: 'Value is not valid.',\n CHARGE_TIP_ALREADY_EXISTS: \"You've already tipped for this order. Thanks for your support!\",\n PAYMENT_SOURCE_LOGIN_REQUIRED: \"We're unable to connect to your financial institution to verify your balance at the moment. Authentication is required.\",\n INSUFFICIENT_BALANCE: \"The bank account you've selected does not have sufficient funds for this purchase. Please add funds to your account or link another account.\",\n PAYMENT_SOURCE_UNAVAILABLE: \"We're unable to connect to your financial institution to verify your balance at the moment. Please try again later.\",\n PAYMENT_SOURCE_LOGIN_UNAVAILABLE: \"We're unable to connect to your account. We currently do not support the multi-factor authentication of your financial institution. Please try again later.\",\n PAYMENT_SOURCE_INACTIVE: \"Your payment method has been disconnected. Please relink or use a different account or method.\",\n PAYMENT_SOURCE_ACTION_REQUIRED: \"Your bank provider requires you to log into their internet banking website. Please log in and take any requested actions, then retry this payment.\",\n BANK_ACCOUNT_VALIDATION_FAILURE: \"This bank account cannot be validated at this time. Please try another account.\"\n};\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport { ApplicationState } from '../store';\n\ninterface StateProps {\n merchantLogoUrl: string;\n}\n\ntype Props = StateProps;\n\nclass CoBrand extends React.PureComponent {\n render() {\n return (\n
\n {this.props.merchantLogoUrl ? (\n \n ) : null}\n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n merchantLogoUrl: state.dropin.merchant?.logo_url || '',\n});\n\nexport default connect(mapStateToProps)(CoBrand);\n","import React from 'react';\n\nexport default class DropinBody extends React.PureComponent<{\n children: React.ReactNode;\n className?: string;\n}> {\n render() {\n return
{this.props.children}
;\n }\n}\n","import React from 'react';\nimport notifier from '../dropin/notifier';\n\nexport class ExitButton extends React.PureComponent {\n render() {\n return (\n
\n
\n );\n }\n}\n","import React from 'react';\nimport { ExitButton } from './ExitButton';\nimport { isMobile } from 'react-device-detect';\n\ninterface Props {\n children?: React.ReactNode;\n hasExitButton?: boolean;\n hasContainer?: boolean;\n hasModal?: boolean;\n containerId?: string;\n containerClassName?: string;\n}\n\ninterface State {\n isMobile: boolean;\n}\n\nexport default class DropinContent extends React.PureComponent {\n constructor(props: Props) {\n super(props);\n this.state = {\n isMobile,\n };\n }\n\n render() {\n const {\n hasExitButton = true,\n hasContainer = true,\n hasModal = true,\n containerClassName = '',\n containerId,\n } = this.props;\n const exitButton = hasExitButton ? : null;\n\n let children = this.props.children;\n\n if (hasModal) {\n children = (\n
\n
{children}
\n
\n );\n }\n\n if (hasContainer) {\n children = (\n \n {exitButton}\n {children}\n \n );\n }\n\n return
{children}
;\n }\n}\n","import React from 'react';\n\nexport default class DropinFooter extends React.PureComponent<{\n children: React.ReactNode;\n}> {\n render() {\n return
{this.props.children}
;\n }\n}\n","import React from 'react';\nimport Spinner from 'reactstrap/lib/Spinner';\n\nexport default class Loader extends React.PureComponent<{\n size: 'sm' | 'md';\n color: 'primary' | 'light';\n type?: 'grow' | 'spinner';\n}> {\n render() {\n const isSpinner = this.props.type && this.props.type === 'spinner';\n return ;\n }\n}\n","import React from 'react';\n\ninterface Props {\n label?: string;\n}\n\nexport default class EndUserAgreement extends React.PureComponent {\n render() {\n return (\n \n By selecting {this.props.label || 'Next'} you agree to the{' '}\n \n Stronghold Pay End User Agreement\n \n \n );\n }\n}\n","import React from 'react';\nimport {connect, MapStateToPropsParam} from 'react-redux';\nimport CoBrand from './CoBrand';\nimport DropinBody from './DropinBody';\nimport DropinContent from './DropinContent';\nimport DropinFooter from './DropinFooter';\nimport Button from 'reactstrap/lib/Button';\nimport Loader from './Loader';\nimport {ApplicationState, getAddPaymentSourceConfigAction} from '../store';\nimport {bindActionCreators, Dispatch} from 'redux';\nimport EndUserAgreement from './EndUserAgreement';\n\ninterface StateProps {\n merchantDisplayName: string;\n requesting: boolean;\n payLinkId: string;\n}\n\ninterface OwnProps {}\n\ninterface DispatchProps {\n getAddPaymentSourceConfigAction: typeof getAddPaymentSourceConfigAction;\n}\n\ntype Props = StateProps & OwnProps & DispatchProps;\n\nclass AddPaymentSourceStepOne extends React.PureComponent {\n render() {\n return (\n \n \n \n
\n Stronghold, a {this.props.merchantDisplayName} partner, will\n take you through 3 quick steps to securely verify your details for payment.\n
\n
\n
\n
1.
\n
Log in with your online banking credentials
\n
\n
\n
2.
\n
Verify your account
\n
\n
\n
3.
\n
Complete your payment
\n
\n
\n
\n \n this.props.getAddPaymentSourceConfigAction(this.props.payLinkId)}\n >\n {this.props.requesting ? : 'Next'}\n \n \n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n merchantDisplayName: state.dropin.merchant?.display_name || '',\n requesting: state.paymentSource.requesting,\n payLinkId: state.dropin.query?.payLinkId || '',\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n getAddPaymentSourceConfigAction,\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddPaymentSourceStepOne);\n","import React from 'react';\nimport DropinContent from './DropinContent';\nimport DropinBody from './DropinBody';\nimport CoBrand from './CoBrand';\nimport { Spinner } from 'reactstrap/lib';\n\nexport default class DropinLoading extends React.PureComponent {\n render() {\n return (\n \n \n \n
\n \n
\n
\n
\n );\n }\n}\n","import React from 'react';\nimport {connect, MapStateToPropsParam} from 'react-redux';\nimport {\n ApplicationState,\n finicityListAccountsAction, getSubdomain, isPlaidOauth,\n plaidAddPaymentSourceSuccessAction,\n yodleeAddPaymentSourceSuccessAction\n} from '../store';\nimport {bindActionCreators, Dispatch} from 'redux';\nimport {AGGREGATOR_VENDOR, client, UpdatePaymentSourceConfig} from '../api';\nimport * as Sentry from '../sentry';\nimport notifier from '../dropin/notifier';\nimport DropinContent from './DropinContent';\nimport DropinLoading from './DropinLoading';\nimport {setTag, Severity} from '@sentry/react';\nimport * as DataDog from \"../datadog\";\nimport {StatusType} from \"@datadog/browser-logs\";\nimport {PlaidLinkOnSuccessMetadata, PlaidLinkOptions} from \"react-plaid-link\";\n\ninterface StateProps {\n aggregatorVendor: AGGREGATOR_VENDOR;\n plaidLinkToken: string;\n plaidAccountId: string | null;\n yodleeAccessToken: string;\n yodleeUrl: string;\n yodleeProviderAccountId: number | null;\n finicityConnectUrl: string;\n requesting: boolean;\n}\n\ntype OwnProps =\n | {\n mode: 'retry_login'; \n }\n | {\n mode: 'add';\n }\n | {\n mode: 'update';\n onUpdate: () => void;\n };\n\ninterface DispatchProps {\n plaidAddPaymentSourceSuccessAction: typeof plaidAddPaymentSourceSuccessAction;\n yodleeAddPaymentSourceSuccessAction: typeof yodleeAddPaymentSourceSuccessAction;\n finicityListAccountsAction: typeof finicityListAccountsAction;\n}\n\ntype Props = StateProps & OwnProps & DispatchProps;\n\nclass AddOrUpdatePaymentSourceStepLink extends React.PureComponent {\n componentDidMount() {\n if (this.props.aggregatorVendor === AGGREGATOR_VENDOR.Plaid) {\n this.setupPlaid();\n if (isPlaidOauth(window.location.href)) {\n this.reinitializePlaid();\n } else {\n this.plaid();\n }\n } else if (this.props.aggregatorVendor === AGGREGATOR_VENDOR.Yodlee) {\n setTimeout(() => this.yodlee(), 100);\n } else if (this.props.aggregatorVendor === AGGREGATOR_VENDOR.Finicity) {\n setTimeout(() => this.finicity(), 50);\n }\n }\n\n componentWillUnmount() {\n this.cleanPlaid();\n }\n\n setupPlaid = () => {\n // Add specific class to the body for plaid screen\n document.body.classList.add('dropin-overlay');\n };\n\n cleanPlaid = () => {\n // Add specific class to the body for plaid screen\n document.body.classList.remove('dropin-overlay');\n };\n\n async plaid() {\n const createConfig: PlaidLinkOptions = {\n token: this.props.plaidLinkToken,\n // TODO: Remove once the lib is up to date\n clientName: (null as unknown) as string,\n env: (null as unknown) as string,\n product: (null as unknown) as [],\n // TODO: End\n onSuccess: (public_token: string, metadata: PlaidLinkOnSuccessMetadata) => {\n setTag(\"additional.data.link_session_id\", metadata?.link_session_id);\n setTag(\"additional.data.institution\", metadata?.institution?.name);\n \n Sentry.addSentryBreadcrumb(`[Plaid] Successfully linked an account`);\n DataDog.addDataDogLog('[Plaid] Successfully linked an account',\n { metadata }, StatusType.info);\n \n this.cleanPlaid();\n\n if (this.props.mode === 'add' || this.props.mode === 'retry_login') {\n // when mode == 'retry_login' this.props.plaidAccountId should be passed in\n this.props.plaidAddPaymentSourceSuccessAction(public_token, metadata, this.props.plaidAccountId);\n } else {\n this.props.onUpdate();\n }\n },\n onExit: (err, metadata) => {\n this.cleanPlaid();\n\n setTag(\"additional.data.link_session_id\", metadata?.link_session_id);\n setTag(\"additional.data.request_id\", metadata?.request_id);\n setTag(\"additional.data.institution\", metadata?.institution?.name);\n setTag(\"additional.data.status\", metadata?.status);\n \n if (err) {\n Sentry.captureSentryException(new Error('[Plaid] Fails to link a bank account'), {\n extra: err,\n });\n DataDog.addDataDogLog('[Plaid] Fails to link a bank account',\n { err, metadata }, StatusType.error);\n }\n notifier.exit();\n },\n };\n\n const handler = window.Plaid.create(createConfig);\n\n handler.open();\n }\n\n async reinitializePlaid() {\n let cacheKey = getSubdomain(window.location.href);\n let cachedValue = await client.getPlaidLinkTokenCacheValue(cacheKey!);\n \n const createConfig: PlaidLinkOptions = {\n token: cachedValue.result.link_token,\n receivedRedirectUri: window.location.href,\n clientName: (null as unknown) as string,\n env: (null as unknown) as string,\n product: (null as unknown) as [],\n onSuccess: (public_token: string, metadata: PlaidLinkOnSuccessMetadata) => {\n this.cleanPlaid();\n this.props.plaidAddPaymentSourceSuccessAction(public_token, metadata, this.props.plaidAccountId);\n },\n onExit: (err, metadata) => {\n this.cleanPlaid();\n notifier.exit();\n },\n };\n\n const handler = window.Plaid.create(createConfig);\n handler.open();\n }\n\n yodlee() {\n let isExitCalled = false;\n let onSuccessData: YodleeOnSuccessCallbackData | null = null;\n\n window.fastlink.open(\n {\n fastLinkURL: this.props.yodleeUrl,\n accessToken: `Bearer ${this.props.yodleeAccessToken}`,\n params: {\n configName: 'Verification',\n ...(this.props.mode === 'add'\n ? {}\n : {\n flow: 'edit',\n providerAccountId: this.props.yodleeProviderAccountId || 0,\n }),\n },\n // IMPORTANT: Make it works on mobile\n forceIframe: true,\n onSuccess: (data) => {\n // We log the Yodlee error but this error is not necessarily blocking\n // It can be cause by a wrong login or timeout. In those cases, Yodlee is already informing the customer.\n setTag(\"additional.data.additionalStatus\", data?.additionalStatus);\n setTag(\"additional.data.bankName\", data?.bankName);\n setTag(\"additional.data.providerAccountId\", data?.providerAccountId);\n setTag(\"additional.data.providerId\", data?.providerId);\n setTag(\"additional.data.status\", data?.status);\n setTag(\"additional.data.requestId\", data?.requestId);\n \n Sentry.addSentryBreadcrumb(`[Yodlee] Successfully linked an account`, { data });\n DataDog.addDataDogLog('[Yodlee] Successfully linked an account',\n { data }, StatusType.info);\n \n onSuccessData = data;\n },\n onClose: (data) => {\n Sentry.addSentryBreadcrumb(`[Yodlee] Exit Fastlink link an account`, { data });\n DataDog.addDataDogLog('[Yodlee] Exit Fastlink link an account',\n { data }, StatusType.info);\n\n if (this.props.mode === 'add' || this.props.mode === 'retry_login') {\n // We check if the exit call has already been called\n if (isExitCalled) {\n return;\n }\n isExitCalled = true;\n\n // Make sure we exit if the customer quit\n if (\n !onSuccessData ||\n !data.sites ||\n data.sites.length === 0 ||\n data.sites[0].status === 'ACTION_ABANDONED'\n ) {\n notifier.exit();\n return;\n }\n\n this.props.yodleeAddPaymentSourceSuccessAction(onSuccessData.providerAccountId, data.sites);\n } else {\n this.props.onUpdate();\n }\n },\n onError: (data: YodleeOnErrorCallbackData) => {\n // We log the Yodlee error but this error is not necessarily blocking\n // It can be cause by a wrong login or timeout. In those cases, Yodlee is already informing the customer.\n setTag(\"additional.data.additionalStatus\", data?.additionalStatus);\n setTag(\"additional.data.bankName\", data?.bankName);\n setTag(\"additional.data.providerAccountId\", data?.providerAccountId);\n setTag(\"additional.data.reason\", data?.reason);\n setTag(\"additional.data.providerId\", data?.providerId);\n setTag(\"additional.data.statusCode\", data?.statusCode);\n setTag(\"additional.data.status\", data?.status);\n setTag(\"additional.data.requestId\", data?.requestId);\n \n Sentry.captureSentryEvent(`[Yodlee] Error while linking a new account`, {\n level: Severity.Warning,\n });\n DataDog.addDataDogLog('[Yodlee] Error while linking a new account',\n { level: Severity.Warning, extra: data }, StatusType.error);\n },\n },\n 'container-fastlink',\n );\n }\n\n finicity() {\n window.finicityConnect.launch(this.props.finicityConnectUrl, {\n selector: '#finicity-connect-container',\n overlay: 'rgba(0, 0, 0, 0); border-radius: 8px; position: relative;',\n success: (data) => {\n Sentry.addSentryBreadcrumb(`[Finicity] Successfully linked an account`, { data });\n DataDog.addDataDogLog('[Finicity] Successfully linked an account',\n { data }, StatusType.info);\n \n if (this.props.mode === 'add' || this.props.mode === 'retry_login') {\n this.props.finicityListAccountsAction();\n } else {\n this.props.onUpdate();\n }\n },\n cancel: () => notifier.exit(),\n error: function (err) {\n Sentry.captureSentryException(new Error('[Finicity] Fails to link a bank account'), {\n extra: { err },\n });\n DataDog.addDataDogLog('[[Finicity] Fails to link a bank account',\n { extra: err }, StatusType.error);\n notifier.exit();\n },\n });\n }\n\n render() {\n if (this.props.requesting) {\n return ;\n }\n\n if (this.props.aggregatorVendor === AGGREGATOR_VENDOR.Plaid) {\n return ;\n } else if (this.props.aggregatorVendor === AGGREGATOR_VENDOR.Yodlee) {\n return (\n \n
\n \n );\n } else if (this.props.aggregatorVendor === AGGREGATOR_VENDOR.Finicity) {\n return (\n \n
\n \n );\n }\n\n return ;\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n aggregatorVendor: state.paymentSource.config?.aggregator_vendor || AGGREGATOR_VENDOR.Plaid,\n plaidLinkToken: state.paymentSource.config?.plaid?.link_token || '',\n plaidAccountId: (state.paymentSource.config as UpdatePaymentSourceConfig)?.plaid?.account_id || null,\n yodleeAccessToken: state.paymentSource.config?.yodlee?.access_token || '',\n yodleeUrl: state.paymentSource.config?.yodlee?.url || '',\n yodleeProviderAccountId:\n (state.paymentSource.config as UpdatePaymentSourceConfig)?.yodlee?.provider_account_id || null,\n finicityConnectUrl: state.paymentSource.config?.finicity?.connect_url || '',\n requesting: state.paymentSource.requesting,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n plaidAddPaymentSourceSuccessAction,\n yodleeAddPaymentSourceSuccessAction,\n finicityListAccountsAction,\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddOrUpdatePaymentSourceStepLink);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport CoBrand from './CoBrand';\nimport DropinBody from './DropinBody';\nimport DropinContent from './DropinContent';\nimport DropinFooter from './DropinFooter';\nimport Button from 'reactstrap/lib/Button';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { ApplicationState } from '../store';\nimport notifier from '../dropin/notifier';\n\ninterface StateProps {\n paymentSourceLabel: string;\n}\n\ninterface OwnProps {}\n\ninterface DispatchProps {}\n\ntype Props = StateProps & OwnProps & DispatchProps;\n\nclass AddPaymentSourceStepSuccess extends React.PureComponent {\n render() {\n return (\n \n \n \n
\n Thanks, your {this.props.paymentSourceLabel}{' '}\n account has been verified for payment.\n
\n
\n \n \n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n paymentSourceLabel: state.paymentSource.paymentSource?.label || '',\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => bindActionCreators({}, dispatch);\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddPaymentSourceStepSuccess);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport CoBrand from './CoBrand';\nimport DropinBody from './DropinBody';\nimport DropinContent from './DropinContent';\nimport DropinFooter from './DropinFooter';\nimport Button from 'reactstrap/lib/Button';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { ApplicationState, finicityAddPaymentSourceSuccessAction } from '../store';\nimport { ListGroup, ListGroupItem } from 'reactstrap';\nimport Loader from './Loader';\n\ninterface StateProps {\n finicityAccounts: FinicityAccount[];\n requesting: boolean;\n}\n\ninterface OwnProps {}\n\ninterface DispatchProps {\n finicityAddPaymentSourceSuccessAction: typeof finicityAddPaymentSourceSuccessAction;\n}\n\ntype Props = StateProps & OwnProps & DispatchProps;\n\ninterface State {\n accountSelected: number | null;\n}\n\nclass AddPaymentSourceStepSelection extends React.PureComponent {\n constructor(props: Props) {\n super(props);\n\n this.state = { accountSelected: null };\n }\n\n render() {\n return (\n \n \n \n
Select an account
\n
\n \n {this.props.finicityAccounts.map((el, key) => (\n this.setState({ accountSelected: el.id })}\n active={el.id === this.state.accountSelected}\n disabled={this.props.requesting}\n action\n className=\"text-right\"\n >\n
{el.name}
\n **** {el.real_account_number_last4}\n \n ))}\n
\n
\n
\n \n \n this.props.finicityAddPaymentSourceSuccessAction(this.state.accountSelected || 0)\n }\n >\n {this.props.requesting ? : 'Next'}\n \n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n finicityAccounts: state.aggregator.finicityAccounts,\n requesting: state.paymentSource.requesting,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n finicityAddPaymentSourceSuccessAction,\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddPaymentSourceStepSelection);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport CoBrand from './CoBrand';\nimport DropinBody from './DropinBody';\nimport DropinContent from './DropinContent';\nimport DropinFooter from './DropinFooter';\nimport Button from 'reactstrap/lib/Button';\nimport Loader from './Loader';\nimport { ApplicationState, PAYMENT_SOURCE_METHOD, setAddPaymentSourceMethodAction } from '../store';\nimport { bindActionCreators, Dispatch } from 'redux';\n\ninterface StateProps {\n merchantDisplayName: string;\n requesting: boolean;\n}\n\ninterface OwnProps {}\n\ninterface DispatchProps {\n setAddPaymentSourceMethodAction: typeof setAddPaymentSourceMethodAction;\n}\n\ntype Props = StateProps & OwnProps & DispatchProps;\n\nclass SelectPaymentSourceMethodStep extends React.PureComponent {\n render() {\n return (\n \n \n \n
\n Stronghold, a {this.props.merchantDisplayName} partner,\n provides two options to pay for your order.\n
\n
Please select your preferred payment method below.
\n
\n \n this.props.setAddPaymentSourceMethodAction(PAYMENT_SOURCE_METHOD.BANK)}\n >\n {this.props.requesting ? : 'Link a Bank Account'}\n \n this.props.setAddPaymentSourceMethodAction(PAYMENT_SOURCE_METHOD.CREDIT_CARD)}\n >\n {this.props.requesting ? : 'Link a Card'}\n \n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n merchantDisplayName: state.dropin.merchant?.display_name || '',\n requesting: state.paymentSource.requesting,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n setAddPaymentSourceMethodAction,\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SelectPaymentSourceMethodStep);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport CoBrand from './CoBrand';\nimport DropinBody from './DropinBody';\nimport DropinContent from './DropinContent';\nimport DropinFooter from './DropinFooter';\nimport Button from 'reactstrap/lib/Button';\nimport Loader from './Loader';\nimport {\n ApplicationState,\n CardSourceConfig,\n creditCardAddPaymentSourceSuccessAction,\n setCardSourceConfigSuccessAction,\n} from '../store';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport EndUserAgreement from './EndUserAgreement';\nimport { Helmet } from 'react-helmet';\nimport { TsepConfiguration } from '../api';\n\ninterface StateProps {\n merchantDisplayName: string;\n requesting: boolean;\n creditCardConfig: CardSourceConfig | null;\n tsepConfig: TsepConfiguration | null;\n}\n\ninterface OwnProps {}\n\ninterface DispatchProps {\n setCardSourceConfigSuccessAction: typeof setCardSourceConfigSuccessAction;\n creditCardAddPaymentSourceSuccessAction: typeof creditCardAddPaymentSourceSuccessAction;\n}\n\ntype Props = StateProps & DispatchProps;\n\ninterface State {\n ready: boolean;\n isAuthorizing: boolean;\n}\n\nclass AddCreditCardPaymentSourceStepOne extends React.PureComponent {\n constructor(props: Props) {\n super(props);\n this.state = {\n ready: false,\n isAuthorizing: false,\n };\n }\n\n componentDidMount = async () => {\n // checks to see if the dynamically populated input is on the dom\n setInterval(() => {\n const ready = document.getElementById('tsep-cardHolderName');\n if (ready) {\n this.setState({ ready: true });\n }\n }, 10);\n\n (window as any).tsepHandler = async (eventType: any, event: any) => {\n if (eventType === 'TokenEvent' && event.responseCode === 'A0000') {\n const result = {\n cardHolderName: event.cardHolderName.trim(),\n tsepToken: event.tsepToken.trim(),\n expirationDate: event.expirationDate.trim(),\n cvv2: event.cvv2.trim(),\n cardType: event.cardType.trim(),\n maskedCardNumber: event.maskedCardNumber.trim(),\n zip: event.zipCode.trim(),\n } as CardSourceConfig;\n await this.props.setCardSourceConfigSuccessAction(result);\n }\n };\n };\n\n componentDidUpdate = async (prevProps: Readonly) => {\n const { creditCardConfig } = this.props;\n const { isAuthorizing } = this.state;\n if (isAuthorizing && creditCardConfig && prevProps.creditCardConfig !== creditCardConfig) {\n await this.props.creditCardAddPaymentSourceSuccessAction(creditCardConfig);\n this.setState({ isAuthorizing: false });\n }\n };\n\n onSubmit = async () => {\n this.setState({ isAuthorizing: true });\n };\n\n render() {\n const { ready } = this.state;\n const { tsepConfig } = this.props;\n\n return (\n \n {tsepConfig && (\n \n \n \n \n )}\n \n \n
\n Stronghold, a {this.props.merchantDisplayName} partner,\n requires you to fill in the form below to authorize your credit card.\n
\n\n {!ready ? (\n
\n \n
\n ) : (\n

\n Card Information\n

\n )}\n\n
\n
\n
\n
\n
\n
\n
\n \n \n \n {ready && (\n \n this.onSubmit()}\n >\n {this.props.requesting || this.state.isAuthorizing ? (\n \n ) : (\n 'Add'\n )}\n \n \n \n )}\n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n merchantDisplayName: state.dropin.merchant?.display_name || '',\n requesting: state.paymentSource.requesting,\n creditCardConfig: state.paymentSource.creditCardConfig,\n tsepConfig: state.dropin.tsep ? state.dropin.tsep : null,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n creditCardAddPaymentSourceSuccessAction,\n setCardSourceConfigSuccessAction,\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddCreditCardPaymentSourceStepOne);\n","import {AppThunkAction} from \"../configureStore\";\nimport {ApplicationAction} from \"../actions\";\nimport {client, RetryAddPaymentSourceModel} from \"../../api\";\n\nexport function getRetryPaymentSourceLinkConfigAction(\n retryModel?: RetryAddPaymentSourceModel,\n) : AppThunkAction {\n return async(dispatch, getState) => {\n dispatch({ type: 'SET_PAYMENT_SOURCE_REQUESTING', payload: true });\n\n try {\n const config = await client.getRetryPaymentSourceLinkConfig(retryModel);\n dispatch({\n type: 'SET_PAYMENT_SOURCE_REQUESTING',\n payload: false,\n });\n \n dispatch({\n type: 'SET_UPDATE_PAYMENT_SOURCE_CONFIG',\n payload: config.result,\n });\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n \n dispatch({\n type: 'SHOW_ERROR',\n payload: true,\n })\n }\n }\n}","import React from 'react';\nimport {connect, MapStateToPropsParam} from 'react-redux';\nimport CoBrand from './CoBrand';\nimport DropinBody from './DropinBody';\nimport DropinContent from './DropinContent';\nimport DropinFooter from './DropinFooter';\nimport Button from 'reactstrap/lib/Button';\nimport DropinLoading from './DropinLoading';\nimport {ApplicationState, getUpdatePaymentSourceConfigAction} from '../store';\nimport {bindActionCreators, Dispatch} from 'redux';\nimport {RetryAddPaymentSourceModel, UpdatePaymentSourceConfig} from '../api';\nimport {ApplicationAction} from '../store/actions';\nimport {getRetryPaymentSourceLinkConfigAction} from \"../store/actionCreators/retryPaymentSourceLink\";\n\ninterface StateProps {\n merchantDisplayName: string;\n requesting: boolean;\n isReAuthenticationNeeded: boolean;\n}\n\ninterface OwnProps {\n showLoading: boolean;\n onClick: () => void;\n isRetry?: boolean;\n retryModel?: RetryAddPaymentSourceModel;\n}\n\ninterface DispatchProps {\n getUpdatePaymentSourceConfigAction: typeof getUpdatePaymentSourceConfigAction;\n getRetryPaymentSourceLinkConfigAction: typeof getRetryPaymentSourceLinkConfigAction;\n}\n\ntype Props = StateProps & OwnProps & DispatchProps;\n\nclass UpdatePaymentSourceStepOne extends React.PureComponent {\n componentDidMount() {\n if (this.props.isRetry) {\n this.props.getRetryPaymentSourceLinkConfigAction(this.props.retryModel);\n } else {\n this.props.getUpdatePaymentSourceConfigAction(); \n }\n }\n\n render() {\n if (this.props.requesting) {\n if (this.props.showLoading) {\n return ;\n } else {\n return null;\n }\n }\n\n return (\n \n \n \n
\n For your security, your financial institution is requesting that you re-verify your details for\n payment.\n
\n
\n \n \n Next\n \n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n merchantDisplayName: state.dropin.merchant?.display_name || '',\n requesting: state.paymentSource.requesting,\n isReAuthenticationNeeded:\n (state.paymentSource.config as UpdatePaymentSourceConfig)?.is_re_authentication_needed || true,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n getUpdatePaymentSourceConfigAction,\n getRetryPaymentSourceLinkConfigAction,\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UpdatePaymentSourceStepOne);\n","import React from 'react';\nimport {connect, MapStateToPropsParam} from 'react-redux';\nimport AddPaymentSourceStepOne from '../../components/AddPaymentSourceStepOne';\nimport AddOrUpdatePaymentSourceStep from '../../components/AddOrUpdatePaymentSourceStep';\nimport AddPaymentSourceStepSuccess from '../../components/AddPaymentSourceStepSuccess';\nimport {ADD_PAYMENT_SOURCE_STEP, ApplicationState} from '../../store';\nimport notifier from '../../dropin/notifier';\nimport AddPaymentSourceStepSelection from '../../components/AddPaymentSourceStepSelection';\nimport SelectPaymentSourceMethodStep from '../../components/SelectPaymentSourceMethodStep';\nimport AddCreditCardPaymentSourceStepOne from '../../components/AddCreditCardPaymentSourceStepOne';\nimport {bindActionCreators, Dispatch} from \"redux\";\nimport {ApplicationAction} from \"../../store/actions\";\nimport UpdatePaymentSourceStepOne from \"../../components/UpdatePaymentSourceStepOne\";\nimport {RetryAddPaymentSourceModel} from \"../../api\";\n\ninterface StateProps {\n step: ADD_PAYMENT_SOURCE_STEP;\n hasCreditCardPayments: boolean | null;\n retryModel?: RetryAddPaymentSourceModel;\n}\n\ninterface DispatchProps {\n setStep: (step: ADD_PAYMENT_SOURCE_STEP) => void;\n}\n\ntype Props = StateProps & DispatchProps;\n\nclass AddPaymentSourcePage extends React.PureComponent {\n componentDidMount() {\n notifier.ready();\n }\n\n render() {\n if (this.props.step === ADD_PAYMENT_SOURCE_STEP.METHOD && this.props.hasCreditCardPayments) {\n return ;\n } else if (this.props.step === ADD_PAYMENT_SOURCE_STEP.ONE) {\n return ;\n } else if (this.props.step === ADD_PAYMENT_SOURCE_STEP.CC_ONE) {\n return ;\n } else if (this.props.step === ADD_PAYMENT_SOURCE_STEP.LINK) {\n return ;\n } else if (this.props.step === ADD_PAYMENT_SOURCE_STEP.LOGIN_REQUIRED_VERIFY) {\n return (\n this.props.setStep(ADD_PAYMENT_SOURCE_STEP.LOGIN_REQUIRED)}\n isRetry={true}\n retryModel={this.props.retryModel}\n />\n );\n } else if (this.props.step === ADD_PAYMENT_SOURCE_STEP.LOGIN_REQUIRED) {\n return ;\n } else if (this.props.step === ADD_PAYMENT_SOURCE_STEP.SELECTION) {\n return ;\n } else {\n return ;\n }\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n step: state.paymentSource.addStep,\n hasCreditCardPayments: state.dropin.merchant && state.dropin.merchant.has_credit_card_payments,\n retryModel: state.paymentSource.retryModel ?? undefined,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n setStep: (step: ADD_PAYMENT_SOURCE_STEP) =>\n dispatch({\n type: 'SET_ADD_PAYMENT_SOURCE_STEP',\n payload: step,\n }),\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddPaymentSourcePage);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport UpdatePaymentSourceStepOne from '../../components/UpdatePaymentSourceStepOne';\nimport AddOrUpdatePaymentSourceStep from '../../components/AddOrUpdatePaymentSourceStep';\nimport AddPaymentSourceStepSuccess from '../../components/AddPaymentSourceStepSuccess';\nimport { ApplicationState, UPDATE_PAYMENT_SOURCE_STEP } from '../../store';\nimport { ApplicationAction } from '../../store/actions';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport notifier from '../../dropin/notifier';\nimport { PaymentSource } from '@stronghold/pay-dropin';\n\ninterface StateProps {\n step: UPDATE_PAYMENT_SOURCE_STEP;\n paymentSource: PaymentSource | null;\n}\n\ninterface DispatchProps {\n setStep: (step: UPDATE_PAYMENT_SOURCE_STEP) => void;\n}\n\ntype Props = StateProps & DispatchProps;\n\nclass UpdatePaymentSourcePage extends React.PureComponent {\n componentDidMount() {\n notifier.ready();\n }\n\n render() {\n if (this.props.step === UPDATE_PAYMENT_SOURCE_STEP.ONE) {\n return (\n this.props.setStep(UPDATE_PAYMENT_SOURCE_STEP.UPDATE)}\n />\n );\n } else if (this.props.step === UPDATE_PAYMENT_SOURCE_STEP.UPDATE) {\n return (\n {\n this.props.setStep(UPDATE_PAYMENT_SOURCE_STEP.SUCCESS);\n notifier.success(this.props.paymentSource);\n }}\n />\n );\n } else if (this.props.step === UPDATE_PAYMENT_SOURCE_STEP.SUCCESS) {\n return ;\n } else {\n return null;\n }\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n step: state.paymentSource.updateStep,\n paymentSource: state.paymentSource.paymentSource,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n setStep: (step: UPDATE_PAYMENT_SOURCE_STEP) =>\n dispatch({\n type: 'SET_UPDATE_PAYMENT_SOURCE_STEP',\n payload: step,\n }),\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UpdatePaymentSourcePage);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport { ApplicationState } from '../store';\n\ninterface StateProps {\n merchantDisplayName: string;\n paymentSourceLabel: string;\n}\n\ninterface OwnProps {\n amount: string;\n}\n\ninterface DispatchProps {}\n\ntype Props = StateProps & OwnProps & DispatchProps;\n\nclass PaymentAuthorizationAggreement extends React.PureComponent {\n render() {\n return (\n \n By clicking the button above, you authorize {this.props.merchantDisplayName} to\n electonically debit your{' '}\n {this.props.paymentSourceLabel} for{' '}\n {this.props.amount}.\n \n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => {\n return {\n merchantDisplayName: state.dropin.merchant?.display_name || '',\n paymentSourceLabel: state.paymentSource.paymentSource?.label || '',\n };\n};\n\nexport default connect(mapStateToProps)(PaymentAuthorizationAggreement);\n","import React from 'react';\nimport {connect, MapStateToPropsParam} from 'react-redux';\nimport CoBrand from './CoBrand';\nimport DropinBody from './DropinBody';\nimport DropinContent from './DropinContent';\nimport DropinFooter from './DropinFooter';\nimport PaymentAuthorizationAggreement from './PaymentAuthorizationAggreement';\nimport {ApplicationState} from '../store';\nimport * as selectors from '../store/selectors';\nimport {bindActionCreators, Dispatch} from 'redux';\nimport Loader from './Loader';\nimport Button from 'reactstrap/lib/Button';\n\ninterface StateProps {\n totalAmount: string;\n subAmount: string | null;\n convenienceFee: string | null;\n tipAmount: string | null;\n creditsAmount: string | null;\n}\n\ninterface OwnProps {\n requesting: boolean;\n onClick: () => void;\n}\n\ninterface DispatchProps {}\n\ntype Props = StateProps & OwnProps & DispatchProps;\n\nclass AddChargeStepOne extends React.PureComponent {\n render() {\n return (\n \n \n \n
\n {this.props.totalAmount}\n
\n\n {this.props.subAmount ? (\n \n
\n \n
Subtotal (+ tax)
\n
\n {this.props.subAmount}\n
\n
\n
\n ) : null}\n\n {this.props.convenienceFee ? (\n \n \n
Convenience Fee
\n
\n {this.props.convenienceFee}\n
\n
\n
\n ) : null}\n\n {this.props.tipAmount ? (\n \n \n
Tip
\n
\n {this.props.tipAmount}\n
\n
\n
\n ) : null}\n\n {this.props.creditsAmount ? (\n \n \n
Credit Applied
\n
\n ({this.props.creditsAmount})\n
\n
\n
\n ) : null}\n
\n \n \n {this.props.requesting ? : 'Pay'}\n \n \n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => {\n const addConvenienceFee = state.transaction.addChargeConfig?.add_convenience_fee || false;\n let chargeAmount = state.dropin.query?.charge?.amount || 0;\n\n const convenienceFee = state.transaction.addChargeConfig?.convenience_fee || 0;\n // If Treez or Jane and not using paylinks, add the convenience fee to the total amount.\n if (addConvenienceFee && state.dropin.query?.payLinkId === null) {\n chargeAmount += convenienceFee;\n }\n\n const processingFee = state.transaction.processingFee || 0;\n // Combine the convenience fee and processing fee to show a single fee to the user\n const combinedFees = convenienceFee + processingFee;\n const tipAmount = state.dropin.query?.tip?.amount;\n let creditsAmount = state.transaction.creditValue;\n\n return {\n totalAmount: selectors.toCurrency(chargeAmount + (tipAmount || 0) - (creditsAmount || 0) + processingFee) || '',\n subAmount: convenienceFee ? selectors.toCurrency(chargeAmount - convenienceFee) : null,\n convenienceFee: combinedFees ? selectors.toCurrency(combinedFees) : null,\n tipAmount: selectors.toCurrency(tipAmount),\n creditsAmount: creditsAmount ? selectors.toCurrency(creditsAmount) : null,\n };\n};\n\nconst mapDispatchToProps = (dispatch: Dispatch) => bindActionCreators({}, dispatch);\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddChargeStepOne);\n","import React from 'react';\nimport {connect, MapStateToPropsParam} from 'react-redux';\nimport CoBrand from './CoBrand';\nimport DropinBody from './DropinBody';\nimport DropinContent from './DropinContent';\nimport DropinFooter from './DropinFooter';\nimport {ApplicationState} from '../store';\nimport * as selectors from '../store/selectors';\nimport {bindActionCreators, Dispatch} from 'redux';\nimport Button from 'reactstrap/lib/Button';\n\ninterface StateProps {\n amount: string;\n}\n\ninterface OwnProps {\n type: 'charge' | 'tip';\n onClick: () => void;\n}\n\ninterface DispatchProps {}\n\ntype Props = StateProps & OwnProps & DispatchProps;\n\nclass PaymentSucceeded extends React.PureComponent {\n render() {\n return (\n \n \n \n
\n Thanks, your payment of {this.props.amount} has been made successfully.\n
\n
\n \n \n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (\n state: ApplicationState,\n ownProps: OwnProps,\n) => {\n let amount = 0;\n if (ownProps.type === 'charge') {\n amount = (state.dropin.query.charge?.amount || 0) + (state.dropin.query.tip?.amount || 0);\n\n const addConvenienceFee = state.transaction.addChargeConfig?.add_convenience_fee || false;\n\n // If Treez or Jane and not using paylinks, add the convenience fee to the total amount.\n if (addConvenienceFee && state.dropin.query?.payLinkId === null) {\n amount += state.transaction.addChargeConfig?.convenience_fee || 0;\n }\n\n if(state.transaction.creditValue){\n amount = amount > state.transaction.creditValue ? amount - state.transaction.creditValue : 0;\n }\n\n } else if (ownProps.type === 'tip') {\n amount = state.dropin.query.tip?.amount || 0;\n }\n\n return {\n amount: selectors.toCurrency(amount + (state.transaction.processingFee || 0)) || '',\n };\n};\n\nconst mapDispatchToProps = (dispatch: Dispatch) => bindActionCreators({}, dispatch);\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PaymentSucceeded);\n","import {AppThunkAction} from '../configureStore';\nimport {ApplicationAction} from '../actions';\nimport {client} from '../../api';\n\nexport function setCreditValue(): AppThunkAction {\n return async (dispatch, getState) => {\n dispatch({type: 'SET_TRANSACTION_REQUESTING', payload: true});\n\n const chargeAmount = getState().dropin.query.charge?.amount || 0;\n const response = await client.getMaxRedeemableCreditValue(chargeAmount);\n\n dispatch({type: 'SET_TRANSACTION_REQUESTING', payload: false});\n dispatch({type: 'SET_CREDIT_VALUE', payload: response.result.value});\n };\n}","import {AppThunkAction} from \"../configureStore\";\nimport {ApplicationAction} from \"../actions\";\nimport {client} from \"../../api\";\n\nexport function setProcessingFee(): AppThunkAction {\n return async (dispatch, getState) => {\n dispatch({type: 'SET_TRANSACTION_REQUESTING', payload: true});\n const chargeAmount = getState().dropin.query.charge?.amount || 0;\n const response = await client.getProcessingFeeValue(chargeAmount);\n dispatch({type: 'SET_TRANSACTION_REQUESTING', payload: false});\n dispatch({type: 'SET_PROCESSING_FEE', payload: response.result.payment_processing_fee});\n };\n}","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport AddChargeStepOne from '../../components/AddChargeStepOne';\nimport PaymentSucceeded from '../../components/PaymentSucceeded';\nimport { ADD_CHARGE_STEP, ApplicationState, getAddChargeConfigAction, createChargeAction } from '../../store';\nimport { ApplicationAction } from '../../store/actions';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport notifier from '../../dropin/notifier';\nimport UpdatePaymentSourceStepOne from '../../components/UpdatePaymentSourceStepOne';\nimport AddOrUpdatePaymentSourceStep from '../../components/AddOrUpdatePaymentSourceStep';\nimport { setCreditValue } from '../../store/actionCreators/credits';\nimport { setProcessingFee } from \"../../store/actionCreators/processingFees\";\n\ninterface StateProps {\n requesting: boolean;\n step: ADD_CHARGE_STEP | null;\n skipPayScreen: boolean;\n skipSuccessScreen: boolean;\n}\n\ninterface DispatchProps {\n getAddChargeConfigAction: typeof getAddChargeConfigAction;\n createChargeAction: typeof createChargeAction;\n setStep: (step: ADD_CHARGE_STEP) => void;\n setCreditValue: typeof setCreditValue;\n setProcessingFee: typeof setProcessingFee;\n}\n\ntype Props = StateProps & DispatchProps;\n\nclass AddChargePage extends React.PureComponent {\n async componentDidMount() {\n this.props.setProcessingFee();\n this.props.setCreditValue();\n this.props.getAddChargeConfigAction();\n }\n\n componentDidUpdate(prev: Props) {\n if (prev.step === this.props.step) {\n return;\n }\n\n if (this.props.step === ADD_CHARGE_STEP.ONE) {\n if (this.props.skipPayScreen) {\n this.props.createChargeAction();\n }\n }\n\n if (this.props.step === ADD_CHARGE_STEP.SUCCESS) {\n if (this.props.skipSuccessScreen) {\n notifier.exit();\n }\n }\n }\n\n render() {\n if (this.props.step === ADD_CHARGE_STEP.ONE) {\n if (this.props.skipPayScreen) {\n return null;\n }\n return (\n this.props.createChargeAction()} />\n );\n } else if (this.props.step === ADD_CHARGE_STEP.LOGIN_REQUIRED) {\n return (\n this.props.setStep(ADD_CHARGE_STEP.UPDATE)}\n />\n );\n } else if (this.props.step === ADD_CHARGE_STEP.UPDATE) {\n return (\n this.props.setStep(ADD_CHARGE_STEP.ONE)} />\n );\n } else if (this.props.step === ADD_CHARGE_STEP.SUCCESS) {\n if (this.props.skipPayScreen) {\n return null;\n }\n return notifier.exit()} type=\"charge\" />;\n } else {\n return null;\n }\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n step: state.transaction.addChargeStep,\n requesting: state.transaction.requesting,\n skipPayScreen: state.dropin.query.skipPayScreen,\n skipSuccessScreen: state.dropin.query.skipSuccessScreen,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n getAddChargeConfigAction,\n createChargeAction,\n setStep: (step: ADD_CHARGE_STEP) =>\n dispatch({\n type: 'SET_ADD_CHARGE_STEP',\n payload: step,\n }),\n setCreditValue: setCreditValue,\n setProcessingFee,\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddChargePage);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport CoBrand from './CoBrand';\nimport DropinBody from './DropinBody';\nimport DropinContent from './DropinContent';\nimport DropinFooter from './DropinFooter';\nimport PaymentAuthorizationAggreement from './PaymentAuthorizationAggreement';\nimport { ApplicationState } from '../store';\nimport * as selectors from '../store/selectors';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport Loader from './Loader';\nimport Button from 'reactstrap/lib/Button';\n\ninterface StateProps {\n amount: string;\n beneficiaryName: string;\n chargeAmount: string;\n displayMessage?: string;\n}\n\ninterface OwnProps {\n requesting: boolean;\n onClick: () => void;\n}\n\ninterface DispatchProps {}\n\ntype Props = StateProps & OwnProps & DispatchProps;\n\nclass AddTipStepOne extends React.PureComponent {\n render() {\n return (\n \n \n \n
\n {this.props.amount}\n
\n {this.props.displayMessage ? (\n

{this.props.displayMessage}

\n ) : (\n \n
Order completed by
\n
\n {this.props.beneficiaryName}\n
\n
\n for {this.props.chargeAmount}\n
\n
\n )}\n
\n \n \n {this.props.requesting ? : 'Tip'}\n \n \n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => {\n return {\n amount: selectors.toCurrency(state.dropin.query?.tip?.amount || 0) || '',\n chargeAmount: selectors.toCurrency(state.transaction.charge?.amount || 0) || '',\n beneficiaryName: state.dropin.query?.tip?.beneficiaryName || '',\n displayMessage: state.dropin.query?.tip?.details?.displayMessage || undefined,\n };\n};\n\nconst mapDispatchToProps = (dispatch: Dispatch) => bindActionCreators({}, dispatch);\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddTipStepOne);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport AddTipStepOne from '../../components/AddTipStepOne';\nimport PaymentSucceeded from '../../components/PaymentSucceeded';\nimport { ApplicationState, getAddTipConfigAction, createTipAction, ADD_TIP_STEP } from '../../store';\nimport { ApplicationAction } from '../../store/actions';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport notifier from '../../dropin/notifier';\nimport UpdatePaymentSourceStepOne from '../../components/UpdatePaymentSourceStepOne';\nimport AddOrUpdatePaymentSourceStep from '../../components/AddOrUpdatePaymentSourceStep';\n\ninterface StateProps {\n requesting: boolean;\n step: ADD_TIP_STEP | null;\n skipPayScreen: boolean;\n skipSuccessScreen: boolean;\n}\n\ninterface DispatchProps {\n getAddTipConfigAction: typeof getAddTipConfigAction;\n createTipAction: typeof createTipAction;\n setStep: (step: ADD_TIP_STEP) => void;\n}\n\ntype Props = StateProps & DispatchProps;\n\nclass AddTipPage extends React.PureComponent {\n componentDidMount() {\n this.props.getAddTipConfigAction();\n }\n\n componentDidUpdate(prev: Props) {\n if (prev.step === this.props.step) {\n return;\n }\n\n if (this.props.step === ADD_TIP_STEP.ONE) {\n if (this.props.skipPayScreen) {\n this.props.createTipAction();\n }\n }\n\n if (this.props.step === ADD_TIP_STEP.SUCCESS) {\n if (this.props.skipSuccessScreen) {\n notifier.exit();\n }\n }\n }\n\n render() {\n if (this.props.step === ADD_TIP_STEP.ONE) {\n if (this.props.skipPayScreen) {\n return null;\n }\n return this.props.createTipAction()} />;\n } else if (this.props.step === ADD_TIP_STEP.LOGIN_REQUIRED) {\n return (\n this.props.setStep(ADD_TIP_STEP.UPDATE)}\n />\n );\n } else if (this.props.step === ADD_TIP_STEP.UPDATE) {\n return this.props.setStep(ADD_TIP_STEP.ONE)} />;\n } else if (this.props.step === ADD_TIP_STEP.SUCCESS) {\n if (this.props.skipPayScreen) {\n return null;\n }\n return notifier.exit()} type=\"tip\" />;\n } else {\n return null;\n }\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n step: state.transaction.addTipStep,\n requesting: state.transaction.requesting,\n skipPayScreen: state.dropin.query.skipPayScreen,\n skipSuccessScreen: state.dropin.query.skipSuccessScreen,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n getAddTipConfigAction,\n createTipAction,\n setStep: (step: ADD_TIP_STEP) =>\n dispatch({\n type: 'SET_ADD_TIP_STEP',\n payload: step,\n }),\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddTipPage);\n","import React from 'react';\n\nconst HomePage = () => (\n
\n

\n Hello! See https://docs.strongholdpay.com for more information.\n

\n
\n);\n\nexport default HomePage;\n","import React from 'react';\nimport {connect, MapStateToPropsParam} from 'react-redux';\nimport {ERROR_CODE, StrongholdPayError} from '@stronghold/pay-dropin';\nimport {Button} from 'reactstrap';\nimport DropinContent from './DropinContent';\nimport DropinBody from './DropinBody';\nimport DropinFooter from './DropinFooter';\nimport CoBrand from './CoBrand';\nimport notifier from '../dropin/notifier';\nimport {MESSAGE} from '../message';\nimport {ApplicationState} from '../store';\nimport {AGGREGATOR_ERROR_CODES} from \"../errorCodes\";\nimport {getErrorMessage} from \"../dropin/utils\";\n\ninterface StateProps {\n error: StrongholdPayError | null;\n message: string | null;\n}\n\ninterface OwnProps {\n onClick?: () => void;\n}\n\ntype Props = StateProps & OwnProps;\n\nclass DropinError extends React.PureComponent {\n onClick = () => {\n if (this.props.onClick) {\n this.props.onClick();\n } else {\n notifier.exit();\n }\n };\n\n renderContact = () => {\n return (\n
\n Please contact happiness@stronghold.co if you have any\n questions.\n
\n );\n };\n\n render() {\n let text = MESSAGE.SOMETHING_WENT_WRONG;\n let closeButtonText = 'Close';\n let reference = this.props.error?.reference;\n let showContactSupport = true;\n\n if (this.props.message) {\n text = this.props.message;\n if (this.props.error) {\n switch(this.props.error.code.toString()) {\n case AGGREGATOR_ERROR_CODES.AGGREGATOR_SUPPORT_ERROR:\n // Prevent redundant contact support message from rendering since consumers should reach out to the\n // payment aggregator vendor for assistance \n showContactSupport = false;\n break;\n case AGGREGATOR_ERROR_CODES.INCOMPATIBLE_YODLEE_ACCOUNT:\n case AGGREGATOR_ERROR_CODES.AGGREGATOR_INTEGRATION_ERROR:\n showContactSupport = true;\n break;\n }\n }\n } else if (this.props.error) {\n text = getErrorMessage(this.props.error, this.props.message);\n switch (this.props.error.code) {\n case ERROR_CODE.INSUFFICIENT_BALANCE:\n closeButtonText = `Continue`;\n break;\n case ERROR_CODE.PAYMENT_SOURCE_UNAVAILABLE:\n closeButtonText = `Continue`;\n break;\n case ERROR_CODE.PAYMENT_SOURCE_LOGIN_UNAVAILABLE:\n closeButtonText = `Continue`;\n break;\n case ERROR_CODE.PAYMENT_SOURCE_INACTIVE:\n closeButtonText = `Continue`;\n break;\n case ERROR_CODE.PAYMENT_SOURCE_ACTION_REQUIRED:\n closeButtonText = `Continue`;\n break;\n case ERROR_CODE.CUSTOMER_BLOCKED:\n showContactSupport = true;\n break;\n case ERROR_CODE.CHARGE_BLOCKED_OUTSTANDING_PAYMENT:\n showContactSupport = true;\n break;\n case ERROR_CODE.CHARGE_TIP_ALREADY_CREATED:\n closeButtonText = `Continue`;\n break;\n case ERROR_CODE.PAYMENT_SOURCE_LOGIN_REQUIRED:\n closeButtonText = `Continue`;\n break;\n case ERROR_CODE.PAY_LINK_CANCELED:\n showContactSupport = false;\n break;\n case ERROR_CODE.INVALID_CHARGE_AMOUNT:\n case ERROR_CODE.INVALID_TIP_AMOUNT:\n showContactSupport = false;\n break;\n }\n }\n\n return (\n \n \n \n
{text}
\n {showContactSupport && this.renderContact()}\n \n {reference}\n \n
\n \n \n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n error: state.error.error,\n message: state.error.message,\n});\n\nexport default connect(mapStateToProps)(DropinError);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport { withRouter, RouteComponentProps } from 'react-router';\nimport * as querystring from 'query-string';\nimport { ApplicationState } from '../store';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { isMobile } from 'react-device-detect';\nimport { initDropinAction } from '../store';\nimport DropinError from './DropinError';\n\ninterface StateProps {\n ready: boolean;\n showError: boolean;\n}\n\ninterface OwnProps {\n children?: React.ReactNode;\n}\n\ninterface DispatchProps {\n initDropinAction: typeof initDropinAction;\n}\n\ntype Props = StateProps & OwnProps & DispatchProps & RouteComponentProps;\n\ninterface State {\n isMobile: boolean;\n}\n\nclass DropinLayout extends React.PureComponent {\n constructor(props: Props) {\n super(props);\n this.state = {\n isMobile,\n };\n }\n\n componentDidMount() {\n const search = this.props.location.search;\n const parsed = querystring.parse(search);\n const pathname = this.props.location.pathname\n this.props.initDropinAction(parsed, pathname);\n }\n\n render() {\n if (!this.props.ready) {\n return null;\n }\n\n if (this.props.showError) {\n return ;\n }\n\n return <>{this.props.children};\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n ready: state.dropin.ready,\n showError: state.error.show,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n initDropinAction,\n },\n dispatch,\n );\n\nexport default withRouter(connect(mapStateToProps, mapDispatchToProps)(DropinLayout));\n","import { AppThunkAction } from '../configureStore';\nimport { ApplicationAction } from '../actions';\nimport { client } from '../../api';\nimport {\n AuthenticationMethod,\n CUSTOMER_LOGIN_STEP,\n CUSTOMER_PAGE,\n CUSTOMER_SIGNUP_STEP,\n CustomerLoginRequestModel,\n CustomerSignupRequestModel,\n} from '../types';\nimport notifier from '../../dropin/notifier';\n\nexport function setCustomerPage(step: CUSTOMER_PAGE): AppThunkAction {\n return async (dispatch) => {\n dispatch({ type: 'SET_CUSTOMER_PAGE', payload: step });\n };\n}\n\nexport function setCustomerLoginStep(step: CUSTOMER_LOGIN_STEP): AppThunkAction {\n return async (dispatch) => {\n dispatch({ type: 'SET_CUSTOMER_LOGIN_STEP', payload: step });\n };\n}\n\nexport function setCustomerSignupStep(step: CUSTOMER_SIGNUP_STEP): AppThunkAction {\n return async (dispatch) => {\n dispatch({ type: 'SET_CUSTOMER_SIGNUP_STEP', payload: step });\n };\n}\n\nexport function setAuthenticationMethod(method: AuthenticationMethod): AppThunkAction {\n return async (dispatch) => {\n dispatch({ type: 'SET_AUTHENTICATION_METHOD', payload: method });\n };\n}\n\nexport function setAuthenticationToken(token: string | null): AppThunkAction {\n return async (dispatch) => {\n dispatch({ type: 'SET_AUTHENTICATION_TOKEN', payload: token });\n };\n}\n\nexport function loginAction(data: CustomerLoginRequestModel): AppThunkAction {\n return async (dispatch) => {\n dispatch({ type: 'SET_CUSTOMER_REQUESTING', payload: true });\n dispatch({ type: 'RESET_ERROR' });\n dispatch({ type: 'SET_CUSTOMER_LOGIN', payload: data });\n\n try {\n const response = await client.login(data);\n dispatch({ type: 'SET_AUTHENTICATION_TOKEN', payload: response.result.token });\n } catch (e) {\n notifier.ready();\n dispatch({ type: 'SET_ERROR', payload: e });\n dispatch({ type: 'SET_CUSTOMER_LOGIN', payload: null });\n } finally {\n dispatch({ type: 'SET_CUSTOMER_REQUESTING', payload: false });\n }\n };\n}\n\nexport function signupAction(data: CustomerSignupRequestModel): AppThunkAction {\n return async (dispatch) => {\n dispatch({ type: 'SET_CUSTOMER_REQUESTING', payload: true });\n dispatch({ type: 'RESET_ERROR' });\n dispatch({ type: 'SET_CUSTOMER_SIGNUP', payload: data });\n\n try {\n if (data.authentication_method === 'sms') {\n data.customer_details.email = null;\n } else if (data.authentication_method === 'email') {\n data.customer_details.mobile = null;\n }\n\n const response = await client.signup(data);\n dispatch({ type: 'SET_AUTHENTICATION_TOKEN', payload: response.result.token });\n } catch (e) {\n notifier.ready();\n dispatch({ type: 'SET_ERROR', payload: e });\n dispatch({ type: 'SET_CUSTOMER_SIGNUP', payload: null });\n } finally {\n dispatch({ type: 'SET_CUSTOMER_REQUESTING', payload: false });\n }\n };\n}\n\nexport function verifyAction(code: string): AppThunkAction {\n return async (dispatch, getState) => {\n dispatch({ type: 'SET_CUSTOMER_REQUESTING', payload: true });\n dispatch({ type: 'RESET_ERROR' });\n const token = getState().customer.token;\n\n if (!token) {\n return;\n }\n\n try {\n const response = await client.verify({ code, token });\n notifier.success(response.result);\n } catch (e) {\n dispatch({ type: 'SET_ERROR', payload: e });\n } finally {\n dispatch({ type: 'SET_CUSTOMER_REQUESTING', payload: false });\n }\n };\n}\n","import * as React from 'react';\nimport PhoneInput from 'react-phone-input-2';\n\ninterface Props {\n value: string;\n placeholder?: string;\n isInvalid: boolean;\n onChange: (phone: string) => void;\n disabled?: boolean;\n}\n\nclass PhoneNumberInput extends React.Component {\n render() {\n const { value, placeholder, isInvalid, onChange, disabled} = this.props;\n\n return (\n {\n mobile = mobile.replace(/[^0-9+]/g, '');\n onChange(`+${mobile}`);\n }}\n containerClass={['form-control', isInvalid ? 'is-invalid' : ''].join(' ')}\n disabled={disabled}\n inputProps={{\n name: 'mobile_phone_number',\n className: [\n disabled ? 'disabled' : '',\n 'border-top-0',\n 'border-right-0',\n 'border-left-0',\n 'border-bottom-0',\n ].join(' '),\n disabled: disabled,\n }}\n />\n );\n }\n}\n\nexport default PhoneNumberInput;\n","import React, { FormEvent, Ref } from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport { ApplicationState, AuthenticationMethod, CUSTOMER_LOGIN_STEP, CustomerLoginRequestModel } from '../store';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { Form, FormFeedback } from 'reactstrap';\nimport { loginAction, setAuthenticationMethod, setCustomerLoginStep } from '../store/actionCreators/findCustomer';\nimport FormGroup from 'reactstrap/lib/FormGroup';\nimport PhoneNumberInput from './PhoneNumberInput';\nimport { StrongholdPayError } from '@stronghold/pay-dropin';\nimport { isPropertyError } from '../store/selectors';\nimport { getErrorMessage, isValidEmail } from '../dropin/utils';\nimport Input from 'reactstrap/lib/Input';\n\ninterface StateProps {\n requesting: boolean;\n authenticationMethod: AuthenticationMethod;\n error: StrongholdPayError | null;\n login: CustomerLoginRequestModel | null;\n}\n\ninterface State {\n mobile: string;\n email: string;\n}\n\ninterface OwnProps {\n submitRef: Ref;\n disabled: (disabled: boolean) => void;\n}\n\ninterface DispatchProps {\n setCustomerLoginStep: typeof setCustomerLoginStep;\n setAuthenticationMethod: typeof setAuthenticationMethod;\n customerLogin: typeof loginAction;\n resetError: () => void;\n}\n\ntype Props = StateProps & OwnProps & DispatchProps;\n\nclass LoginForm extends React.PureComponent {\n constructor(props: Props) {\n super(props);\n\n this.state = {\n mobile:\n this.props.login && this.props.login.authentication_method === 'sms' ? this.props.login.username : '',\n email:\n this.props.login && this.props.login.authentication_method === 'email' ? this.props.login.username : '',\n };\n\n this.onSubmit = this.onSubmit.bind(this);\n }\n\n onLogin = async (authenticationMethod: AuthenticationMethod) => {\n let username = authenticationMethod === 'sms' ? this.state.mobile : this.state.email;\n let request = {\n authentication_method: authenticationMethod,\n username: username,\n } as CustomerLoginRequestModel;\n await this.props.customerLogin(request);\n\n if (!this.props.error) {\n this.props.setCustomerLoginStep(CUSTOMER_LOGIN_STEP.TWO);\n }\n };\n\n onSubmit = () => async (event: FormEvent) => {\n event.preventDefault();\n await this.onLogin(this.props.authenticationMethod);\n };\n\n toggleAuthMethod = (authMethod: AuthenticationMethod) => {\n this.props.setAuthenticationMethod(authMethod);\n };\n\n render() {\n const { requesting, error, authenticationMethod, submitRef, resetError, disabled } = this.props;\n const { mobile, email } = this.state;\n\n const isDisabled =\n error !== null ||\n requesting ||\n (authenticationMethod === 'email' && !isValidEmail(email)) ||\n (authenticationMethod === 'sms' && !mobile);\n disabled(isDisabled);\n\n return (\n \n
To log in, please enter your mobile phone number or email address.
\n
\n \n
\n \n \n
\n {this.props.authenticationMethod === 'sms' ? (\n \n {\n resetError();\n this.setState({ mobile });\n }}\n />\n \n {error &&\n isPropertyError('username', error) &&\n getErrorMessage(error, error.message)}\n \n \n ) : (\n \n {\n resetError();\n this.setState({\n email: e.currentTarget.value,\n });\n }}\n invalid={isPropertyError('username', error)}\n />\n \n {error &&\n isPropertyError('username', error) &&\n getErrorMessage(error, error.message)}\n \n \n )}\n
\n
\n \n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n page: state.customer.page,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n setCustomerPage,\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(CustomerFooter);\n","import React, { createRef } from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport { ApplicationState } from '../store';\nimport DropinContent from './DropinContent';\nimport DropinBody from './DropinBody';\nimport CoBrand from './CoBrand';\nimport DropinFooter from './DropinFooter';\nimport LoginForm from './LoginForm';\nimport Loader from './Loader';\nimport Button from 'reactstrap/lib/Button';\nimport CustomerFooter from './CustomerFooter';\n\ninterface StateProps {\n requesting: boolean;\n}\ninterface State {\n disabled: boolean;\n}\n\ntype Props = StateProps;\nclass CustomerLoginStepOne extends React.PureComponent {\n constructor(props: Props) {\n super(props);\n\n this.state = {\n disabled: true,\n };\n }\n\n submitRef = createRef();\n\n toggleLoginButton = (disabled: boolean) => {\n this.setState({ disabled: disabled });\n };\n render() {\n const { requesting } = this.props;\n const { disabled } = this.state;\n let content = ;\n\n return (\n \n \n \n
\n {content}\n
\n
\n \n this.submitRef.current?.click()}\n >\n {requesting ? : 'Log in'}\n \n \n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n requesting: state.customer.requesting,\n});\n\nexport default connect(mapStateToProps)(CustomerLoginStepOne);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport CoBrand from './CoBrand';\nimport DropinBody from './DropinBody';\nimport DropinContent from './DropinContent';\nimport DropinFooter from './DropinFooter';\nimport Button from 'reactstrap/lib/Button';\nimport notifier from '../dropin/notifier';\nimport { ApplicationState } from '../store';\n\ninterface StateProps {\n merchantDisplayName: string;\n}\n\ntype Props = StateProps;\nclass CustomerLoginStepSuccess extends React.PureComponent {\n render() {\n const { merchantDisplayName } = this.props;\n return (\n \n \n \n
\n Thanks, you have successfully logged into your Stronghold account for{' '}\n {merchantDisplayName}.\n
\n
\n \n \n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n merchantDisplayName: state.dropin.merchant?.display_name || '',\n});\n\nexport default connect(mapStateToProps)(CustomerLoginStepSuccess);\n","import * as React from 'react';\nimport { FormEvent, Ref } from 'react';\nimport { Button, FormFeedback } from 'reactstrap';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport { ApplicationState, AuthenticationMethod, CustomerSignupRequestModel } from '../store';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport FormGroup from 'reactstrap/lib/FormGroup';\nimport Form from 'reactstrap/lib/Form';\nimport { StrongholdPayError } from '@stronghold/pay-dropin';\nimport MaskedInput from 'react-text-mask';\nimport { verifyAction } from '../store/actionCreators/findCustomer';\nimport { getErrorMessage } from '../dropin/utils';\n\ninterface StateProps {\n requesting: boolean;\n error: StrongholdPayError | null;\n signupRequest: CustomerSignupRequestModel | null;\n token: string | null;\n}\n\ntype OwnProps = {\n authenticationMethod: AuthenticationMethod;\n value: string;\n isResending: boolean;\n onResend: () => void;\n onSuccess?: () => void;\n submitRef: Ref;\n disabled: (disabled: boolean) => void;\n};\n\ninterface DispatchProps {\n verify: typeof verifyAction;\n}\n\ntype Props = OwnProps & StateProps & DispatchProps;\n\ntype State = {\n code: string;\n};\n\nclass VerificationCode extends React.Component {\n public state: State = {\n code: '',\n };\n\n onSubmit = async (event: FormEvent) => {\n event.preventDefault();\n await this.props.verify(this.state.code.replace(/ /g, '').replace(/_/g, ''));\n\n if (this.props.onSuccess && !this.props.error) {\n this.props.onSuccess();\n }\n };\n\n isDisabled = () =>\n !this.props.token ||\n this.props.isResending ||\n this.props.requesting ||\n this.state.code === '' ||\n this.state.code.replace(/ /g, '').replace(/_/g, '').length !== 4;\n\n render() {\n const { requesting, error, isResending, submitRef, value, disabled } = this.props;\n disabled(this.isDisabled());\n\n return (\n \n
\n

\n Enter the verification code sent to {value}.\n

\n \n this.setState({ code: e.currentTarget.value })}\n ref={(input) => {\n setTimeout(() => {\n if (input && input.inputElement) {\n input.inputElement.focus();\n }\n }, 500);\n }}\n />\n {error && getErrorMessage(error, null)}\n \n \n Resend\n \n \n this.submitRef.current?.click()}\n >\n {requesting ? : 'Verify'}\n \n \n \n
\n );\n }\n}\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n setCustomerLoginStep,\n resendToken: loginAction,\n },\n dispatch,\n );\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n merchantDisplayName: state.dropin.merchant?.display_name || '',\n requesting: state.customer.requesting,\n loginRequest: state.customer.login,\n authenticationMethod: state.customer.authenticationMethod,\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(CustomerLoginStepTwo);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport { ApplicationState, CUSTOMER_LOGIN_STEP } from '../store';\nimport CustomerLoginStepOne from './CustomerLoginStepOne';\nimport CustomerLoginStepSuccess from './CustomerLoginStepSuccess';\nimport CustomerLoginStepTwo from './CustomerLoginStepTwo';\n\ninterface StateProps {\n requesting: boolean;\n step: CUSTOMER_LOGIN_STEP;\n}\n\ntype Props = StateProps;\n\nclass Login extends React.PureComponent {\n render() {\n if (this.props.step === CUSTOMER_LOGIN_STEP.ONE) {\n return ;\n } else if (this.props.step === CUSTOMER_LOGIN_STEP.TWO) {\n return ;\n } else if (this.props.step === CUSTOMER_LOGIN_STEP.SUCCESS) {\n return ;\n } else {\n return null;\n }\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n requesting: state.paymentSource.requesting,\n step: state.customer.loginStep,\n});\n\nexport default connect(mapStateToProps)(Login);\n","import React from 'react';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { setCustomerSignupStep } from '../store/actionCreators/findCustomer';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport { ApplicationState, CUSTOMER_SIGNUP_STEP } from '../store';\nimport DropinContent from './DropinContent';\nimport DropinBody from './DropinBody';\nimport CoBrand from './CoBrand';\nimport DropinFooter from './DropinFooter';\nimport Button from 'reactstrap/lib/Button';\nimport Loader from './Loader';\nimport CustomerFooter from './CustomerFooter';\n\ninterface StateProps {\n merchantDisplayName: string;\n requesting: boolean;\n}\n\ninterface DispatchProps {\n setCustomerSignupStep: typeof setCustomerSignupStep;\n}\n\ntype Props = StateProps & DispatchProps;\nclass CustomerSignupStepOne extends React.PureComponent {\n render() {\n return (\n \n \n \n
\n Sign up for payments at {this.props.merchantDisplayName}\n
\n
We need a few details in order to create your account.
\n
\n \n this.props.setCustomerSignupStep(CUSTOMER_SIGNUP_STEP.TWO)}\n >\n {this.props.requesting ? : 'Next'}\n \n \n \n
\n );\n }\n}\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n setCustomerSignupStep,\n },\n dispatch,\n );\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n merchantDisplayName: state.dropin.merchant?.display_name || '',\n requesting: state.customer.requesting,\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(CustomerSignupStepOne);\n","import * as React from 'react';\nimport { FormEvent, Ref } from 'react';\nimport Form from 'reactstrap/lib/Form';\nimport Input from 'reactstrap/lib/Input';\nimport FormGroup from 'reactstrap/lib/FormGroup';\nimport Label from 'reactstrap/lib/Label';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { ApplicationState, CUSTOMER_SIGNUP_STEP, CustomerSignupRequestModel } from '../store';\nimport querystring from 'querystring';\nimport { Link } from 'react-router-dom';\nimport { AuthenticationMethod } from '../store';\nimport { setAuthenticationMethod, setCustomerSignupStep, signupAction } from '../store/actionCreators/findCustomer';\nimport PhoneNumberInput from './PhoneNumberInput';\nimport { StrongholdPayError } from '@stronghold/pay-dropin';\nimport { isPropertyError } from '../store/selectors';\nimport { FormFeedback } from 'reactstrap';\nimport { formatDob, formatDobDisplay, getErrorMessage, isValidDob, isValidEmail } from '../dropin/utils';\n\ninterface StateProps {\n requesting: boolean;\n error: StrongholdPayError | null;\n authenticationMethod: AuthenticationMethod;\n signup: CustomerSignupRequestModel | null;\n}\n\ninterface DispatchProps {\n setAuthenticationMethod: typeof setAuthenticationMethod;\n setCustomerSignupStep: typeof setCustomerSignupStep;\n customerSignup: typeof signupAction;\n resetCustomerSignup: () => void;\n}\n\ninterface OwnProps {\n submitRef: Ref;\n disabled: (disabled: boolean) => void;\n}\n\ntype Props = StateProps & DispatchProps & OwnProps;\n\ninterface State {\n firstName: string;\n lastName: string;\n dateOfBirth: string;\n mobile: string;\n email: string;\n showSms: boolean;\n agree: boolean;\n}\n\nfunction onSubmit(fn: () => void) {\n return (event: FormEvent) => {\n event.preventDefault();\n fn();\n };\n}\n\nclass SignupForm extends React.Component {\n constructor(props: Props) {\n super(props);\n\n this.state = {\n dateOfBirth: formatDobDisplay(props.signup?.customer_details.date_of_birth),\n firstName: props.signup?.customer_details.first_name ?? '',\n lastName: props.signup?.customer_details.last_name ?? '',\n email: props.signup?.customer_details.email ?? '',\n mobile: props.signup?.customer_details.mobile ?? '',\n showSms: props.authenticationMethod === 'sms' ?? true,\n agree: false,\n };\n\n this.onSignup = this.onSignup.bind(this);\n }\n\n toggleAuthMethod = (authMethod: AuthenticationMethod) => {\n this.props.setAuthenticationMethod(authMethod);\n this.setState({ showSms: authMethod === 'sms' });\n };\n\n async onSignup() {\n let request = {\n customer_details: {\n first_name: this.state.firstName,\n last_name: this.state.lastName,\n date_of_birth: formatDob(this.state.dateOfBirth),\n mobile: this.state.mobile,\n email: this.state.email,\n },\n authentication_method: this.props.authenticationMethod,\n } as CustomerSignupRequestModel;\n await this.props.customerSignup(request);\n\n if (!this.props.error) {\n this.props.setCustomerSignupStep(CUSTOMER_SIGNUP_STEP.THREE);\n }\n }\n\n tryLogin = (isMobile: boolean) => {\n let query;\n if (isMobile) {\n query = querystring.stringify({ mobile: this.state.mobile });\n } else {\n query = querystring.stringify({ email: this.state.email });\n }\n return (\n \n {isMobile ? 'Mobile phone number' : 'Email'} already taken. Please{' '}\n login using this {isMobile ? 'phone number' : 'email address'}.\n \n );\n };\n\n render() {\n const { error, requesting, authenticationMethod, submitRef, disabled } = this.props;\n const { firstName, lastName, mobile, email, dateOfBirth, agree, showSms } = this.state;\n\n const isDisabled =\n requesting ||\n !firstName ||\n !lastName ||\n !isValidDob(dateOfBirth) ||\n (authenticationMethod === 'email' && !isValidEmail(email)) ||\n (authenticationMethod === 'sms' && (!mobile || !agree));\n\n disabled(isDisabled);\n\n return (\n \n
\n \n \n this.setState({ firstName: e.currentTarget.value })}\n invalid={(isPropertyError('customer_details.first_name', error) ||\n isPropertyError('first_name', error))}\n />\n \n {error &&\n (isPropertyError('customer_details.first_name', error) || \n isPropertyError('first_name', error)) &&\n getErrorMessage(error, null)}\n \n \n \n \n this.setState({ lastName: e.currentTarget.value })}\n invalid={(isPropertyError('customer_details.last_name', error) ||\n isPropertyError('last_name', error))}\n />\n \n {error &&\n (isPropertyError('customer_details.last_name', error) ||\n isPropertyError('last_name', error)) &&\n getErrorMessage(error, null)}\n \n \n \n \n {\n this.setState({ dateOfBirth: e.currentTarget.value });\n }}\n invalid={\n (isPropertyError('customer_details.date_of_birth', error) ||\n isPropertyError('date_of_birth', error)) ||\n (dateOfBirth !== '' && !isValidDob(dateOfBirth))\n }\n />\n \n {(error &&\n (isPropertyError('customer_details.date_of_birth', error) ||\n isPropertyError('date_of_birth', error)) &&\n getErrorMessage(error, null)) ||\n (dateOfBirth && !isValidDob(dateOfBirth) && 'Date must be in MM/DD/YYYY format')}\n \n \n \n \n
\n \n \n
\n {showSms ? (\n \n this.setState({ mobile })}\n />\n \n {error &&\n (isPropertyError('customer_details.mobile', error) ||\n isPropertyError('mobile', error)) &&\n getErrorMessage(error, null)}\n \n \n ) : (\n \n this.setState({ email: e.currentTarget.value })}\n invalid={isPropertyError('customer_details.email', error) ||\n isPropertyError('email', error)}\n />\n \n {(error &&\n (isPropertyError('customer_details.email', error) \n || isPropertyError('email', error)) &&\n getErrorMessage(error, null)) ||\n (email && !isValidEmail(email) && 'Invalid email')}\n \n \n )}\n
\n \n {showSms && (\n \n )}\n \n
\n \n \n \n );\n }\n}\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n setCustomerSignupStep,\n },\n dispatch,\n );\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n merchantDisplayName: state.dropin.merchant?.display_name || '',\n requesting: state.customer.requesting,\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(CustomerSignupStepTwo);\n","import React, { createRef } from 'react';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { setCustomerSignupStep, signupAction } from '../store/actionCreators/findCustomer';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport { ApplicationState, AuthenticationMethod, CUSTOMER_SIGNUP_STEP, CustomerSignupRequestModel } from '../store';\nimport DropinContent from './DropinContent';\nimport DropinBody from './DropinBody';\nimport CoBrand from './CoBrand';\nimport DropinFooter from './DropinFooter';\nimport Button from 'reactstrap/lib/Button';\nimport Loader from './Loader';\nimport VerificationCode from './VerificationCode';\nimport CustomerFooter from './CustomerFooter';\n\ninterface StateProps {\n merchantDisplayName: string;\n requesting: boolean;\n signupRequest: CustomerSignupRequestModel | null;\n authenticationMethod: AuthenticationMethod;\n}\n\ninterface DispatchProps {\n setCustomerSignupStep: typeof setCustomerSignupStep;\n resendToken: typeof signupAction;\n}\n\ninterface State {\n disabled: boolean;\n}\n\ntype Props = StateProps & DispatchProps;\nclass CustomerSignupStepThree extends React.PureComponent {\n public state: State = {\n disabled: true,\n };\n\n submitRef = createRef();\n\n onResend = async () => {\n const { signupRequest } = this.props;\n if (!signupRequest) {\n return;\n }\n\n try {\n await this.props.resendToken(signupRequest);\n } catch (error) {\n // Error\n }\n };\n\n toggleVerifyButton = (disabled: boolean) => {\n this.setState({ disabled: disabled });\n };\n\n render() {\n const { signupRequest, requesting, authenticationMethod } = this.props;\n const { disabled } = this.state;\n\n if (!signupRequest || (!signupRequest.customer_details.mobile && !signupRequest.customer_details.email)) {\n return null;\n }\n\n let content = (\n this.props.setCustomerSignupStep(CUSTOMER_SIGNUP_STEP.SUCCESS)}\n submitRef={this.submitRef}\n disabled={this.toggleVerifyButton}\n />\n );\n\n return (\n \n \n \n
\n {content}\n
\n
\n \n this.props.setCustomerSignupStep(CUSTOMER_SIGNUP_STEP.TWO)}\n >\n {requesting ? : 'Back'}\n \n this.submitRef.current?.click()}\n >\n {requesting ? : 'Verify'}\n \n \n \n
\n );\n }\n}\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n setCustomerSignupStep,\n resendToken: signupAction,\n },\n dispatch,\n );\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n merchantDisplayName: state.dropin.merchant?.display_name || '',\n requesting: state.customer.requesting,\n signupRequest: state.customer.signup,\n authenticationMethod: state.customer.authenticationMethod,\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(CustomerSignupStepThree);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport CoBrand from './CoBrand';\nimport DropinBody from './DropinBody';\nimport DropinContent from './DropinContent';\nimport DropinFooter from './DropinFooter';\nimport Button from 'reactstrap/lib/Button';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport notifier from '../dropin/notifier';\nimport { ApplicationState } from '../store';\n\ninterface StateProps {\n merchantDisplayName: string;\n}\n\ntype Props = StateProps;\nclass CustomerSignupStepSuccess extends React.PureComponent {\n render() {\n const { merchantDisplayName } = this.props;\n return (\n \n \n \n
\n Thanks, your new Stronghold account has been created for {merchantDisplayName}.\n
\n
\n \n \n \n
\n );\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n merchantDisplayName: state.dropin.merchant?.display_name || '',\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => bindActionCreators({}, dispatch);\n\nexport default connect(mapStateToProps, mapDispatchToProps)(CustomerSignupStepSuccess);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport { ApplicationState, CUSTOMER_SIGNUP_STEP } from '../store';\nimport { setCustomerPage } from '../store/actionCreators/findCustomer';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport CustomerSignupStepOne from './CustomerSignupStepOne';\nimport CustomerSignupStepTwo from './CustomerSignupStepTwo';\nimport CustomerSignupStepThree from './CustomerSignupStepThree';\nimport CustomerSignupStepSuccess from './CustomerSignupStepSuccess';\n\ninterface StateProps {\n requesting: boolean;\n step: CUSTOMER_SIGNUP_STEP;\n}\n\ninterface DispatchProps {\n setCustomerPage: typeof setCustomerPage;\n}\n\ntype Props = StateProps & DispatchProps;\n\nclass Signup extends React.PureComponent {\n render() {\n if (this.props.step === CUSTOMER_SIGNUP_STEP.ONE) {\n return ;\n } else if (this.props.step === CUSTOMER_SIGNUP_STEP.TWO) {\n return ;\n } else if (this.props.step === CUSTOMER_SIGNUP_STEP.THREE) {\n return ;\n } else if (this.props.step === CUSTOMER_SIGNUP_STEP.SUCCESS) {\n return ;\n } else {\n return null;\n }\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n requesting: state.customer.requesting,\n step: state.customer.signupStep,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n setCustomerPage,\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Signup);\n","import React from 'react';\nimport { connect, MapStateToPropsParam } from 'react-redux';\nimport { ApplicationState, CUSTOMER_PAGE } from '../../store';\nimport notifier from '../../dropin/notifier';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { ApplicationAction } from '../../store/actions';\nimport Login from '../../components/Login';\nimport Signup from '../../components/Signup';\nimport { setCustomerPage } from '../../store/actionCreators/findCustomer';\n\ninterface StateProps {\n page: CUSTOMER_PAGE;\n}\n\ninterface DispatchProps {\n setCustomerPage: typeof setCustomerPage;\n}\n\ntype Props = StateProps & DispatchProps;\n\nclass FindCustomerPage extends React.PureComponent {\n componentDidMount() {\n notifier.ready();\n }\n\n render() {\n if (this.props.page === CUSTOMER_PAGE.LOGIN) {\n return ;\n } else {\n return ;\n }\n }\n}\n\nconst mapStateToProps: MapStateToPropsParam = (state: ApplicationState) => ({\n page: state.customer.page,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) =>\n bindActionCreators(\n {\n setCustomerPage,\n },\n dispatch,\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(FindCustomerPage);\n","import React from 'react';\nimport { Redirect, Route, Switch } from 'react-router';\nimport AddPaymentSourcePage from './pages/dropin/AddPaymentSourcePage';\nimport UpdatePaymentSourcePage from './pages/dropin/UpdatePaymentSourcePage';\nimport AddChargePage from './pages/dropin/AddChargePage';\nimport AddTipPage from './pages/dropin/AddTipPage';\nimport HomePage from './pages/HomePage';\nimport DropinLayout from './components/DropinLayout';\nimport FindCustomerPage from \"./pages/dropin/FindCustomerPage\";\n\nexport default () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n","// In production, we register a service worker to serve assets from local cache.\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 the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\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.1/8 is considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/),\n);\n\nexport default function register() {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const url = process.env.PUBLIC_URL as string;\n const publicUrl = new URL(url, window.location.toString());\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/facebookincubator/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. Lets check if a service worker still exists or not.\n checkValidServiceWorker(swUrl);\n } else {\n // Is not local host. Just register service worker\n registerValidSW(swUrl);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing as ServiceWorker;\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and\n // the fresh content will have been added to the cache.\n // It's the perfect time to display a \"New content is\n // available; please refresh.\" message in your web app.\n console.log('New content is available; please refresh.');\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 }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\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 (response.status === 404 || (contentType && contentType.indexOf('javascript') === -1)) {\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);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister();\n });\n }\n}\n","import './styles/styles.scss';\n\nimport React from 'react';\nimport configureStore from './store/configureStore';\nimport App from './App';\nimport { unregister } from './registerServiceWorker';\nimport ReactDOM from 'react-dom';\nimport { createBrowserHistory } from 'history';\nimport { Provider } from 'react-redux';\nimport { ConnectedRouter } from 'connected-react-router';\n\n// Create browser history to use in the Redux store\nconst baseUrl = document.getElementsByTagName('base')[0].getAttribute('href') as string;\nconst history = createBrowserHistory({ basename: baseUrl });\n\n// Get the application-wide store instance, prepopulating with state from the server where available.\nconst store = configureStore(history);\n\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root'),\n);\n\n// Remove any existing service workers.\nunregister();\n","import {datadogLogs, StatusType} from '@datadog/browser-logs'\n\ndatadogLogs.setLoggerGlobalContext({ service: 'pay-api' })\n\nexport function initializeDataDog({\n clientToken,\n site,\n environment, \n}: {\n clientToken: string;\n site: string;\n environment: string;\n}) {\n if (!clientToken || !environment) {\n return;\n }\n\n datadogLogs.init({\n clientToken: clientToken,\n env: environment,\n site: site,\n forwardErrorsToLogs: true,\n sampleRate: 100,\n service: 'pay-api',\n })\n}\n\nexport function addDataDogLog(\n message: string,\n messageContext: object,\n status: StatusType,\n) {\n datadogLogs.logger.log(message, messageContext, status)\n}","import * as Sentry from '@sentry/react';\nimport { Severity } from '@sentry/react';\n\nexport function initializeSentry({\n customerId,\n dsn,\n environment,\n}: {\n dsn: string;\n environment: string;\n customerId: string;\n}) {\n if (!dsn || !environment) {\n return;\n }\n\n Sentry.init({ dsn, environment });\n Sentry.setUser({ id: customerId });\n}\n\nexport function addSentryBreadcrumb(\n message: string,\n options: { level?: Severity; data?: { [key: string]: any } } = {},\n) {\n Sentry.addBreadcrumb({\n message,\n level: options.level || Sentry.Severity.Info,\n data: options.data,\n });\n}\n\nexport function captureSentryEvent(\n message: string,\n options: { level?: Severity; extra?: { [key: string]: any } } = {},\n) {\n Sentry.captureEvent({\n message,\n level: options.level || Sentry.Severity.Info,\n extra: options.extra,\n });\n}\n\nexport function captureSentryException(error: Error, options: { extra?: { [key: string]: any } } = {}) {\n Sentry.captureException(error, { extra: options.extra });\n}\n","export const AGGREGATOR_ERROR_CODES = {\n AGGREGATOR_SUPPORT_ERROR: \"aggregator_support_error\",\n INCOMPATIBLE_YODLEE_ACCOUNT: \"incompatible_yodlee_account\",\n AGGREGATOR_INTEGRATION_ERROR: \"aggregator_integration_error\",\n AGGREGATOR_RETRYABLE_ACTION: \"aggregator_retryable_action\",\n}","import {Reducer} from 'redux';\nimport {ApplicationAction} from '../actions';\nimport {ADD_PAYMENT_SOURCE_STEP, PaymentSourceState, UPDATE_PAYMENT_SOURCE_STEP} from '../types';\n\n// ----------------\n// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.\n\nconst unloadedState: PaymentSourceState = {\n paymentSource: null,\n addStep: ADD_PAYMENT_SOURCE_STEP.ONE,\n config: null,\n creditCardConfig: null,\n requesting: false,\n updateStep: UPDATE_PAYMENT_SOURCE_STEP.ONE,\n retryModel: null,\n};\n\nexport const paymentSource: Reducer = (\n state: PaymentSourceState = unloadedState,\n action: ApplicationAction,\n) => {\n switch (action.type) {\n case 'SET_ADD_PAYMENT_SOURCE_CONFIG':\n return {\n ...state,\n config: action.payload,\n };\n case 'SET_PAYMENT_SOURCE_REQUESTING':\n return {\n ...state,\n requesting: action.payload,\n };\n case 'SET_ADD_PAYMENT_SOURCE_STEP':\n return {\n ...state,\n addStep: action.payload,\n };\n case 'SET_UPDATE_PAYMENT_SOURCE_CONFIG':\n return {\n ...state,\n config: action.payload,\n };\n case 'SET_UPDATE_PAYMENT_SOURCE_STEP':\n return {\n ...state,\n updateStep: action.payload,\n };\n case 'SET_PAYMENT_SOURCE':\n return {\n ...state,\n paymentSource: action.payload,\n };\n case 'SET_ADD_CHARGE_CONFIG':\n return {\n ...state,\n paymentSource: action.payload.payment_source,\n };\n case 'SET_CARD_SOURCE_CONFIGURATION':\n return {\n ...state,\n creditCardConfig: action.payload,\n };\n case 'SET_RETRY_PAYMENT_SOURCE_LINK_MODEL':\n return {\n ...state,\n retryModel: action.payload,\n };\n default:\n return state;\n }\n};\n","import {Reducer} from 'redux';\nimport {DropinAction} from '../actions';\nimport {DropinState, QueryDataProcessed} from '../types';\nimport * as Sentry from '../../sentry';\nimport * as DataDog from '../../datadog';\nimport * as selectors from '../selectors';\n\n// ----------------\n// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.\n\nconst unloadedQuery = {\n authorizeOnly: false,\n customerToken: '',\n payLinkId: null,\n paymentSourceId: null,\n publishableKey: '',\n integrationId: '',\n skipPayScreen: false,\n skipSuccessScreen: false,\n charge: null,\n tip: null,\n isLogin: false,\n};\n\nconst unloadedState: DropinState = {\n tsep: null,\n customerToken: null,\n publishableKey: null,\n integrationId: null,\n merchant: null,\n sentry: null,\n customerId: null,\n query: unloadedQuery,\n ready: false,\n api_version: null,\n};\n\nexport const dropin: Reducer = (state: DropinState = unloadedState, action) => {\n switch (action.type) {\n case 'SET_CUSTOMER_TOKEN':\n return {\n ...state,\n customerToken: action.payload,\n };\n case 'SET_PUBLISHABLE_KEY':\n return {\n ...state,\n publishableKey: action.payload,\n };\n case 'SET_INTEGRATION_ID':\n return {\n ...state,\n integrationId: action.payload,\n }\n case 'SET_CONFIGURATION':\n DataDog.initializeDataDog({\n environment: action.payload.data_dog.environment,\n clientToken: action.payload.data_dog.client_token,\n site: action.payload.data_dog.site,\n });\n \n Sentry.initializeSentry({\n customerId: action.payload.customer_id,\n dsn: action.payload.sentry.dsn,\n environment: action.payload.sentry.environment,\n });\n return {\n ...state,\n merchant: action.payload.merchant,\n api_version: action.payload.api_version,\n customerId: action.payload.customer_id,\n sentry: action.payload.sentry,\n tsep: action.payload.tsep,\n };\n case 'SET_QUERY_DATA':\n return {\n ...state,\n query: {\n customerToken: action.payload.customerToken,\n publishableKey: action.payload.publishableKey,\n integrationId: action.payload.integrationId,\n authorizeOnly: action.payload.authorizeOnly?.toLowerCase() === 'true',\n skipPayScreen: action.payload.skipPayScreen?.toLowerCase() === 'true',\n skipSuccessScreen: action.payload.skipSuccessScreen?.toLowerCase() === 'true',\n payLinkId: action.payload.payLinkCode || null,\n paymentSourceId: action.payload.paymentSourceId || null,\n charge: action.payload.chargeAmount\n ? {\n amount: selectors.toNumber(action.payload.chargeAmount) || 0,\n paymentSourceId: action.payload.chargePaymentSourceId || null,\n externalId: action.payload.chargeExternalId || null,\n }\n : null,\n tip: action.payload.tipAmount\n ? {\n amount: selectors.toNumber(action.payload.tipAmount) || 0,\n paymentSourceId: action.payload.tipPaymentSourceId || null,\n beneficiaryName: action.payload.tipBeneficiaryName || null,\n chargeId: action.payload.tipChargeId || null,\n details: {\n displayMessage: action.payload.tipDetailsDisplayMessage || null,\n drawerId: action.payload.tipDetailsDrawerId || null,\n },\n }\n : null,\n isLogin: action.payload.isLogin?.toLowerCase() === 'true',\n } as QueryDataProcessed,\n };\n case 'SET_AS_READY':\n return {\n ...state,\n ready: true,\n };\n case 'SET_TSEP_MANIFEST':\n return {\n ...state,\n tsep: {\n script_path: state.tsep!.script_path,\n credit_card_api_url: state.tsep!.credit_card_api_url,\n manifest: action.payload.manifest,\n },\n };\n default:\n return state;\n }\n};\n","import { StrongholdPayError } from '@stronghold/pay-dropin';\nimport { Reducer } from 'redux';\nimport notifier from '../../dropin/notifier';\nimport { getDefaultError } from '../../dropin/utils';\nimport { ErrorAction } from '../actions/error';\nimport { ErrorState } from '../types/error';\n\n// ----------------\n// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.\n\nconst unloadedState: ErrorState = {\n error: null,\n message: null,\n show: false,\n};\n\nexport const error: Reducer = (state: ErrorState = unloadedState, action: ErrorAction) => {\n switch (action.type) {\n case 'SET_ERROR':\n if (action.notify !== false) {\n notifier.error(action.payload);\n }\n return {\n ...state,\n error: action.payload instanceof StrongholdPayError ? action.payload : getDefaultError(),\n };\n case 'RESET_ERROR':\n return {\n ...state,\n error: null,\n }\n case 'SHOW_ERROR':\n return {\n ...state,\n show: action.payload,\n };\n case 'SET_ERROR_MESSAGE':\n return {\n ...state,\n message: action.payload,\n };\n default:\n return state;\n }\n};\n","import { Reducer } from 'redux';\nimport { TransactionAction } from '../actions';\nimport { TransactionState } from '../types';\n\n// ----------------\n// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.\n\nconst unloadedState: TransactionState = {\n addChargeStep: null,\n addChargeConfig: null,\n addTipStep: null,\n addTipConfig: null,\n requesting: false,\n charge: null,\n tip: null,\n creditValue: null,\n processingFee: null,\n};\n\nexport const transaction: Reducer = (\n state: TransactionState = unloadedState,\n action: TransactionAction,\n) => {\n switch (action.type) {\n case 'SET_ADD_CHARGE_CONFIG':\n return {\n ...state,\n addChargeConfig: action.payload,\n };\n case 'SET_TRANSACTION_REQUESTING':\n return {\n ...state,\n requesting: action.payload,\n };\n case 'SET_ADD_CHARGE_STEP':\n return {\n ...state,\n addChargeStep: action.payload,\n };\n case 'SET_CHARGE':\n return {\n ...state,\n charge: action.payload,\n };\n case 'SET_ADD_TIP_STEP':\n return {\n ...state,\n addTipStep: action.payload,\n };\n case 'SET_TIP':\n return {\n ...state,\n tip: action.payload,\n };\n case 'SET_CREDIT_VALUE':\n return {\n ...state,\n creditValue: action.payload,\n };\n case 'SET_PROCESSING_FEE':\n return {\n ...state,\n processingFee: action.payload,\n };\n default:\n return state;\n }\n};\n","import { Reducer } from 'redux';\nimport { ApplicationAction } from '../actions';\nimport { AggregatorState } from '../types';\n\n// ----------------\n// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.\n\nconst unloadedState: AggregatorState = {\n finicityAccounts: [],\n};\n\nexport const aggregator: Reducer = (\n state: AggregatorState = unloadedState,\n action: ApplicationAction,\n) => {\n switch (action.type) {\n case 'SET_FINICITY_ACCOUNTS_ACTION':\n return {\n ...state,\n finicityAccounts: action.payload,\n };\n default:\n return state;\n }\n};\n","import { Reducer } from 'redux';\nimport { ApplicationAction } from '../actions';\nimport { CUSTOMER_LOGIN_STEP, CUSTOMER_PAGE, CUSTOMER_SIGNUP_STEP, CustomerState } from '../types';\n\n// ----------------\n// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.\n\nconst unloadedState: CustomerState = {\n page: CUSTOMER_PAGE.SIGNUP,\n signupStep: CUSTOMER_SIGNUP_STEP.ONE,\n loginStep: CUSTOMER_LOGIN_STEP.ONE,\n requesting: false,\n authenticationMethod: 'sms',\n token: null,\n signup: null,\n login: null,\n};\n\nexport const customer: Reducer = (\n state: CustomerState = unloadedState,\n action: ApplicationAction,\n) => {\n switch (action.type) {\n case 'SET_CUSTOMER_PAGE':\n return {\n ...state,\n page: action.payload,\n };\n case 'SET_CUSTOMER_SIGNUP_STEP':\n return {\n ...state,\n signupStep: action.payload,\n };\n case 'SET_CUSTOMER_LOGIN_STEP':\n return {\n ...state,\n loginStep: action.payload,\n };\n case 'SET_CUSTOMER_REQUESTING':\n return {\n ...state,\n requesting: action.payload,\n };\n case 'SET_AUTHENTICATION_METHOD':\n return {\n ...state,\n authenticationMethod: action.payload,\n };\n case 'SET_AUTHENTICATION_TOKEN':\n return {\n ...state,\n token: action.payload,\n };\n case 'SET_CUSTOMER_SIGNUP':\n return {\n ...state,\n signup: action.payload,\n };\n case 'SET_CUSTOMER_LOGIN':\n return {\n ...state,\n login: action.payload,\n };\n default:\n return state;\n }\n};\n","import * as reducers from './reducers';\nimport { History } from 'history';\nimport thunk from 'redux-thunk';\nimport { applyMiddleware, combineReducers, compose, createStore } from 'redux';\nimport { connectRouter, routerMiddleware } from 'connected-react-router';\nimport { PaymentSourceState, DropinState, ErrorState, TransactionState, AggregatorState, CustomerState } from './types';\n\n// The top-level state object\nexport interface ApplicationState {\n dropin: DropinState;\n error: ErrorState;\n paymentSource: PaymentSourceState;\n transaction: TransactionState;\n aggregator: AggregatorState;\n customer: CustomerState;\n}\n\n// This type can be used as a hint on action creators so that its 'dispatch' and 'getState' params are\n// correctly typed to match your store.\nexport interface AppThunkAction {\n (dispatch: (action: TAction) => void, getState: () => ApplicationState): void;\n}\n\nexport default function configureStore(history: History, initialState?: ApplicationState) {\n const middleware = [thunk, routerMiddleware(history)];\n\n const rootReducer = combineReducers({\n ...reducers,\n router: connectRouter(history),\n });\n\n const enhancers: any[] = [];\n const windowIfDefined = typeof window === 'undefined' ? null : (window as any); // eslint-disable-line @typescript-eslint/no-explicit-any\n if (windowIfDefined && windowIfDefined.__REDUX_DEVTOOLS_EXTENSION__) {\n enhancers.push(windowIfDefined.__REDUX_DEVTOOLS_EXTENSION__());\n }\n\n return createStore(rootReducer, initialState, compose(applyMiddleware(...middleware), ...enhancers));\n}\n","export * from './actionCreators';\nexport * from './types';\nexport * from './configureStore';\n"],"sourceRoot":""}