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,+CAA+C2L,GAC/D5T,EAAAA,cAAA,QAAMiI,UAAU,gDAAgDoB,GAChErJ,EAAAA,cAAA,KAAGiI,UAAU,uCAAuCiM,QAAS9K,EAAiBkJ,KAAK,UAC9EuB,SAITzO,EAiBAmF,aAdiBvK,EAAAA,cAAA,OAAKiI,UAAU,gDAenC,sDC7OE,MAAMyB,EAAoCwJ,IAC7C,MAAM,UAAExP,EAAS,OAAEmF,EAAM,cAAEQ,GAAkB6J,GAEvC,sBAAEC,EAAqB,wBAAE+B,EAAuB,mCAAEtB,EAAkC,qBAAEP,GAAyB3P,EAE/G0G,EACFpK,EAAAA,cAAA,SAAO+T,GAAG,sCAAsC9L,UAAU,6CACrDiN,GASHrT,EAAgB7B,EAAAA,cAAA,SAAO+T,GAAG,wCAAwClL,GAElEsM,EACFnV,EAAAA,cAAA,SACIsU,KAAK,OACLrM,UAAU,0DACV0K,MAAO9J,EAAM,aACDwK,EACZc,UAAU,IAqBlB,MAAO,CACHhK,UAnCc,CACdlC,UAAW,6CACX+L,IAAK,QAkCL5J,QACAvI,gBACAwI,iBApBArK,EAAAA,cAACiU,EAAAA,OAAM,CAAChM,UAAU,wCAAwCkM,UAAQ,GAC7DhB,GAoBL7I,YAhBgBjB,EAChBrJ,EAAAA,cAAA,OAAKiI,UAAU,8CACXjI,EAAAA,cAAA,QAAMiI,UAAU,+CAA+C2L,GAC/D5T,EAAAA,cAAA,QAAMiI,UAAU,gDAAgDoB,SAGpEjE,EAWAmF,aARiBvK,EAAAA,cAAA,OAAKiI,UAAU,gDAShCkN,qBACH","sources":["webpack://Citta2.0/./src/modules/checkout-customer-account-payment/checkout-customer-account-payment.tsx?de67","webpack://Citta2.0/./src/modules/checkout-customer-account-payment/checkout-customer-account-payment.view.tsx?79c6","webpack://Citta2.0/./src/checkout-errors/checkout-errors.ts?a9e0","webpack://Citta2.0/./src/common/error.tsx?096f","webpack://Citta2.0/./src/modules/checkout-customer-account-payment/components/get-account-payment-form-edit-mode.tsx?83e6","webpack://Citta2.0/./src/modules/checkout-customer-account-payment/components/get-account-payment-form-summary-mode.tsx?5675"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { CustomerBalances } from '@msdyn365-commerce/retail-proxy';\nimport { IModuleStateManager, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport { action, computed, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentData } from './checkout-customer-account-payment.data';\nimport { ICheckoutCustomerAccountPaymentProps } from './checkout-customer-account-payment.props.autogenerated';\nimport { getAccountPaymentFormEditMode, IAccountPaymentEditViewForm } from './components/get-account-payment-form-edit-mode';\nimport { getAccountPaymentFormSummaryMode, IAccountPaymentSummaryViewForm } from './components/get-account-payment-form-summary-mode';\nimport { ErrorComponent } from '../../common/error';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutCustomerAccountPaymentViewProps\n extends ICheckoutCustomerAccountPaymentProps {\n checkoutCustomerAccount: IModuleProps;\n summaryView: IAccountPaymentSummaryViewForm;\n editView: IAccountPaymentEditViewForm;\n moduleState: IModuleStateManager;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\nexport interface ICheckoutCustomerAccountPaymentState {\n paymentAmount: number;\n isCreditSectionExpanded: boolean;\n customizedAmt: string;\n amountVariable: string;\n errorMessage?: string;\n handleSaveAndContinue?: boolean;\n}\n\n/**\n *\n * CheckoutCustomerAccount component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nexport class CheckoutCustomerAccountPayment extends React.Component<\n ICheckoutCustomerAccountPaymentViewProps,\n ICheckoutCustomerAccountPaymentState\n> {\n private readonly defaultLocale: string = 'en-us';\n @computed get isCustomerAccountPaymentEnabled(): boolean {\n const customerInfo = get(this.props, 'data.customerInformation.result');\n const request = get(this.props, 'context.request');\n const b2bChannel = isChannelTypeB2B(request);\n const platform = get(this.props, 'context.request.app.platform');\n\n return (\n customerInfo &&\n customerInfo.AllowOnAccountPayment === true &&\n platform &&\n (platform.enableCustomerAccountPayment === 'all' ||\n (platform.enableCustomerAccountPayment === 'b2b' && b2bChannel) ||\n (platform.enableCustomerAccountPayment === 'b2c' && !b2bChannel))\n );\n }\n\n @computed get getLoyaltyAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n if (!checkoutState || !checkoutState.loyaltyAmount) {\n return 0;\n }\n return checkoutState.loyaltyAmount;\n }\n\n @computed get maxPaymentAmount(): number {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n if (!cart) {\n return 0;\n }\n\n // Use customer account after loyalty.\n const amountDue = Math.max(0, (cart.TotalAmount || 0) - this.getLoyaltyAmount);\n\n // If the user has a mandatory credit limit, then the max amount must not be more than that\n if (this.props.data.customerInformation?.result?.MandatoryCreditLimit) {\n return Math.min(this.getAvailableCredit(this.props.data.creditBalances?.result), amountDue);\n }\n return amountDue;\n }\n\n @computed get errorMessage(): string | undefined {\n if (this.state.paymentAmount > this.maxPaymentAmount) {\n return this.props.resources.invalidAmountExceedAmountDueMessage;\n }\n\n if (this.state.paymentAmount < 0) {\n return this.props.resources.invalidAmountNegativeMessage;\n }\n\n return undefined;\n }\n\n @computed get currencyCode(): string | undefined {\n return get(this.props, 'context.request.channel.Currency');\n }\n\n @computed get availableCredit(): number {\n const creditBalances = get(this.props, 'data.creditBalances.result');\n\n return creditBalances ? this.getAvailableCredit(creditBalances) : 0;\n }\n\n @computed get orderTotal(): number {\n const orderTotal = get(this.props, 'data.checkout.result.checkoutCart.cart.TotalAmount');\n\n return orderTotal ? orderTotal : 0;\n }\n\n @computed get formattedExcessCredit(): string | undefined {\n const excessCredit = this.availableCredit - this.orderTotal;\n return excessCredit < 0 ? this.props.context.cultureFormatter.formatCurrency(excessCredit, this.currencyCode) : undefined;\n }\n\n @computed get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n private readonly baseClassName: string = 'ms-checkout-customer-account';\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public constructor(props: ICheckoutCustomerAccountPaymentViewProps) {\n super(props);\n const locale = get(this.props, 'context.request.locale') || this.defaultLocale;\n this.state = {\n paymentAmount: this.maxPaymentAmount,\n isCreditSectionExpanded: false,\n customizedAmt: new Intl.NumberFormat(locale).format(this.maxPaymentAmount),\n amountVariable: this.maxPaymentAmount.toString(),\n handleSaveAndContinue: false\n };\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n // When the cart.TotalAmount gets updated (like if selecting the delivery option adds a charge) we need to update the amount based on the new total amount.\n reaction(\n () =>\n this.props.data.checkout.result &&\n this.props.data.checkout.result.checkoutCart.cart &&\n this.props.data.checkout.result.checkoutCart.cart.TotalAmount,\n totalAmount => {\n this.updateMaxAmount(this.maxPaymentAmount);\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutCustomerAccountPayment &&\n checkoutError.errorMessage\n ) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutCustomerAccountPayment) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(\n nextProps: ICheckoutCustomerAccountPaymentProps,\n nextState: ICheckoutCustomerAccountPaymentState\n ): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const customerInfo = this.props.data.customerInformation?.result;\n\n if (!this.isCustomerAccountPaymentEnabled) {\n this.props.context.telemetry.information(\n 'customer account payments will not display, because the feature is disabled or not enabled for this type of customer'\n );\n return null;\n }\n\n const checkoutState = this.props.data.checkout.result;\n const cart = checkoutState ? checkoutState.checkoutCart.cart : undefined;\n const hasInvoiceLine = checkoutState?.checkoutCart.hasInvoiceLine;\n const creditBalances = this.props.data.creditBalances.result;\n\n if (!cart || hasInvoiceLine) {\n return null;\n }\n const resources = this.props.resources;\n const locale = get(this.props, 'context.request.locale') || this.defaultLocale;\n\n const customerSinceDate = new Date(customerInfo?.CreatedDateTime || 0).toLocaleDateString(locale);\n\n const hasError = this.props.moduleState.hasError;\n const errorMessage = this.state.errorMessage;\n\n const props = {\n ...this.props,\n checkoutErrorRef: this.checkoutErrorRef,\n checkoutCustomerAccount: {\n moduleProps: this.props,\n className: classnames(this.baseClassName)\n },\n alert: hasError && errorMessage && (\n \n ),\n editView: getAccountPaymentFormEditMode({\n onAddPayment: this.addPayment,\n resources,\n customizedAmt: this.state.customizedAmt,\n amountVariable: this.state.amountVariable,\n amount: this.state.paymentAmount,\n onChangePaymentAmount: this.onChangePaymentAmount,\n maxAmount: this.maxPaymentAmount,\n customer: customerInfo,\n customerCreatedDate: customerSinceDate,\n availableCredit: this.props.context.cultureFormatter.formatCurrency(\n this.getAvailableCredit(creditBalances),\n this.currencyCode\n ),\n showCreditLimit: customerInfo?.MandatoryCreditLimit || false,\n errorMessage: this.errorMessage,\n onToggleCreditSection: this.toggleCreditSection,\n creditSectionIsExpanded: this.state.isCreditSectionExpanded,\n orderTotal: this.props.context.cultureFormatter.formatCurrency(this.orderTotal, this.currencyCode),\n excessCredit: this.formattedExcessCredit,\n onRemovePayment: this.removePayment,\n appliedAmount:\n checkoutState && checkoutState.customerAccountAmount > 0\n ? this.props.context.cultureFormatter.formatCurrency(checkoutState.customerAccountAmount, this.currencyCode)\n : undefined,\n locale:\n this.props.context && this.props.context.request && this.props.context.request.locale\n ? this.props.context.request.locale\n : this.defaultLocale,\n skipOnChangeLogic: this.props.context.request.features?.skipCheckoutOnChangeLogic\n }),\n summaryView: getAccountPaymentFormSummaryMode({\n resources,\n amount: this.state.paymentAmount,\n appliedAmount:\n checkoutState && checkoutState.customerAccountAmount > 0\n ? this.props.context.cultureFormatter.formatCurrency(checkoutState.customerAccountAmount, this.currencyCode)\n : undefined\n })\n };\n\n return this.props.renderView(props) as React.ReactElement;\n }\n\n private readonly getAvailableCredit = (creditBalances: CustomerBalances | undefined) => {\n let availableCredit = 0;\n\n if (!creditBalances) {\n return 0;\n }\n\n if (creditBalances.InvoiceAccountCreditLimit === 0) {\n availableCredit = creditBalances.CreditLimit - creditBalances.Balance - creditBalances.PendingBalance;\n } else {\n availableCredit =\n creditBalances.InvoiceAccountCreditLimit -\n creditBalances.InvoiceAccountBalance -\n creditBalances.InvoiceAccountPendingBalance;\n }\n\n return availableCredit;\n };\n\n private readonly addPayment = async (): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n this.props.context.telemetry.error('checkout state not found');\n return;\n }\n\n this.setState({ handleSaveAndContinue: true });\n this._clearError();\n await checkoutState.updateCustomerAccountAmount({ newAmount: this.state.paymentAmount });\n this.props.context.telemetry.information('customer account payment amount updated');\n };\n\n private readonly toggleCreditSection = (): void => {\n this.setState({\n isCreditSectionExpanded: !this.state.isCreditSectionExpanded\n });\n };\n\n private readonly init = async (): Promise => {\n this.props.moduleState.init({\n onCancel: this.handleCancelOrSubmit,\n onSubmit: this.handleCancelOrSubmit,\n onEdit: this.onEdit\n });\n\n if (this.props.data.checkout.result && this.props.data.checkout.result.customerAccountAmount !== 0) {\n this.props.moduleState.onReady();\n }\n };\n\n private readonly onChangePaymentAmount = (customizedAmt: string, paymentAmount: number, amountVariable: string): void => {\n this.setState({\n customizedAmt: customizedAmt,\n paymentAmount: paymentAmount,\n amountVariable: amountVariable\n });\n };\n\n private readonly updateMaxAmount = (newAmount: number): void => {\n // If the user has already set an amount, we should not override that in the UI because it will be confusing.\n if (this.props.data.checkout.result && this.props.data.checkout.result.customerAccountAmount === 0) {\n this.setState({\n // We should never allow a negative amount.\n paymentAmount: Math.max(0, newAmount),\n customizedAmt: Math.max(0, newAmount).toString()\n });\n }\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Payment section customer account payment onEdit is called.');\n\n this.props.moduleState.onUpdating();\n };\n\n private readonly handleCancelOrSubmit = () => {\n const checkoutState = this.props.data.checkout.result;\n if (checkoutState && checkoutState.customerAccountAmount > 0) {\n this.setState({ handleSaveAndContinue: false });\n this.props.telemetry.information('Payment section customer account payment onSubmit is called.');\n\n if (\n Msdyn365.isOboRequest(this.props.context.request) &&\n checkoutState?.customerAccountAmount !== checkoutState?.checkoutCart.cart.TotalAmount\n ) {\n this._setErrorMessage(this.props.resources.invalidAmountForOBOMessage);\n } else {\n this.props.moduleState.onReady();\n }\n } else if (\n checkoutState?.customerAccountAmount === 0 &&\n !this.state.handleSaveAndContinue &&\n this.props.config.isCheckoutCustomerAccountPaymentRequired\n ) {\n this._setErrorMessage(this.props.resources.customerAccountCreditErrorMessage);\n } else {\n this.props.telemetry.information('Payment section customer account payment onCancel is called.');\n\n // Skip the module\n this.props.moduleState.onSkip();\n }\n };\n\n private readonly removePayment = async (): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n this.props.context.telemetry.error('checkout state not found');\n return;\n }\n\n this.setState({\n paymentAmount: 0\n });\n\n this.onChangePaymentAmount('', NaN, '0');\n\n this._clearError();\n await checkoutState.updateCustomerAccountAmount({ newAmount: 0 });\n this.props.context.telemetry.information('customer account payment removed');\n };\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n private readonly _clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.setState({\n errorMessage: ''\n });\n };\n}\n\nexport default CheckoutCustomerAccountPayment;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentViewProps, IAccountPaymentEditViewForm, IAccountPaymentSummaryViewForm } from './index';\n\nexport const SummaryForm: React.FC = ({\n formProps,\n label,\n paymentAmount,\n addPaymentButton,\n appliedLine,\n bottomBorder\n}) => (\n \n <>\n {label}\n {paymentAmount}\n {addPaymentButton}\n {appliedLine}\n {bottomBorder}\n \n \n);\n\nexport const EditForm: React.FC = ({\n formProps,\n inputLabel,\n inputAmount,\n addPaymentButton,\n customerName,\n customerAccountNumber,\n customerSince,\n accountCredit,\n alert,\n accountDetails,\n appliedLine,\n bottomBorder\n}) => (\n \n <>\n {customerName}\n {customerAccountNumber}\n {customerSince}\n {accountCredit}\n {accountDetails}\n {inputLabel}\n {alert}\n {inputAmount}\n {addPaymentButton}\n {appliedLine}\n {bottomBorder}\n \n \n);\n\nconst CheckoutCustomerAccountView: React.FC = props => {\n const { checkoutCustomerAccount, checkoutErrorRef, summaryView, editView, moduleState, alert } = props;\n return (\n \n {alert}\n {moduleState.isReady && summaryView && }\n {!moduleState.isReady && editView && }\n \n );\n};\n\nexport default CheckoutCustomerAccountView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport {\n CheckoutModule,\n ErrorCode,\n ErrorLocation,\n ErrorMessageResource,\n getCheckoutState,\n ICheckoutError,\n ICheckoutState\n} from '@msdyn365-commerce/global-state/';\n\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class -- create global class\nexport class CheckoutErrors {\n public static readonly ActionError: ICheckoutError = {\n errorCode: ErrorCode.ActionError,\n errorMessageResource: ErrorMessageResource.checkoutTimeoutErrorMessage,\n errorLocation: ErrorLocation.Checkout\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard,\n errorMessageResource: ErrorMessageResource.blockedLoyaltyCardErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue,\n errorMessageResource: ErrorMessageResource.customerAccountLimitSignDifferentFromAmountDueErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsAvailableCreditLimitErrorMessage,\n errorLocation: ErrorLocation.Checkout\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsCustomerAccountFloorLimitErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItemsErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentForCustomerWithoutAllowOnAccountErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentNotAllowedForOpenInvoicesErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_FraudRisk: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_FraudRisk,\n errorMessageResource: ErrorMessageResource.fraudRiskErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed,\n errorMessageResource: ErrorMessageResource.giftCardBalanceInquiryFailedErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch,\n errorMessageResource: ErrorMessageResource.giftCardCurrencyMismatchErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion,\n errorMessageResource: ErrorMessageResource.invalidCartVersionErrorMessage,\n errorLocation: ErrorLocation.Checkout\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber,\n errorMessageResource: ErrorMessageResource.invalidLoyaltyCardNumberErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n errorMessageResource: ErrorMessageResource.invalidPaymentRequestErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n errorMessageResource: ErrorMessageResource.invalidPaymentRequestConsoleErrorMessage,\n errorLocation: ErrorLocation.Console\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines,\n errorMessageResource: ErrorMessageResource.missingRequiredCartTenderLinesErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed,\n errorMessageResource: ErrorMessageResource.multipleCustomerAccountPaymentsNotAllowedErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender,\n errorMessageResource: ErrorMessageResource.noMoreThanOneLoyaltyTenderErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry,\n errorMessageResource: ErrorMessageResource.noResponseFromGatewayForGiftCardBalanceInquiryErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard,\n errorMessageResource: ErrorMessageResource.noTenderLoyaltyCardErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints,\n errorMessageResource: ErrorMessageResource.notEnoughRewardPointsErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided,\n errorMessageResource: ErrorMessageResource.paymentAlreadyVoidedErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance,\n errorMessageResource: ErrorMessageResource.paymentAmountExceedsGiftBalanceErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n errorMessageResource: ErrorMessageResource.paymentRequiresMerchantPropertiesErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n errorMessageResource: ErrorMessageResource.paymentRequiresMerchantPropertiesConsoleErrorMessage,\n errorLocation: ErrorLocation.Console\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount,\n errorMessageResource: ErrorMessageResource.paymentUsingUnauthorizedAccountErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed,\n errorMessageResource: ErrorMessageResource.refundAmountMoreThanAllowedErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment,\n errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired,\n errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentCardAdditionalContextRequiredErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported,\n errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentCardTypeMissingOrNotSupportedErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment,\n errorMessageResource: ErrorMessageResource.unableToCancelPaymentErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo,\n errorMessageResource: ErrorMessageResource.unableToReadCardTokenInfoErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult,\n errorMessageResource: ErrorMessageResource.unableToRetrieveCardPaymentAcceptResultErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly checkoutErrorsList: ICheckoutError[] = [\n CheckoutErrors.ActionError,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_FraudRisk,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult\n ];\n}\n\nexport async function setCheckoutErrors(\n errorCode: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n resources: any,\n isExpressCheckoutApplied: boolean,\n ctx: IActionContext,\n apiError?: string | undefined\n): Promise {\n let clientCheckoutError: ICheckoutError | undefined;\n const consoleCheckoutErrors: ICheckoutError[] = [];\n\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n // find the checkout errors\n for (const checkoutError of CheckoutErrors.checkoutErrorsList) {\n if (errorCode === checkoutError.errorCode) {\n if (checkoutError.errorLocation === ErrorLocation.Console) {\n const consoleCheckoutError: ICheckoutError = {\n errorCode: checkoutError.errorCode,\n errorMessageResource: checkoutError.errorMessageResource,\n errorLocation: checkoutError.errorLocation\n };\n consoleCheckoutErrors.push(consoleCheckoutError);\n } else {\n if (clientCheckoutError) {\n ctx.telemetry.exception(new Error('Invalid number of client checkout errors.'));\n throw new Error('Invalid number of client checkout errors.');\n } else {\n clientCheckoutError = {\n errorCode: checkoutError.errorCode,\n errorMessageResource: checkoutError.errorMessageResource,\n errorLocation: checkoutError.errorLocation\n };\n }\n }\n }\n }\n\n // log the console checkout errors\n for (const consoleCheckoutError of consoleCheckoutErrors) {\n consoleCheckoutError.errorMessage = getCheckoutErrorMessage(resources, consoleCheckoutError.errorMessageResource!, apiError!);\n console.log(consoleCheckoutError.errorMessage);\n }\n\n // handle the client checkout error\n if (clientCheckoutError) {\n clientCheckoutError.errorMessage = getCheckoutErrorMessage(resources, clientCheckoutError.errorMessageResource!, apiError!);\n\n if (isExpressCheckoutApplied && clientCheckoutError.errorLocation === ErrorLocation.CheckoutPaymentInstrument) {\n clientCheckoutError.errorLocation = ErrorLocation.Checkout;\n }\n\n await checkoutState.updateCheckoutError({ newCheckoutError: clientCheckoutError });\n await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: true });\n } else {\n // if could not map to any checkout error(s), show the API error message over generic error\n if (consoleCheckoutErrors.length === 0) {\n const genericError = {\n errorLocation: ErrorLocation.Checkout\n };\n if (apiError) {\n genericError['errorMessage'] = apiError;\n } else {\n genericError['errorMessage'] = resources.genericErrorMessage;\n }\n\n await checkoutState.updateCheckoutError({ newCheckoutError: genericError });\n await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: true });\n }\n }\n}\n\nexport async function focusOnCheckoutError(checkoutErrorRef: React.RefObject, ctx: IActionContext): Promise {\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n checkoutErrorRef.current && checkoutErrorRef.current.scrollIntoView();\n\n await checkoutState.updateCheckoutErrorFocus({ newCheckoutErrorFocus: CheckoutModule.None });\n await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: false });\n}\n\nexport async function setCheckoutErrorFocus(checkoutModuleId: string, ctx: IActionContext): Promise {\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n for (const checkoutModule of Object.keys(CheckoutModule)) {\n if (checkoutModuleId.includes(CheckoutModule[checkoutModule])) {\n await checkoutState.updateCheckoutErrorFocus({ newCheckoutErrorFocus: CheckoutModule[checkoutModule] });\n return;\n }\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getCheckoutErrorMessage(resources: any, errorMessageResource: ErrorMessageResource, errorMessageFromAPI: string): string {\n const errorResource = Object.keys(resources).find(resource => resource === errorMessageResource);\n // return API error when error resource string is not found in checkout definition file\n return errorResource !== undefined ? resources[errorResource] : errorMessageFromAPI;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n/**\n * The payment error.\n */\nexport interface IPaymentError {\n title: string;\n message: string;\n className?: string;\n}\n\n/**\n * The payment error.\n * @param param0 - First param.\n * @param param0.title - Title.\n * @param param0.message - Message.\n * @param param0.className - ClassName.\n * @returns React node.\n */\nexport const ErrorComponent: React.FC = ({ title, message, className = 'ms-checkout-payment-instrument' }) => (\n
\n

{title}

\n

{message}

\n
\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { Alert, Button, INodeProps, NodeTag, getLocaleBasedCustomizedPrice, ILocalizedPrice } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentResources } from '../checkout-customer-account-payment.props.autogenerated';\n\nexport interface IGetAccountPaymentEditViewFormInput {\n resources: ICheckoutCustomerAccountPaymentResources;\n customizedAmt: string;\n amount: number;\n amountVariable: string;\n maxAmount: number;\n customer: Customer | undefined;\n customerCreatedDate: string;\n availableCredit: string;\n showCreditLimit: boolean;\n errorMessage: string | undefined;\n creditSectionIsExpanded: boolean;\n orderTotal: string;\n excessCredit: string | undefined;\n appliedAmount: string | undefined;\n locale: string;\n onAddPayment(): Promise;\n onChangePaymentAmount(customizedAmt: string, paymentAmount: number, amountVariable: string): void;\n onToggleCreditSection(): void;\n onRemovePayment(): Promise;\n skipOnChangeLogic?: boolean;\n}\n\nexport interface IAccountPaymentEditViewForm {\n formProps: INodeProps;\n inputLabel: React.ReactNode;\n inputAmount: React.ReactNode;\n addPaymentButton: React.ReactNode;\n customerName: React.ReactNode;\n customerAccountNumber: React.ReactNode;\n customerSince: React.ReactNode;\n accountCredit: React.ReactNode;\n alert: React.ReactNode;\n accountDetails: React.ReactNode;\n appliedLine: React.ReactNode;\n bottomBorder: React.ReactNode;\n}\n\n/**\n * On Add Account Payment Function.\n * @param onAddPayment -On Add Payment Function.\n * @returns Call of Add payment function.\n */\nconst onAddAccountPayment = (onAddPayment: () => Promise) => async (event: React.SyntheticEvent): Promise => {\n event.preventDefault();\n await onAddPayment();\n};\n\n/**\n * On Change Amount Function.\n * @param onChangePaymentAmount -On Change Payment Amount Function.\n * @returns Call of Change payment Amount function.\n */\nconst onChangeAmountHandler = (\n customizedAmt: string,\n paymentAmount: number,\n amountVariable: string,\n locale: string,\n onChangePaymentAmount: (customizedAmt: string, paymentAmount: number, amountVariable: string) => void\n) => (event: React.ChangeEvent) => {\n const value = event.target.value;\n const customState: ILocalizedPrice = {\n customizedAmount: customizedAmt,\n amountVariable: amountVariable,\n paymentAmount: paymentAmount\n };\n const returnModifiedState = getLocaleBasedCustomizedPrice(value, customState, locale, keyCode);\n customizedAmt = returnModifiedState.customizedAmount as string;\n paymentAmount = returnModifiedState.paymentAmount as number;\n amountVariable = returnModifiedState.amountVariable as string;\n onChangePaymentAmount(customizedAmt, paymentAmount, amountVariable);\n keyCode = 0;\n};\n\nlet keyCode: number = 0;\nexport const getAccountPaymentFormEditMode = (options: IGetAccountPaymentEditViewFormInput): IAccountPaymentEditViewForm => {\n const {\n resources,\n onAddPayment,\n amount,\n customizedAmt,\n amountVariable,\n onChangePaymentAmount,\n maxAmount,\n customer,\n customerCreatedDate,\n availableCredit,\n showCreditLimit,\n errorMessage,\n onToggleCreditSection,\n creditSectionIsExpanded,\n orderTotal,\n excessCredit,\n onRemovePayment,\n appliedAmount,\n locale,\n skipOnChangeLogic\n } = options;\n\n const {\n addPaymentButtonLabel,\n inputAmountLabel,\n inputAmountAriaLabel,\n customerSinceLabel,\n accountCreditLabel,\n creditDetailsSectionLabel,\n orderTotalLabel,\n availableCreditLabel,\n creditExcessLabel,\n appliedCustomerAccountPaymentLabel,\n removeCustomerAccountPaymentLabel,\n accountCreditDetails\n } = resources;\n\n const inputLabel = (\n \n {inputAmountLabel}\n \n );\n\n const formProps = {\n className: 'ms-checkout-customer-account__form-edit',\n onSubmit: onAddAccountPayment(onAddPayment),\n tag: 'form' as NodeTag\n };\n\n const addPaymentButton = (\n maxAmount || amount < 0 || Number.isNaN(amount)}\n >\n {addPaymentButtonLabel}\n \n );\n\n const inputAmount = (\n onChangePaymentAmount(value, Number(value), value)\n : onChangeAmountHandler(customizedAmt, amount, amountVariable, locale, onChangePaymentAmount)\n }\n onKeyDown={event => (keyCode = event.which)}\n aria-label={inputAmountAriaLabel}\n aria-valuemin={0}\n aria-valuemax={maxAmount}\n aria-valuenow={amount}\n min={0}\n max={maxAmount}\n />\n );\n\n const customerName =
{customer?.Name}
;\n\n const customerAccountNumber =
#{customer?.AccountNumber}
;\n\n const customerSince = (\n
\n {customerSinceLabel}\n {customerCreatedDate}\n
\n );\n\n const accountCredit = (\n <>\n {accountCreditLabel}\n {showCreditLimit && {availableCredit}}\n \n \n );\n\n const accountDetails = creditSectionIsExpanded ? (\n
\n <>\n
\n \n \n {creditDetailsSectionLabel}\n \n
\n \n
\n {availableCreditLabel}\n {availableCredit}\n
\n
\n {orderTotalLabel}\n {orderTotal}\n
\n
\n {creditExcessLabel}\n {excessCredit ?? '0'}\n
\n
\n ) : (\n undefined\n );\n\n const alert = (\n \n {errorMessage}\n \n );\n\n const appliedLine = appliedAmount ? (\n
\n {appliedCustomerAccountPaymentLabel}\n {appliedAmount}\n \n {removeCustomerAccountPaymentLabel}\n \n
\n ) : (\n undefined\n );\n\n const bottomBorder =
;\n\n return {\n formProps,\n inputLabel,\n inputAmount,\n addPaymentButton,\n customerName,\n customerAccountNumber,\n customerSince,\n accountCredit,\n alert,\n accountDetails,\n appliedLine,\n bottomBorder\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentResources } from '../checkout-customer-account-payment.props.autogenerated';\n\nexport interface IGetAccountPaymentSummaryViewFormInput {\n resources: ICheckoutCustomerAccountPaymentResources;\n amount: number;\n appliedAmount: string | undefined;\n}\n\nexport interface IAccountPaymentSummaryViewForm {\n formProps: INodeProps;\n label: React.ReactNode;\n paymentAmount: React.ReactNode;\n addPaymentButton: React.ReactNode;\n appliedLine: React.ReactNode;\n bottomBorder: React.ReactNode;\n alert?: React.ReactNode;\n paymentAmountInput?: React.ReactNode;\n}\n\nexport const getAccountPaymentFormSummaryMode = (options: IGetAccountPaymentSummaryViewFormInput): IAccountPaymentSummaryViewForm => {\n const { resources, amount, appliedAmount } = options;\n\n const { addPaymentButtonLabel, inputAmountSummaryLabel, appliedCustomerAccountPaymentLabel, inputAmountAriaLabel } = resources;\n\n const label = (\n \n );\n\n const formProps = {\n className: 'ms-checkout-customer-account__form-summary',\n tag: 'form' as NodeTag\n };\n\n const paymentAmount = ;\n\n const paymentAmountInput = (\n \n );\n\n const addPaymentButton = (\n \n );\n\n const appliedLine = appliedAmount ? (\n
\n {appliedCustomerAccountPaymentLabel}\n {appliedAmount}\n
\n ) : (\n undefined\n );\n\n const bottomBorder =
;\n\n return {\n formProps,\n label,\n paymentAmount,\n addPaymentButton,\n appliedLine,\n bottomBorder,\n paymentAmountInput\n };\n};\n"],"names":["CheckoutCustomerAccountPayment","React","constructor","props","super","defaultLocale","baseClassName","checkoutErrorRef","getAvailableCredit","creditBalances","availableCredit","InvoiceAccountCreditLimit","CreditLimit","Balance","PendingBalance","InvoiceAccountBalance","InvoiceAccountPendingBalance","addPayment","async","checkoutState","this","data","checkout","result","setState","handleSaveAndContinue","_clearError","updateCustomerAccountAmount","newAmount","state","paymentAmount","context","telemetry","information","error","toggleCreditSection","isCreditSectionExpanded","init","moduleState","onCancel","handleCancelOrSubmit","onSubmit","onEdit","customerAccountAmount","onReady","onChangePaymentAmount","customizedAmt","amountVariable","updateMaxAmount","Math","max","toString","onUpdating","Msdyn365","request","checkoutCart","cart","TotalAmount","_setErrorMessage","resources","invalidAmountForOBOMessage","config","isCheckoutCustomerAccountPaymentRequired","customerAccountCreditErrorMessage","onSkip","removePayment","NaN","errorMessage","setHasError","locale","get","maxPaymentAmount","Intl","NumberFormat","format","isCustomerAccountPaymentEnabled","customerInfo","b2bChannel","isChannelTypeB2B","platform","AllowOnAccountPayment","enableCustomerAccountPayment","getLoyaltyAmount","loyaltyAmount","_this$props$data$cust","undefined","amountDue","_this$props$data$cred","customerInformation","MandatoryCreditLimit","min","invalidAmountExceedAmountDueMessage","invalidAmountNegativeMessage","currencyCode","orderTotal","formattedExcessCredit","excessCredit","cultureFormatter","formatCurrency","isDataReady","status","_this$props$data$chec","when","reaction","totalAmount","shouldEnableCheckoutErrorDisplayMessaging","_this$props$data$chec2","checkoutError","errorLocation","ErrorLocation","_this$props$data$chec3","checkoutErrorFocus","CheckoutModule","focusOnCheckoutError","actionContext","shouldComponentUpdate","nextProps","nextState","render","_this$props$data$cust2","_this$props$context$r","hasInvoiceLine","customerSinceDate","Date","CreatedDateTime","toLocaleDateString","hasError","_objectSpread","checkoutCustomerAccount","moduleProps","className","classnames","alert","ErrorComponent","Object","assign","title","errorMessageTitle","message","editView","getAccountPaymentFormEditMode","onAddPayment","amount","maxAmount","customer","customerCreatedDate","showCreditLimit","onToggleCreditSection","creditSectionIsExpanded","onRemovePayment","appliedAmount","skipOnChangeLogic","features","skipCheckoutOnChangeLogic","summaryView","getAccountPaymentFormSummaryMode","renderView","__decorate","computed","action","withModuleState","observer","SummaryForm","_ref","formProps","label","addPaymentButton","appliedLine","bottomBorder","Node","EditForm","_ref2","inputLabel","inputAmount","customerName","customerAccountNumber","customerSince","accountCredit","accountDetails","Module","ref","isReady","CheckoutErrors","setCheckoutErrors","errorCode","isExpressCheckoutApplied","ctx","apiError","clientCheckoutError","consoleCheckoutErrors","getCheckoutState","catch","exception","checkoutErrorsList","Console","consoleCheckoutError","errorMessageResource","push","Error","getCheckoutErrorMessage","console","log","CheckoutPaymentInstrument","Checkout","updateCheckoutError","newCheckoutError","updateShouldFocusOnCheckoutError","newShouldFocusOnCheckoutError","length","genericError","genericErrorMessage","current","scrollIntoView","updateCheckoutErrorFocus","newCheckoutErrorFocus","None","setCheckoutErrorFocus","checkoutModuleId","checkoutModule","keys","includes","errorMessageFromAPI","errorResource","find","resource","ActionError","ErrorCode","ErrorMessageResource","checkoutTimeoutErrorMessage","Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard","blockedLoyaltyCardErrorMessage","CheckoutLoyalty","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue","customerAccountLimitSignDifferentFromAmountDueErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit","customerAccountPaymentExceedsAvailableCreditLimitErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit","customerAccountPaymentExceedsCustomerAccountFloorLimitErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems","customerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItemsErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount","customerAccountPaymentForCustomerWithoutAllowOnAccountErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices","customerAccountPaymentNotAllowedForOpenInvoicesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_FraudRisk","fraudRiskErrorMessage","Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed","giftCardBalanceInquiryFailedErrorMessage","CheckoutGiftCard","Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch","giftCardCurrencyMismatchErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion","invalidCartVersionErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber","invalidLoyaltyCardNumberErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest","invalidPaymentRequestErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console","invalidPaymentRequestConsoleErrorMessage","Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines","missingRequiredCartTenderLinesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed","multipleCustomerAccountPaymentsNotAllowedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender","noMoreThanOneLoyaltyTenderErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry","noResponseFromGatewayForGiftCardBalanceInquiryErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard","noTenderLoyaltyCardErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints","notEnoughRewardPointsErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided","paymentAlreadyVoidedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance","paymentAmountExceedsGiftBalanceErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties","paymentRequiresMerchantPropertiesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console","paymentRequiresMerchantPropertiesConsoleErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount","paymentUsingUnauthorizedAccountErrorMessage","Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed","refundAmountMoreThanAllowedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment","unableToAuthorizePaymentErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired","unableToAuthorizePaymentCardAdditionalContextRequiredErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported","unableToAuthorizePaymentCardTypeMissingOrNotSupportedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment","unableToCancelPaymentErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo","unableToReadCardTokenInfoErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult","unableToRetrieveCardPaymentAcceptResultErrorMessage","role","onAddAccountPayment","event","preventDefault","onChangeAmountHandler","value","target","customState","customizedAmount","returnModifiedState","getLocaleBasedCustomizedPrice","keyCode","options","addPaymentButtonLabel","inputAmountLabel","inputAmountAriaLabel","customerSinceLabel","accountCreditLabel","creditDetailsSectionLabel","orderTotalLabel","availableCreditLabel","creditExcessLabel","appliedCustomerAccountPaymentLabel","removeCustomerAccountPaymentLabel","accountCreditDetails","id","tag","Button","onClick","disabled","Number","isNaN","type","onInput","currentTarget","onKeyDown","which","Name","AccountNumber","Alert","assertive","fade","includeAlertClass","isOpen","inputAmountSummaryLabel","paymentAmountInput"],"sourceRoot":""}