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lT,qBAClBqR,EAAgBxgB,QAAQ2f,iBAItBrxB,KAAK6xB,cAAcvB,mBACxB4B,EAAgBxgB,QAAQ2f,iBACxB,CACEnQ,QAASL,EAAgBK,QACzB6E,QAASlF,EAAgBoQ,aAE3BrsB,QACAsB,OAAKwtB,IACH,IAAKA,GAAiB1Q,OAKpB,YAJA+Q,EAAW,CACTzqB,OAAQ,6BAMZ,MAAM0qB,EAASN,EAAgB,GAE/BK,EAAW,CACTzqB,OAAQ,UACR7B,MAAO,CACLwL,OAAQA,GAAU+gB,GAAQ/gB,QAAU,GACpC7C,MAAOuhB,GAET+B,mBACD,IACF,EACDvgB,cAAW,KACT4gB,EAAW,CACTzqB,OAAQ,SAGH2qB,WAnCFA,UAwCb/F,EAAeO,uBAAuB7pB,QACpCsB,OAAI,EAAG6tB,aAAYnD,qBACjBmD,EAAW,CACTzqB,OAAQ,UACR7B,MAAO,CACLwL,OAAQA,EAAS2d,EAAe3d,OAChC7C,MAAOuhB,KAGX3xB,KAAKgyB,aAAavd,KAAKmc,EAAe3d,OAAS,IAAG,UAQlE,CAAClS,SAAAf,KAAA,mBAAAgB,iBA7JU4wB,EAAU,EAAA7wB,SAAAf,KAAA,WAAAgD,EAAAa,IAAA,OAAV+tB,EAAU9tB,QAAV8tB,EAAU7tB,mBAAV6tB,CAAU","sources":["./libs/lazy/main/layout/accordion/shared/button-cancel/button-cancel.component.ts","./libs/lazy/main/layout/accordion/shared/button-cancel/button-cancel.module.ts","./libs/payments/allianz/src/lib/shared/components/base-container.component.ts","./libs/payments/allianz/src/lib/shared/service/allianz-api.service.ts","./libs/payments/allianz/src/lib/shared/service/allianz-flow.service.ts","./libs/payments/allianz/src/lib/shared/service/payment.service.ts","./libs/payments/bfs/src/lib/shared/components/base-container.component.ts","./libs/payments/bfs/src/lib/shared/service/bfs-api.service.ts","./libs/payments/bfs/src/lib/shared/service/bfs-flow.service.ts","./libs/payments/bfs/src/lib/shared/service/payment.service.ts","./libs/payments/hsbc/src/lib/shared/components/base-container.component.ts","./libs/payments/hsbc/src/lib/shared/service/payment.service.ts","./libs/payments/ivy/src/lib/shared/components/finish/finish.component.html","./libs/payments/ivy/src/lib/shared/components/finish/finish.component.ts","./libs/payments/ivy/src/lib/shared/services/payment.service.ts","./libs/payments/ivy/src/lib/shared/services/payment-v2.service.ts","./libs/payments/ivy/src/lib/settings.ts","./libs/payments/ivy/src/lib/shared/shared.module.ts","./libs/payments/ivy/src/lib/shared/components/base-container.component.ts","./libs/payments/pay-by-bank/src/lib/shared/components/finish/finish.component.html","./libs/payments/pay-by-bank/src/lib/shared/components/finish/finish.component.ts","./libs/payments/pay-by-bank/src/lib/shared/service/payment.service.ts","./libs/payments/santander-at-instant/src/lib/shared/components/finish/finish.component.html","./libs/payments/santander-at-instant/src/lib/shared/components/finish/finish.component.ts","./libs/payments/santander-at-instant/src/lib/shared/service/payment.service.ts","./libs/payments/santander-be/src/lib/shared/components/finish/finish.component.html","./libs/payments/santander-be/src/lib/shared/components/finish/finish.component.ts","./libs/payments/santander-be/src/lib/shared/services/payment.service.ts","./libs/payments/santander-be/src/lib/shared/shared.module.ts","./libs/payments/santander-be/src/lib/shared/components/base-container.component.ts","./libs/payments/santander-de-invoice/src/lib/shared/services/payment.service.ts","./libs/payments/santander-no-invoice/src/lib/finish/components/finish-container/finish-container.component.ts","./libs/payments/santander-no-invoice/src/lib/finish/components/finish-container/finish-container.component.html","./libs/payments/santander-no-invoice/src/lib/payment-details/payment-details-container.component.ts","./libs/payments/santander-no-invoice/src/lib/santander-no-invoice.module.ts","./libs/payments/santander-no/src/lib/settings.ts","./libs/payments/santander-se/src/lib/services/utils-steps.service.ts","./libs/payments/santander-se/src/lib/settings.ts","./libs/payments/santander-uk/src/lib/shared/components/base-container.component.ts","./libs/payments/santander-uk/src/lib/shared/services/payment.service.ts","./libs/payments/stripe-ideal/src/lib/shared/components/finish/finish.component.html","./libs/payments/stripe-ideal/src/lib/shared/components/finish/finish.component.ts","./libs/payments/stripe-ideal/src/lib/shared/services/stripe-api.service.ts","./libs/payments/stripe-ideal/src/lib/shared/services/stripe-flow.service.ts","./libs/payments/stripe-ideal/src/lib/shared/services/stripe-common.service.ts","./libs/payments/stripe-ideal/src/lib/shared/services/payment.service.ts","./libs/payments/stripe-ideal/src/lib/shared/shared.module.ts","./libs/payments/stripe-ideal/src/lib/shared/components/base-container.component.ts","./libs/payments/stripe-wallet/src/lib/shared/components/finish/finish.component.html","./libs/payments/stripe-wallet/src/lib/shared/components/finish/finish.component.ts","./libs/payments/stripe-wallet/src/lib/shared/services/stripe-api.service.ts","./libs/payments/stripe-wallet/src/lib/shared/services/stripe-flow.service.ts","./libs/payments/stripe-wallet/src/lib/shared/services/payment.service.ts","./libs/payments/stripe-wallet/src/lib/shared/shared.module.ts","./libs/payments/stripe-wallet/src/lib/shared/components/base-container.component.ts","./libs/payments/stripe/src/lib/shared/components/finish/finish.component.html","./libs/payments/stripe/src/lib/shared/components/finish/finish.component.ts","./libs/payments/stripe/src/lib/shared/services/payment.service.ts","./libs/payments/stripe/src/lib/shared/shared.module.ts","./libs/payments/stripe/src/lib/shared/components/base-container.component.ts","./libs/payments/swedbank/src/lib/shared/components/base-container.component.ts","./libs/payments/swedbank/src/lib/shared/services/payment.service.ts","./libs/payments/zinia/bnpl/src/lib/v1/services/payment.service.ts","./libs/payments/zinia/bnpl/src/lib/v2/services/terms.service.ts","./libs/payments/zinia/bnpl/src/lib/v2/services/zinia-bnpl-api.service.ts","./libs/payments/zinia/bnpl/src/lib/v2/services/zinia-bnpl-flow.service.ts","./libs/payments/zinia/bnpl/src/lib/v2/services/zinia-bnpl-utils.service.ts","./libs/payments/zinia/bnpl/src/lib/v2/services/payment-v2.service.ts","./libs/payments/zinia/bnpl/src/lib/v3/services/terms.service.ts","./libs/payments/zinia/bnpl/src/lib/v3/services/zinia-bnpl-utils.service.ts","./libs/payments/zinia/bnpl/src/lib/v3/services/payment-v3.service.ts","./libs/payments/zinia/bnpl/src/lib/v4/services/terms.service.ts","./libs/payments/zinia/bnpl/src/lib/v4/services/zinia-bnpl-api.service.ts","./libs/payments/zinia/bnpl/src/lib/v4/services/zinia-bnpl-flow.service.ts","./libs/payments/zinia/bnpl/src/lib/v4/services/zinia-bnpl-utils.service.ts","./libs/payments/zinia/bnpl/src/lib/v4/services/payment-v4.service.ts","./libs/payments/zinia/bnpl/src/lib/v5/services/terms.service.ts","./libs/payments/zinia/bnpl/src/lib/v5/services/zinia-bnpl-api.service.ts","./libs/payments/zinia/bnpl/src/lib/v5/services/zinia-bnpl-flow.service.ts","./libs/payments/zinia/bnpl/src/lib/v5/services/zinia-bnpl-utils.service.ts","./libs/payments/zinia/bnpl/src/lib/v5/services/payment-v5.service.ts","./libs/payments/zinia/installments/src/lib/shared/components/base-container.component.ts","./libs/payments/zinia/installments/src/lib/shared/components/base-inquiry-container.component.ts","./libs/payments/zinia/installments/src/lib/v1/shared/services/payment.service.ts","./libs/shared/api/media/media-api.service.ts","./libs/shared/coupons/src/lib/services/coupons-api.service.ts","./libs/shared/coupons/src/lib/services/coupons-state.service.ts","./libs/shared/coupons/src/lib/coupons.module.ts","./libs/shared/location/src/lib/services/top-location/top-location.service.ts","./libs/shared/node-api/src/lib/services/api-call-url.service.ts","./libs/shared/node-api/src/lib/services/base-node-flow.service.ts","./libs/shared/node-api/src/lib/services/node-flow.service.ts","./libs/shared/payment/components/payment-error/payment-error.component.ts","./libs/shared/payment/components/payment-error/payment-error.component.html","./libs/shared/shipping/src/lib/services/shipping-api.service.ts","./libs/shared/shipping/src/lib/types/index.ts","./libs/shared/shipping/src/lib/services/shipping-converter.service.ts","./libs/shared/shipping/src/lib/services/shipping-state.service.ts","./libs/shared/shipping/src/lib/shipping.module.ts","./libs/shared/ui/button/button.module.ts","./node_modules/@stripe/stripe-js/dist/stripe.esm.js","./libs/widgets/stripe-wallet/src/lib/services/payment-request-adapter.class.ts","./libs/widgets/stripe-wallet/src/lib/services/payment-request.service.ts","./libs/widgets/stripe-wallet/src/lib/services/stripe-wallet-api.service.ts","./libs/widgets/stripe-wallet/src/lib/services/stripe-wallet.service.ts","./libs/widgets/stripe-wallet/src/lib/services/pay.service.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Input, inject } from '@angular/core';\nimport { ViewSelectSnapshot } from '@ngxs-labs/select-snapshot';\n\nimport { FinishFlowService } from '@pe/checkout/core';\nimport { TopLocationService } from '@pe/checkout/location';\nimport { ParamsState } from '@pe/checkout/store';\nimport { FlowInterface } from '@pe/checkout/types';\nimport { PeDestroyService } from '@pe/destroy';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'checkout-main-button-cancel',\n template: `\n \n \n `,\n styles: [`\n :host {\n display: flex;\n }\n .mat-button-secondary {\n font-size: 12px;\n line-height: 36px;\n height: 36px;\n padding: 0 20px;\n }\n @media (max-width: 380px) {\n .mat-button-secondary {\n font-size: 8px;\n line-height: 30px;\n height: 30px;\n padding: 0px 10px;\n }\n }\n `],\n providers: [PeDestroyService],\n})\nexport class ButtonCancelComponent {\n\n private readonly topLocationService= inject(TopLocationService);\n private readonly finishFlowService= inject(FinishFlowService);\n\n @ViewSelectSnapshot(ParamsState.merchantMode) merchantMode: boolean;\n\n @ViewSelectSnapshot(ParamsState.embeddedMode) embeddedMode: boolean;\n\n @Input() flow: FlowInterface;\n\n @Input() buttonText: string;\n\n @Input() isDefault: boolean;\n\n @Input() isInIframe: boolean;\n\n onButtonClick(): void {\n if ((this.embeddedMode && this.isInIframe) \n || this.merchantMode\n || !this.flow.apiCall.cancelUrl) {\n this.finishFlowService.closeCheckout(this.flow);\n } else {\n this.topLocationService.href = this.flow.apiCall.cancelUrl;\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ButtonCancelComponent } from './button-cancel.component';\n\n@NgModule({\n declarations: [ButtonCancelComponent],\n imports: [\n CommonModule,\n ],\n exports: [ButtonCancelComponent],\n})\nexport class CheckoutUiButtonCancelModule {}\n","import { Directive } from '@angular/core';\n\nimport { AbstractContainerComponent } from '@pe/checkout/payment';\nimport {\n ErrorInterface,\n} from '@pe/checkout/types';\n\n@Directive()\nexport class BaseContainerComponent extends AbstractContainerComponent {\n\n errorMessage: string = null;\n errors: ErrorInterface;\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { AbstractApiService } from '@pe/checkout/api';\nimport { NodePaymentResponseInterface } from '@pe/checkout/types';\n\n@Injectable()\nexport class AllianzApiService extends AbstractApiService {\n getPayment(\n connectionId: string,\n paymentId: string,\n ): Observable> {\n const url = `${this.env.thirdParty.payments}/api/connection/${connectionId}/action/get-payment`;\n\n return this.http.post>(url, { paymentId });\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { Store } from '@ngxs/store';\nimport { Observable } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport { BaseNodeFlowService } from '@pe/checkout/node-api';\nimport { PatchPaymentResponse, PaymentState } from '@pe/checkout/store';\nimport { NodePaymentResponseInterface } from '@pe/checkout/types';\n\nimport { AllianzApiService } from './allianz-api.service';\n\n@Injectable()\nexport class AllianzFlowService extends BaseNodeFlowService {\n private allianzApiService = this.injector.get(AllianzApiService);\n private store = this.injector.get(Store);\n\n getPayment(): Observable> {\n const paymentResponse\n = this.store.selectSnapshot>(PaymentState.response);\n\n return this.allianzApiService.getPayment(\n this.flow.connectionId,\n paymentResponse.id,\n ).pipe(\n switchMap(response =>\n this.store.dispatch(new PatchPaymentResponse(response)),\n ),\n );\n }\n\n}\n","import { Injectable } from '@angular/core';\n\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\n\nimport { NodePaymentDetailsResponseInterface } from '../types';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private nodeFlowService = this.injector.get(NodeFlowService);\n\n postPayment() {\n return this.nodeFlowService.postPayment();\n }\n}\n","import { Directive } from '@angular/core';\n\nimport { AbstractContainerComponent } from '@pe/checkout/payment';\nimport {\n ErrorInterface,\n} from '@pe/checkout/types';\n\n@Directive()\nexport class BaseContainerComponent extends AbstractContainerComponent {\n\n errorMessage: string = null;\n errors: ErrorInterface;\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { AbstractApiService } from '@pe/checkout/api';\nimport { NodePaymentResponseInterface } from '@pe/checkout/types';\n\n@Injectable()\nexport class BfsApiService extends AbstractApiService {\n getPayment(\n connectionId: string,\n paymentId: string,\n ): Observable> {\n const url = `${this.env.thirdParty.payments}/api/connection/${connectionId}/action/get-payment`;\n\n return this.http.post>(url, { paymentId });\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { Store } from '@ngxs/store';\nimport { Observable } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport { BaseNodeFlowService } from '@pe/checkout/node-api';\nimport { PatchPaymentResponse, PaymentState } from '@pe/checkout/store';\nimport { NodePaymentResponseInterface } from '@pe/checkout/types';\n\nimport { BfsApiService } from './bfs-api.service';\n\n@Injectable()\nexport class BfsFlowService extends BaseNodeFlowService {\n private bfsApiService = this.injector.get(BfsApiService);\n private store = this.injector.get(Store);\n\n getPayment(): Observable> {\n const paymentResponse\n = this.store.selectSnapshot>(PaymentState.response);\n\n return this.bfsApiService.getPayment(\n this.flow.connectionId,\n paymentResponse.id,\n ).pipe(\n switchMap(response =>\n this.store.dispatch(new PatchPaymentResponse(response)),\n ),\n );\n }\n\n}\n","import { Injectable } from '@angular/core';\n\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\n\nimport { NodePaymentDetailsResponseInterface } from '../types';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private nodeFlowService = this.injector.get(NodeFlowService);\n\n postPayment() {\n return this.nodeFlowService.postPayment();\n }\n}\n","import { Directive } from '@angular/core';\n\nimport { AbstractContainerComponent } from '@pe/checkout/payment';\nimport {\n ErrorInterface,\n} from '@pe/checkout/types';\n\n@Directive()\nexport class BaseContainerComponent extends AbstractContainerComponent {\n\n errorMessage: string = null;\n errors: ErrorInterface;\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { delayWhen, switchMap, tap } from 'rxjs/operators';\n\nimport { TopLocationService } from '@pe/checkout/location';\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { ExternalRedirectStorage } from '@pe/checkout/storage';\nimport { AuthSelectors } from '@pe/checkout/store';\nimport { NodePaymentResponseInterface } from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { NodePaymentDetailsInterface, NodePaymentDetailsResponseInterface } from '../types';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private env = this.injector.get(PE_ENV);\n private nodeFlowService = this.injector.get(NodeFlowService);\n private externalRedirectStorage = this.injector.get(ExternalRedirectStorage);\n private topLocationService = this.injector.get(TopLocationService);\n private localeConstantsService = this.injector.get(LocaleConstantsService);\n\n postPayment(): Observable> {\n return this.preparePayment().pipe(\n switchMap(() => this.nodeFlowService.postPayment().pipe(\n delayWhen((paymentResponse) => {\n if (paymentResponse?.paymentDetails?.redirectUrl) {\n return this.externalRedirectStorage.saveDataBeforeRedirect(this.flow).pipe(tap(() => {\n this.topLocationService.href = paymentResponse.paymentDetails.redirectUrl;\n }));\n } else {\n throw new Error('The \"redirectUrl\" is empty in backend response');\n }\n }),\n )),\n );\n }\n\n private preparePayment(): Observable {\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper = this.env.frontend.checkoutWrapper;\n const guestToken = this.store.selectSnapshot(AuthSelectors.accessToken);\n\n const frontendFinishUrl = new URL(`${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`);\n const frontendCancelUrl = new URL(`${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-choose-payment`);\n\n if (window.origin !== this.env.frontend.checkoutWrapper) {\n frontendFinishUrl.searchParams.set('guest_token', guestToken);\n frontendCancelUrl.searchParams.set('guest_token', guestToken);\n }\n\n const nodePaymentDetails: NodePaymentDetailsInterface = {\n frontendFinishUrl: frontendFinishUrl.toString(),\n frontendCancelUrl: frontendCancelUrl.toString(),\n forceRedirect: true,\n };\n\n return this.nodeFlowService.assignPaymentDetails(nodePaymentDetails);\n }\n}\n","\n \n \n\n \n \n \n\n \n\n \n \n\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\n\nimport { AbstractFinishComponent } from '@pe/checkout/finish';\nimport { PaymentStatusEnum } from '@pe/checkout/types';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ivy-shared-finish',\n templateUrl: './finish.component.html',\n styleUrls: ['./finish.component.scss'],\n})\nexport class FinishComponent extends AbstractFinishComponent {\n\n isStatusSuccess(): boolean {\n return [\n PaymentStatusEnum.STATUS_ACCEPTED,\n PaymentStatusEnum.STATUS_PAID,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusPending(): boolean {\n return [\n PaymentStatusEnum.STATUS_NEW, // Not correct but sometimes they return it instead of STATUS_IN_PROCESS\n PaymentStatusEnum.STATUS_IN_PROCESS,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusFail(): boolean {\n return [\n PaymentStatusEnum.STATUS_FAILED,\n PaymentStatusEnum.STATUS_DECLINED,\n ].indexOf(this.status) >= 0;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { delayWhen, switchMap, tap } from 'rxjs/operators';\n\nimport { NodeApiService } from '@pe/checkout/api';\nimport { TopLocationService } from '@pe/checkout/location';\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { ExternalRedirectStorage } from '@pe/checkout/storage';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { NodePaymentDetailsInterface, NodePaymentDetailsResponseInterface } from '../types';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private env = this.injector.get(PE_ENV);\n private localeConstantsService = this.injector.get(LocaleConstantsService);\n private topLocationService = this.injector.get(TopLocationService);\n private externalRedirectStorage = this.injector.get(ExternalRedirectStorage);\n private nodeApiService = this.injector.get(NodeApiService);\n private nodeFlowService = this.injector.get(NodeFlowService);\n\n postPayment() {\n return this.preparePayment().pipe(\n switchMap(() =>\n this.nodeFlowService.postPayment().pipe(\n delayWhen((paymentResponse) => {\n if (paymentResponse?.paymentDetails?.redirectUrl) {\n return this.externalRedirectStorage.saveDataBeforeRedirect(this.flow).pipe(tap(() => {\n this.topLocationService.href = paymentResponse.paymentDetails.redirectUrl;\n }));\n } else {\n throw new Error('The \"redirectUrl\" is empty in backend response');\n }\n }),\n ),\n ),\n );\n }\n\n private preparePayment(): Observable {\n return this.nodeApiService.getShopUrls(this.flow).pipe(\n switchMap((shopUrls) => {\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper = this.env.frontend.checkoutWrapper;\n const nodePaymentDetails: NodePaymentDetailsInterface = {\n frontendFinishUrl: `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`,\n frontendCancelUrl: shopUrls.cancelUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-choose-payment`,\n };\n\n return this.nodeFlowService.setPaymentDetails(nodePaymentDetails);\n }),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { SelectSnapshot } from '@ngxs-labs/select-snapshot';\nimport { Observable } from 'rxjs';\nimport { first, map, switchMap } from 'rxjs/operators';\n\nimport { NodeApiService } from '@pe/checkout/api';\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { PaymentState } from '@pe/checkout/store';\nimport { NodePaymentResponseInterface } from '@pe/checkout/types';\nimport { LocaleConstantsService, loadScript, fromMutationObserver } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { IVY_BUTTON_SCRIPT } from '../../settings';\nimport { NodePaymentDetailsInterface, NodePaymentDetailsResponseInterface } from '../types';\n\n/**\n * Initiates an Ivy checkout in a popup.\n */\ndeclare function startIvyCheckout(url: string, mode: 'popup'): void;\n\n@Injectable()\nexport class PaymentServiceV2 extends AbstractPaymentService {\n\n @SelectSnapshot(PaymentState.response)\n private paymentResponse: NodePaymentResponseInterface;\n\n private env = this.injector.get(PE_ENV);\n private localeConstantsService = this.injector.get(LocaleConstantsService);\n private nodeFlowService = this.injector.get(NodeFlowService);\n private nodeApiService = this.injector.get(NodeApiService);\n\n private preparePayment(): Observable {\n return this.nodeApiService.getShopUrls(this.flow).pipe(\n switchMap((shopUrls) => {\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper = this.env.frontend.checkoutWrapper;\n const nodePaymentDetails: NodePaymentDetailsInterface = {\n frontendFinishUrl: `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`,\n frontendCancelUrl: shopUrls.cancelUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-choose-payment`,\n };\n\n return this.nodeFlowService.assignPaymentDetails(nodePaymentDetails);\n }),\n );\n }\n\n postPayment(): Observable {\n return this.preparePayment().pipe(\n switchMap(() => loadScript(IVY_BUTTON_SCRIPT, 'ivy-button-script').pipe(\n switchMap(() => this.nodeFlowService.postPayment()),\n switchMap(() => {\n startIvyCheckout(this.paymentResponse.paymentDetails.redirectUrl, 'popup');\n\n return fromMutationObserver(document.body).pipe(\n first(),\n );\n })\n )),\n map(() => null),\n );\n }\n}\n","import { PaymentAddressSettingsInterface } from '@pe/checkout/types';\n\n\nexport const HAS_NODE_FORM_OPTIONS = false;\nexport const BILLING_ADDRESS_SETTINGS: PaymentAddressSettingsInterface = null;\nexport const IVY_BUTTON_SCRIPT = 'https://cdn.getivy.de/button.js';\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { FinishModule } from '@pe/checkout/finish';\nimport { ABSTRACT_PAYMENT_SERVICE } from '@pe/checkout/payment';\n\nimport {\n FinishComponent,\n} from './components';\nimport { PaymentService } from './services';\n\n@NgModule({\n declarations: [\n FinishComponent,\n ],\n imports: [\n CommonModule,\n FinishModule,\n ],\n exports: [\n FinishComponent,\n ],\n providers: [\n {\n provide: ABSTRACT_PAYMENT_SERVICE,\n useClass: PaymentService,\n },\n ],\n})\nexport class SharedModule {\n}\n","import { Directive } from '@angular/core';\n\nimport { ApiService } from '@pe/checkout/api';\nimport { AbstractContainerComponent } from '@pe/checkout/payment';\nimport { ErrorInterface } from '@pe/checkout/types';\n\n@Directive()\nexport class BaseContainerComponent extends AbstractContainerComponent {\n errorMessage: string = null;\n errors: ErrorInterface;\n\n protected apiService: ApiService = this.injector.get(ApiService);\n}\n","\n \n \n\n \n\n \n\n \n \n\n","import { NgIf } from '@angular/common';\nimport { Component, ChangeDetectionStrategy } from '@angular/core';\n\nimport { AbstractFinishComponent, FinishModule } from '@pe/checkout/finish';\nimport { PaymentStatusEnum } from '@pe/checkout/types';\n\n@Component({\n selector: 'pe-pay-by-bank-finish-view',\n templateUrl: './finish.component.html',\n styleUrls: ['./finish.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n NgIf,\n\n FinishModule,\n ],\n})\nexport class FinishComponent extends AbstractFinishComponent {\n\n override isStatusSuccess(): boolean {\n return [\n PaymentStatusEnum.STATUS_ACCEPTED,\n PaymentStatusEnum.STATUS_PAID,\n ].indexOf(this.status) >= 0;\n }\n\n override isStatusPending(): boolean {\n return [\n PaymentStatusEnum.STATUS_NEW, // Not correct but sometimes they return it instead of STATUS_IN_PROCESS\n PaymentStatusEnum.STATUS_IN_PROCESS,\n ].indexOf(this.status) >= 0;\n }\n\n override isStatusFail(): boolean {\n return [\n PaymentStatusEnum.STATUS_FAILED,\n PaymentStatusEnum.STATUS_DECLINED,\n ].indexOf(this.status) >= 0;\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { delayWhen, switchMap, tap } from 'rxjs/operators';\n\nimport { NodeApiService } from '@pe/checkout/api';\nimport { TopLocationService } from '@pe/checkout/location';\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { ExternalRedirectStorage } from '@pe/checkout/storage';\nimport { FlowState, PaymentState } from '@pe/checkout/store';\nimport { NodePaymentResponseInterface, NodeShopUrlsInterface } from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { PaymentDetails, PaymentResponse } from '../types';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private readonly env = inject(PE_ENV);\n private readonly nodeFlowService = inject(NodeFlowService);\n private readonly externalRedirectStorage = inject(ExternalRedirectStorage);\n private readonly topLocationService = inject(TopLocationService);\n private readonly localeConstantsService = inject(LocaleConstantsService);\n private readonly api = inject(NodeApiService);\n\n postPayment(): Observable> {\n return this.api.getShopUrls(this.store.selectSnapshot(FlowState.flow)).pipe(\n switchMap(shopUrls =>\n this.preparePayment(shopUrls).pipe(\n switchMap(() => this.nodeFlowService.postPayment().pipe(\n delayWhen((paymentResponse) => {\n if (paymentResponse.paymentDetails.redirectUrl) {\n return this.externalRedirectStorage.saveDataBeforeRedirect(this.flow).pipe(\n // to avoid loading the final modal before the redirect\n tap(() => this.topLocationService.waitRedirect = true),\n );\n }\n\n throw new Error('The \"redirectUrl\" is empty in backend response');\n }),\n )),\n ),\n ),\n );\n }\n\n redirect() {\n const paymentResponse = this.store.selectSnapshot(PaymentState.response);\n\n if (paymentResponse?.paymentDetails?.redirectUrl) {\n this.topLocationService.href = paymentResponse.paymentDetails.redirectUrl;\n }\n }\n\n private preparePayment(shopUrls: NodeShopUrlsInterface): Observable {\n const nodePaymentDetails: PaymentDetails = {};\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper = this.env.frontend.checkoutWrapper;\n\n const frontendFinishUrl = new URL(`${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`);\n const frontendCancelUrl = new URL(`${checkoutWrapper}/${lang}/pay/${this.flow.id}/static-finish/fail`);\n\n nodePaymentDetails.frontendFinishUrl = shopUrls.successUrl ?? frontendFinishUrl.toString();\n nodePaymentDetails.frontendCancelUrl = shopUrls.cancelUrl ?? frontendCancelUrl.toString();\n nodePaymentDetails.frontendSuccessUrl = shopUrls.successUrl ?? frontendFinishUrl.toString();\n nodePaymentDetails.frontendFailureUrl = shopUrls.failureUrl ?? shopUrls.cancelUrl ?? frontendCancelUrl.toString();\n\n return this.nodeFlowService.assignPaymentDetails(nodePaymentDetails);\n }\n}\n","\n \n \n\n \n\n \n \n\n","import { NgIf } from '@angular/common';\nimport { Component, ChangeDetectionStrategy } from '@angular/core';\n\nimport { AbstractFinishComponent, FinishModule } from '@pe/checkout/finish';\nimport { PaymentStatusEnum } from '@pe/checkout/types';\n\n@Component({\n selector: 'pe-santander-at-finish-view',\n templateUrl: './finish.component.html',\n styleUrls: ['./finish.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n NgIf,\n\n FinishModule,\n ],\n})\nexport class FinishComponent extends AbstractFinishComponent {\n\n override isStatusSuccess(): boolean {\n return [\n PaymentStatusEnum.STATUS_ACCEPTED,\n PaymentStatusEnum.STATUS_PAID,\n ].indexOf(this.status) >= 0;\n }\n\n override isStatusPending(): boolean {\n return [\n PaymentStatusEnum.STATUS_NEW, // Not correct but sometimes they return it instead of STATUS_IN_PROCESS\n PaymentStatusEnum.STATUS_IN_PROCESS,\n ].indexOf(this.status) >= 0;\n }\n\n override isStatusFail(): boolean {\n return [\n PaymentStatusEnum.STATUS_FAILED,\n PaymentStatusEnum.STATUS_DECLINED,\n ].indexOf(this.status) >= 0;\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { delayWhen, switchMap, tap } from 'rxjs/operators';\n\nimport { TopLocationService } from '@pe/checkout/location';\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { ExternalRedirectStorage } from '@pe/checkout/storage';\nimport { NodePaymentResponseInterface } from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { PaymentDetails, PaymentResponse } from '../types';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private readonly env = inject(PE_ENV);\n private readonly nodeFlowService = inject(NodeFlowService);\n private readonly externalRedirectStorage = inject(ExternalRedirectStorage);\n private readonly topLocationService = inject(TopLocationService);\n private readonly localeConstantsService = inject(LocaleConstantsService);\n\n postPayment(): Observable> {\n return this.preparePayment().pipe(\n switchMap(() => this.nodeFlowService.postPayment().pipe(\n delayWhen((paymentResponse) => {\n if (paymentResponse.paymentDetails.redirectUrl) {\n return this.externalRedirectStorage.saveDataBeforeRedirect(this.flow).pipe(tap(() => {\n this.topLocationService.href = paymentResponse.paymentDetails.redirectUrl;\n }));\n }\n\n throw new Error('The \"redirectUrl\" is empty in backend response');\n }),\n )),\n );\n }\n\n private preparePayment(): Observable {\n const nodePaymentDetails: PaymentDetails = {};\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper = this.env.frontend.checkoutWrapper;\n\n const frontendFinishUrl = new URL(`${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`);\n const frontendCancelUrl = new URL(`${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-choose-payment`);\n\n nodePaymentDetails.frontendFinishUrl = frontendFinishUrl.toString();\n nodePaymentDetails.frontendCancelUrl = frontendCancelUrl.toString();\n\n return this.nodeFlowService.assignPaymentDetails(nodePaymentDetails);\n }\n}\n","\n \n \n\n \n \n \n\n \n \n \n\n \n\n \n \n\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\n\nimport { AbstractFinishComponent } from '@pe/checkout/finish';\nimport { PaymentStatusEnum } from '@pe/checkout/types';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'santander-be-shared-finish',\n templateUrl: './finish.component.html',\n})\nexport class FinishComponent extends AbstractFinishComponent {\n\n isStatusSuccess(): boolean {\n return [\n PaymentStatusEnum.STATUS_ACCEPTED,\n PaymentStatusEnum.STATUS_PAID,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusPending(): boolean {\n return [\n PaymentStatusEnum.STATUS_IN_PROCESS,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusNew(): boolean {\n return [\n PaymentStatusEnum.STATUS_NEW,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusFail(): boolean {\n return [\n PaymentStatusEnum.STATUS_FAILED,\n PaymentStatusEnum.STATUS_DECLINED,\n ].indexOf(this.status) >= 0;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Select } from '@ngxs/store';\nimport { Observable } from 'rxjs';\nimport { map, switchMap, takeWhile } from 'rxjs/operators';\n\nimport { NodeApiService } from '@pe/checkout/api';\nimport { TopLocationService } from '@pe/checkout/location';\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { ExternalRedirectStorage } from '@pe/checkout/storage';\nimport { FlowState } from '@pe/checkout/store';\nimport { FlowInterface, FlowStateEnum, NodePaymentResponseInterface, NodeShopUrlsInterface } from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { NodePaymentDetailsInterface, NodePaymentResponseDetailsInterface } from '../types';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n @Select(FlowState.flow) private flow$: Observable;\n\n private env = this.injector.get(PE_ENV);\n private localeConstantsService = this.injector.get(LocaleConstantsService);\n private nodeApiService = this.injector.get(NodeApiService);\n private nodeFlowService = this.injector.get(NodeFlowService);\n private topLocationService = this.injector.get(TopLocationService);\n private externalRedirectStorage = this.injector.get(ExternalRedirectStorage);\n\n private preparePayment(shopUrls: NodeShopUrlsInterface): Observable {\n const nodePaymentDetails: NodePaymentDetailsInterface = {};\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper: string = this.env.frontend.checkoutWrapper;\n nodePaymentDetails.frontendFinishUrl = `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`;\n nodePaymentDetails.frontendFailureUrl = shopUrls.failureUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`;\n\n return this.nodeFlowService.assignPaymentDetails(nodePaymentDetails);\n }\n\n postPayment(): Observable> {\n return this.nodeApiService.getShopUrls(this.flow).pipe(\n switchMap(shopUrls => this.preparePayment(shopUrls)),\n switchMap(() =>\n this.nodeFlowService.postPayment().pipe(\n switchMap(paymentResponse => this.externalRedirectStorage.saveDataBeforeRedirect(this.flow).pipe(\n switchMap(() => this.flow$.pipe(\n takeWhile(({ state }) => {\n const finished = state === FlowStateEnum.FINISH;\n if (finished) {\n this.topLocationService.href = paymentResponse.paymentDetails.redirectUrl;\n }\n\n return !finished;\n }),\n map(() => paymentResponse),\n )),\n )),\n )\n ),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { FinishModule as SdkFinishModule } from '@pe/checkout/finish';\nimport { ABSTRACT_PAYMENT_SERVICE } from '@pe/checkout/payment';\nimport { StorageModule as SdkStorageModule } from '@pe/checkout/storage';\n\n\nimport {\n FinishComponent,\n} from './components';\nimport { PaymentService } from './services';\n\n@NgModule({\n declarations: [\n FinishComponent,\n ],\n imports: [\n CommonModule,\n SdkFinishModule,\n SdkStorageModule,\n ],\n exports: [\n SdkStorageModule,\n FinishComponent,\n ],\n providers: [\n {\n provide: ABSTRACT_PAYMENT_SERVICE,\n useClass: PaymentService,\n },\n ],\n})\nexport class SharedModule {\n}\n","import { Directive } from '@angular/core';\n\nimport { ApiService } from '@pe/checkout/api';\nimport { AbstractContainerComponent } from '@pe/checkout/payment';\nimport {\n ErrorInterface,\n FlowInterface,\n} from '@pe/checkout/types';\n\n@Directive()\nexport class BaseContainerComponent extends AbstractContainerComponent {\n\n errorMessage: string = null;\n errors: ErrorInterface;\n flow: FlowInterface;\n\n protected apiService = this.injector.get(ApiService);\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { NodePaymentResponseInterface } from '@pe/checkout/types';\n\nimport { NodePaymentDetailsInterface } from '../types';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private nodeFlowService = this.injector.get(NodeFlowService);\n\n postPayment(): Observable> {\n return this.nodeFlowService.postPayment();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\n\nimport { AbstractFinishContainerComponent } from '@pe/checkout/finish';\n\nimport { NodePaymentResponseDetailsInterface } from '../../../shared';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'santander-invoice-no-finish-container',\n templateUrl: './finish-container.component.html',\n styleUrls: ['./finish-container.component.scss'],\n})\nexport class FinishContainerComponent\n extends AbstractFinishContainerComponent {\n\n showFinishModalFromExistingPayment(): void {\n this.paymentResponse = this.nodeFlowService.getFinalResponse();\n this.analyticsFormService.initPaymentMethod(this.paymentMethod);\n this.cdr.markForCheck();\n }\n}\n","\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n OnInit,\n Output,\n} from '@angular/core';\n\nimport { BaseContainerComponent } from '../shared';\n\n\n@Component({\n selector: 'payment-details-container',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PaymentDetailsContainerComponent\n extends BaseContainerComponent\n implements OnInit {\n\n @Output() continue = new EventEmitter();\n\n ngOnInit(): void {\n this.continue.emit();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { ComponentFactory, NgModule } from '@angular/core';\n\nimport { BasePaymentModule, PAYMENT_SETTINGS } from '@pe/checkout/payment';\n\nimport { FinishContainerComponent } from './finish';\nimport { PaymentDetailsContainerComponent } from './payment-details';\nimport { BILLING_ADDRESS_SETTINGS, HAS_NODE_FORM_OPTIONS } from './settings';\nimport { SharedModule } from './shared';\n\n@NgModule({\n declarations: [\n FinishContainerComponent,\n PaymentDetailsContainerComponent,\n ],\n exports: [\n FinishContainerComponent,\n PaymentDetailsContainerComponent,\n ],\n imports: [\n CommonModule,\n SharedModule,\n ],\n providers: [\n {\n provide: PAYMENT_SETTINGS,\n useValue: {\n addressSettings: BILLING_ADDRESS_SETTINGS,\n hasNodeOptions: HAS_NODE_FORM_OPTIONS,\n },\n },\n ],\n})\nexport class SantanderNoInvoiceModule extends BasePaymentModule {\n\n resolveFinishContainerComponent(): ComponentFactory {\n return this.componentFactoryResolver.resolveComponentFactory(FinishContainerComponent);\n }\n\n resolvePaymentDetailsStepContainerComponent(): ComponentFactory {\n return this.componentFactoryResolver.resolveComponentFactory(PaymentDetailsContainerComponent);\n }\n}\n","import { PaymentAddressSettingsInterface } from '@pe/checkout/types';\n\n\nexport const HAS_NODE_FORM_OPTIONS = true;\n\nexport const BILLING_ADDRESS_SETTINGS: PaymentAddressSettingsInterface = null;\n","import { Injectable } from '@angular/core';\nimport { from, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { FormOptionInterface, SelectOptionInterface } from '@pe/checkout/types';\nimport { CountryListInterface, LocaleConstantsService } from '@pe/checkout/utils';\n\nimport { FormOptionsInterface } from '../shared';\n\n@Injectable()\nexport class UtilStepService {\n constructor(\n private localeConstantsService: LocaleConstantsService,\n ) {}\n\n getYesNoOptions(): FormOptionInterface[] {\n return [{\n label: $localize`:@@santander-se.boolean.no:`,\n value: false,\n }, {\n label: $localize`:@@santander-se.boolean.yes:`,\n value: true,\n }];\n }\n\n translateOptions(\n values: FormOptionInterface[],\n keysPool: { [key: string]: string },\n ): SelectOptionInterface[] {\n const valuesSet = new Set();\n const options: any = values.reduce((acc, item) => {\n if (!valuesSet.has(item.value)) {\n acc.push(item);\n valuesSet.add(item.value);\n }\n\n return acc;\n }, []).map((v) => {\n const key = v.value as keyof typeof keysPool;\n\n return {\n label: keysPool[key],\n value: v.value,\n };\n });\n\n return options as SelectOptionInterface[];\n }\n\n getCountries(withEmpty: boolean, nodeFormOptions: FormOptionsInterface): Observable {\n const countriesPromise = this.localeConstantsService.getCountryList(this.localeConstantsService.getLang())();\n\n return from(countriesPromise).pipe(\n map(countries => this.mapCountries(countries, nodeFormOptions, { withEmpty })),\n );\n }\n\n private mapCountries(\n countries: CountryListInterface,\n nodeFormOptions: FormOptionsInterface,\n config?: { withEmpty: boolean },\n ) {\n // Some manipulations to make SE first in list\n let seCountry: SelectOptionInterface = null;\n const options = nodeFormOptions?.countryCodes.filter((c) => {\n if (c.value.toString().toUpperCase() === 'SE') {\n seCountry = {\n label: countries[String(c.value)],\n value: c.value,\n };\n\n return false;\n }\n\n return true;\n }).map(c => ({\n label: countries[String(c.value)],\n value: c.value,\n }));\n\n const result = [seCountry, ...options];\n if (config.withEmpty) {\n result.unshift({\n label: $localize`:@@santander-se.action.select_option:`,\n value: null,\n });\n }\n\n return result;\n }\n}\n","import { PaymentAddressSettingsInterface } from '@pe/checkout/types';\n\n\nexport const HAS_NODE_FORM_OPTIONS = true;\n\nexport const BILLING_ADDRESS_SETTINGS: PaymentAddressSettingsInterface = null;\n\nexport const COUNTRY = 'SE';\n","import { Directive, Input } from '@angular/core';\n\nimport { AbstractContainerComponent } from '@pe/checkout/payment';\nimport {\n ErrorInterface,\n FlowInterface,\n NodePaymentResponseInterface,\n PaymentMethodEnum,\n} from '@pe/checkout/types';\n\nimport { NodePaymentResponseDetailsInterface } from '../types';\n\n@Directive()\nexport abstract class BaseContainerComponent extends AbstractContainerComponent {\n errorMessage: string = null;\n errors: ErrorInterface;\n flow: FlowInterface;\n nodeResult: NodePaymentResponseInterface;\n\n @Input() paymentMethod: PaymentMethodEnum;\n\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { mapTo, switchMap } from 'rxjs/operators';\n\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { ExternalRedirectStorage } from '@pe/checkout/storage';\nimport {\n NodePaymentResponseInterface,\n} from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { NodePaymentDetailsResponseInterface } from '../types';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n\n private env = this.injector.get(PE_ENV);\n private nodeFlowService = this.injector.get(NodeFlowService);\n private externalRedirectStorage = this.injector.get(ExternalRedirectStorage);\n private localeConstantsService = this.injector.get(LocaleConstantsService);\n\n postPayment(): Observable> {\n const lang = this.localeConstantsService.getLang();\n\n return this.nodeFlowService.assignPaymentDetails({\n frontendFinishUrl: `${this.env.frontend.checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`,\n }).pipe(\n switchMap(() => this.nodeFlowService.postPayment().pipe(\n switchMap((response) => {\n if (response.paymentDetails?.frontendFinishUrl) {\n return this.externalRedirectStorage.saveDataBeforeRedirect(this.flow).pipe(\n mapTo(response),\n );\n }\n\n return of(response);\n }),\n )),\n );\n }\n}\n","\n \n \n\n \n\n \n \n\n","import {\n Component, ChangeDetectionStrategy, Input,\n} from '@angular/core';\n\nimport { AbstractFinishTemplateComponent } from '@pe/checkout/finish';\nimport { PaymentStatusEnum } from '@pe/checkout/types';\n\nimport { NodePaymentResponseDetailsInterface } from '../../types';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'stripe-ideal-shared-finish',\n templateUrl: './finish.component.html',\n styleUrls: ['./finish.component.scss'],\n})\nexport class FinishComponent extends AbstractFinishTemplateComponent {\n @Input() isCheckStatusTimeout = false;\n\n get translations() {\n return {\n processingTitle: $localize `:@@payment-stripe-ideal.inquiry.finish.processing.title:`,\n processingText: $localize `:@@payment-stripe-ideal.inquiry.finish.processing.text:`,\n };\n }\n\n isStatusSuccess(): boolean {\n return [\n PaymentStatusEnum.STATUS_ACCEPTED,\n PaymentStatusEnum.STATUS_PAID,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusPending(): boolean {\n return [\n PaymentStatusEnum.STATUS_IN_PROCESS,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusFail(): boolean {\n return [\n PaymentStatusEnum.STATUS_FAILED,\n PaymentStatusEnum.STATUS_DECLINED,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusNew(): boolean {\n return [\n PaymentStatusEnum.STATUS_NEW,\n ].indexOf(this.status) >= 0;\n }\n\n getNodeResultDetails(): NodePaymentResponseDetailsInterface {\n return this.nodeResult.paymentDetails;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { AbstractApiService } from '@pe/checkout/api';\nimport { PaymentMethodEnum, NodePaymentPreInitializeData, NodePaymentInterface } from '@pe/checkout/types';\n\n@Injectable()\nexport class StripeApiService extends AbstractApiService {\n\n paymentPublishKey(\n paymentMethod: PaymentMethodEnum,\n connectionId: string,\n nodeData: NodePaymentInterface,\n ): Observable {\n const url = `${this.env.thirdParty.payments}/api/connection/${connectionId}/action/get-publish-key`;\n const data = {\n amount: nodeData.payment.amount,\n deliveryFee: nodeData.payment.deliveryFee,\n };\n\n return this.http.post(url, data).pipe(\n catchError(err => this.logError(err, nodeData.payment.flowId, paymentMethod, { url, method: 'POST' })),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { SelectSnapshot } from '@ngxs-labs/select-snapshot';\nimport { Observable } from 'rxjs';\n\nimport { BaseNodeFlowService } from '@pe/checkout/node-api';\nimport { PaymentState } from '@pe/checkout/store';\nimport { NodePaymentInterface, NodePaymentPreInitializeData, PaymentMethodEnum } from '@pe/checkout/types';\n\nimport { StripeApiService } from './stripe-api.service';\n\n@Injectable()\nexport class StripeFlowService extends BaseNodeFlowService {\n\n @SelectSnapshot(PaymentState.paymentPayload)\n private paymentPayload: NodePaymentInterface;\n\n private stripeApiService = this.injector.get(StripeApiService);\n\n getStripeData(): Observable {\n return this.stripeApiService.paymentPublishKey(\n PaymentMethodEnum.STRIPE,\n this.flow.connectionId,\n this.paymentPayload,\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { combineLatest, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { StripeFlowService } from './stripe-flow.service';\n\nimport IStripe = stripe.Stripe;\n\n@Injectable()\nexport class StripeCommonService {\n constructor(\n private stripeFlowService: StripeFlowService,\n ) {}\n\n initStripe(): Observable {\n return combineLatest([\n this.stripeFlowService.getStripeData(),\n this.addScriptToPage(),\n ]).pipe(\n map(([data]) => Stripe(data.publishKey))\n );\n }\n\n private addScriptToPage(): Observable {\n return new Observable((obs) => {\n const scriptUrl = 'https://js.stripe.com/v3/';\n const scriptId = 'pe-js-stripe-com-v3';\n\n const existing: HTMLScriptElement = document.getElementById(scriptId) as HTMLScriptElement;\n if (existing) {\n obs.next(true);\n } else {\n const script: HTMLScriptElement = document.createElement('script');\n script.id = scriptId;\n script.src = scriptUrl;\n script.onload = () => {\n obs.next(true);\n };\n script.onerror = (err) => {\n obs.error(err);\n };\n document.head.appendChild(script);\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { NodePaymentResponseInterface } from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { NodePaymentResponseDetailsInterface } from '../types';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private env = this.injector.get(PE_ENV);\n private nodeFlowService = this.injector.get(NodeFlowService);\n private localeConstantsService = this.injector.get(LocaleConstantsService);\n\n private preparePaymentData(): Observable {\n const nodeAdditionalPaymentDetails = {\n postbackUrl: `${this.env.frontend.checkoutWrapper}/${this.localeConstantsService.getLang()}/pay/${this.flow.id}/redirect-to-payment`,\n };\n\n return this.nodeFlowService.assignPaymentDetails(nodeAdditionalPaymentDetails);\n }\n\n postPayment(): Observable> {\n return this.preparePaymentData().pipe(\n switchMap(() => this.nodeFlowService.postPayment()),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { FinishModule } from '@pe/checkout/finish';\nimport { ABSTRACT_PAYMENT_SERVICE } from '@pe/checkout/payment';\n\nimport {\n FinishComponent,\n} from './components';\nimport { PaymentService, StripeApiService } from './services';\n\n@NgModule({\n declarations: [\n FinishComponent,\n ],\n imports: [\n CommonModule,\n FinishModule,\n ],\n exports: [\n FinishComponent,\n ],\n providers: [\n StripeApiService,\n {\n provide: ABSTRACT_PAYMENT_SERVICE,\n useClass: PaymentService,\n },\n ],\n})\nexport class SharedModule {\n}\n","import {\n Directive,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\n\nimport { ApiService, NodeApiService } from '@pe/checkout/api';\nimport { AbstractPaymentContainerComponent } from '@pe/checkout/payment';\nimport {\n ErrorInterface,\n FlowInterface,\n PaymentMethodEnum,\n} from '@pe/checkout/types';\n\nimport { StripeApiService } from '../services';\n\n@Directive()\nexport class BaseContainerComponent\n extends AbstractPaymentContainerComponent\n{\n errors: ErrorInterface;\n flow: FlowInterface;\n\n @Input() paymentMethod: PaymentMethodEnum;\n\n @Output() finishModalShown: EventEmitter = new EventEmitter();\n\n protected apiService = this.injector.get(ApiService);\n protected nodeApiService = this.injector.get(NodeApiService);\n protected stripeApiService = this.injector.get(StripeApiService);\n}\n","\n\n \n\n \n\n \n\n \n \n\n\n","import {\n Component, ChangeDetectionStrategy, Input,\n} from '@angular/core';\n\nimport { AbstractFinishComponent } from '@pe/checkout/finish';\nimport { PaymentStatusEnum } from '@pe/checkout/types';\n\nimport { NodePaymentResponseDetailsInterface } from '../../types';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'stripe-wallet-shared-finish',\n templateUrl: './finish.component.html',\n styleUrls: ['./finish.component.scss'],\n})\nexport class FinishComponent extends AbstractFinishComponent {\n\n @Input() isShowingWallet = false;\n @Input() isCheckStatusProcessing = false;\n @Input() isCheckStatusTimeout = false;\n\n get translations() {\n return {\n processingTitle: this.isShowingWallet\n ? $localize `:@@payment-stripe-wallet.inquiry.finish.wallet.title:`\n : $localize `:@@payment-stripe-wallet.inquiry.finish.processing.title:`,\n processingText: this.isShowingWallet\n ? $localize `:@@payment-stripe-wallet.inquiry.finish.wallet.text:`\n : $localize `:@@payment-stripe-wallet.inquiry.finish.processing.text:`,\n };\n }\n\n isStatusSuccess(): boolean {\n return [\n PaymentStatusEnum.STATUS_ACCEPTED,\n PaymentStatusEnum.STATUS_PAID,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusPending(): boolean {\n return [\n PaymentStatusEnum.STATUS_IN_PROCESS,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusFail(): boolean {\n return [\n PaymentStatusEnum.STATUS_FAILED,\n PaymentStatusEnum.STATUS_DECLINED,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusNew(): boolean {\n return [\n PaymentStatusEnum.STATUS_NEW,\n ].indexOf(this.status) >= 0;\n }\n\n getNodeResultDetails(): NodePaymentResponseDetailsInterface {\n return this.nodeResult.paymentDetails;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { AbstractApiService } from '@pe/checkout/api';\nimport { PaymentMethodEnum, NodePaymentPreInitializeData, NodePaymentInterface } from '@pe/checkout/types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StripeApiService extends AbstractApiService {\n\n paymentPreInitialize(\n paymentMethod: PaymentMethodEnum,\n connectionId: string,\n nodeData: NodePaymentInterface,\n ): Observable {\n const url = `${this.env.thirdParty.payments}/api/connection/${connectionId}/action/payment-pre-initialize`;\n\n const data = {\n amount: nodeData.payment.amount,\n deliveryFee: nodeData.payment.deliveryFee,\n };\n\n return this.http.post(url, data).pipe(\n catchError(err => this.logError(err, nodeData.payment.flowId, paymentMethod, { url, method: 'POST' })),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { SelectSnapshot } from '@ngxs-labs/select-snapshot';\nimport { BehaviorSubject, Observable, ReplaySubject } from 'rxjs';\n\nimport { BaseNodeFlowService } from '@pe/checkout/node-api';\nimport { PaymentState } from '@pe/checkout/store';\nimport { NodePaymentInterface, NodePaymentPreInitializeData } from '@pe/checkout/types';\n\nimport { PaymentIntentResponse, NodePaymentDetailsInterface } from '../types';\n\nimport { StripeApiService } from './stripe-api.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StripeFlowService extends BaseNodeFlowService {\n\n @SelectSnapshot(PaymentState.paymentPayload)\n private paymentPayload: NodePaymentInterface;\n\n private stripeApiService = this.injector.get(StripeApiService);\n\n private postPaymentSubject$ = new ReplaySubject(1);\n postPayment$ = this.postPaymentSubject$.asObservable();\n\n public readonly confirmCardPayment$ = new BehaviorSubject(null);\n\n getStripeData(): Observable {\n return this.stripeApiService.paymentPreInitialize(\n this.paymentMethod,\n this.flow.connectionId,\n this.paymentPayload,\n );\n }\n\n postPayment(state: boolean): void {\n this.postPaymentSubject$.next(state);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { switchMap, tap } from 'rxjs/operators';\n\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { NodePaymentResponseInterface } from '@pe/checkout/types';\n\nimport { NodePaymentResponseDetailsInterface } from '../types';\n\nimport { StripeFlowService } from './stripe-flow.service';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private nodeFlowService = this.injector.get(NodeFlowService);\n private stripeFlowService = this.injector.get(StripeFlowService);\n\n postPayment(): Observable> {\n return this.nodeFlowService.assignPaymentDetails({}).pipe(\n switchMap(() => this.nodeFlowService.postPayment().pipe(\n tap((response) => {\n this.stripeFlowService.postPayment(!!response);\n }),\n ))\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { FinishModule as SdkFinishModule } from '@pe/checkout/finish';\nimport { FormUtilsModule as SdkFormUtilsModule } from '@pe/checkout/form-utils';\nimport { ABSTRACT_PAYMENT_SERVICE } from '@pe/checkout/payment';\nimport { UtilsModule } from '@pe/checkout/utils';\n\n\nimport {\n FinishComponent,\n} from './components';\nimport { PaymentService } from './services';\n\n@NgModule({\n declarations: [\n FinishComponent,\n ],\n imports: [\n CommonModule,\n UtilsModule,\n FormsModule,\n ReactiveFormsModule,\n SdkFormUtilsModule,\n SdkFinishModule,\n ],\n exports: [\n FormsModule,\n ReactiveFormsModule,\n SdkFormUtilsModule,\n\n FinishComponent,\n ],\n providers: [\n {\n provide: ABSTRACT_PAYMENT_SERVICE,\n useClass: PaymentService,\n },\n ],\n})\nexport class SharedModule {\n}\n","import {\n OnInit,\n Directive,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { takeUntil, tap } from 'rxjs/operators';\n\nimport { ApiService, NodeApiService } from '@pe/checkout/api';\nimport { AbstractContainerComponent } from '@pe/checkout/payment';\nimport {\n ErrorInterface,\n} from '@pe/checkout/types';\n\nimport { StripeApiService } from '../services';\n\n@Directive()\nexport class BaseContainerComponent extends AbstractContainerComponent implements OnInit {\n errors: ErrorInterface;\n\n @Input() allowBrowserCard: boolean;\n\n @Output() finishModalShown: EventEmitter = new EventEmitter();\n\n isFinishModalShown$: BehaviorSubject = new BehaviorSubject(\n false\n );\n\n protected apiService = this.injector.get(ApiService);\n protected nodeApiService = this.injector.get(NodeApiService);\n protected stripeApiService = this.injector.get(StripeApiService);\n\n ngOnInit(): void {\n this.isFinishModalShown$.pipe(\n tap(value => this.finishModalShown.emit(value)),\n takeUntil(this.destroy$),\n ).subscribe();\n }\n}\n","\n\n \n \n \n\n \n\n \n\n \n\n \n \n\n\n","import {\n AfterViewInit,\n Component,\n ChangeDetectionStrategy,\n ElementRef,\n Output,\n EventEmitter,\n ViewChild,\n NgZone,\n} from '@angular/core';\nimport { fromEvent } from 'rxjs';\nimport { filter, first, skipWhile, switchMap, takeUntil, tap } from 'rxjs/operators';\n\nimport { AbstractFinishComponent } from '@pe/checkout/finish';\nimport { PaymentStatusEnum } from '@pe/checkout/types';\nimport { PeDestroyService } from '@pe/destroy';\n\nimport { NodePaymentDetailsResponseInterface } from '../../types';\n\nconst SPECIFIC_STATUS_BANK_VERIFY: any = 'requires_action';\nconst BANK_VERIFY_COMPLETE_EVENT: any = 'StripeCreditCardVerifyCompleted'; // TODO Take from SDK\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'stripe-shared-finish',\n templateUrl: './finish.component.html',\n styleUrls: ['./finish.component.scss'],\n providers: [PeDestroyService],\n})\nexport class FinishComponent extends AbstractFinishComponent implements AfterViewInit {\n\n @ViewChild('iframe', { static: false }) iframe: ElementRef;\n @Output() updateStatus: EventEmitter = new EventEmitter();\n\n private destroy$ = this.injector.get(PeDestroyService);\n private ngZone = this.injector.get(NgZone);\n\n ngAfterViewInit(): void {\n this.ngZone.onStable.pipe(\n skipWhile(() => !this.isBankIframe),\n first(),\n switchMap(() => fromEvent(window, 'message').pipe(\n filter((e: any) => e && e.data && e.data['event'] === BANK_VERIFY_COMPLETE_EVENT),\n tap(() => this.updateStatus.next())\n )),\n takeUntil(this.destroy$)\n ).subscribe();\n }\n\n isStatusSuccess(): boolean {\n return [\n PaymentStatusEnum.STATUS_ACCEPTED,\n PaymentStatusEnum.STATUS_PAID,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusPending(): boolean {\n return !this.isBankIframe && [\n PaymentStatusEnum.STATUS_IN_PROCESS,\n ].indexOf(this.status) >= 0;\n }\n\n isStatusFail(): boolean {\n return [\n PaymentStatusEnum.STATUS_FAILED,\n PaymentStatusEnum.STATUS_DECLINED,\n ].indexOf(this.status) >= 0;\n }\n\n get isBankIframe(): boolean {\n return this.nodeResult && this.status === PaymentStatusEnum.STATUS_IN_PROCESS &&\n this.specificStatus === SPECIFIC_STATUS_BANK_VERIFY &&\n this.getNodeResultDetails() && !!this.getNodeResultDetails().verifyUrl;\n }\n\n getNodeResultDetails(): NodePaymentDetailsResponseInterface {\n return this.nodeResult.paymentDetails;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport {\n NodePaymentResponseInterface,\n} from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport {\n NodeAdditionalPaymentDetailsInterface,\n NodePaymentDetailsResponseInterface,\n} from '../types';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private env = this.injector.get(PE_ENV);\n private nodeFlowService = this.injector.get(NodeFlowService);\n private localeConstantsService = this.injector.get(LocaleConstantsService);\n\n postPayment(): Observable> {\n const nodeAdditionalPaymentDetails: NodeAdditionalPaymentDetailsInterface = {\n postbackUrl: `${this.env.frontend.checkoutWrapper}/${this.localeConstantsService.getLang()}/pay/${this.flow.id}/stripe-postback`,\n dynamicDescriptor: this.flow.extra?.dynamic_descriptor,\n };\n\n return this.nodeFlowService.assignPaymentDetails(nodeAdditionalPaymentDetails).pipe(\n switchMap(() => this.nodeFlowService.postPayment()),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { FinishModule } from '@pe/checkout/finish';\nimport { ABSTRACT_PAYMENT_SERVICE } from '@pe/checkout/payment';\nimport { PluginsModule } from '@pe/checkout/plugins';\n\nimport {\n FinishComponent,\n} from './components';\nimport { PaymentService } from './services';\n\n@NgModule({\n declarations: [\n FinishComponent,\n ],\n imports: [\n CommonModule,\n FinishModule,\n PluginsModule,\n ],\n exports: [\n FinishComponent,\n ],\n providers: [\n {\n provide: ABSTRACT_PAYMENT_SERVICE,\n useClass: PaymentService,\n },\n ],\n})\nexport class SharedModule {\n}\n","import { Directive } from '@angular/core';\n\nimport { ApiService, NodeApiService } from '@pe/checkout/api';\nimport { AbstractContainerComponent } from '@pe/checkout/payment';\nimport { ErrorInterface } from '@pe/checkout/types';\n\n@Directive()\nexport abstract class BaseContainerComponent extends AbstractContainerComponent {\n\n errorMessage: string = null;\n errors: ErrorInterface;\n\n protected apiService = this.injector.get(ApiService);\n protected nodeApiService = this.injector.get(NodeApiService);\n\n}\n","import { Directive } from '@angular/core';\n\nimport { AbstractContainerComponent } from '@pe/checkout/payment';\nimport { ErrorInterface } from '@pe/checkout/types';\n\n@Directive()\nexport class BaseContainerComponent extends AbstractContainerComponent {\n errorMessage: string = null;\n errors: ErrorInterface;\n}\n","import { Injectable } from '@angular/core';\n\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport {\n NodeAdditionalPaymentDetailsInterface,\n NodePaymentDetailsResponseInterface,\n} from '../types';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private env = this.injector.get(PE_ENV);\n private nodeFlowService = this.injector.get(NodeFlowService);\n private localeConstantsService = this.injector.get(LocaleConstantsService);\n\n postPayment() {\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper: string = this.env.frontend.checkoutWrapper;\n const nodeAdditionalPaymentDetails: NodeAdditionalPaymentDetailsInterface = {\n frontendFinishUrl: `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`,\n frontendCancelUrl: `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-choose-payment`,\n };\n\n this.nodeFlowService.assignPaymentDetails(nodeAdditionalPaymentDetails);\n\n return this.nodeFlowService.postPayment();\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map, switchMap, take, tap } from 'rxjs/operators';\n\nimport { NodeApiService } from '@pe/checkout/api';\nimport { TopLocationService } from '@pe/checkout/location';\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { ExternalRedirectStorage } from '@pe/checkout/storage';\nimport { PaymentState } from '@pe/checkout/store';\nimport { NodeShopUrlsInterface } from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { PaymentDetails, PaymentResponse } from '../models';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private env = inject(PE_ENV);\n private nodeApiService = inject(NodeApiService);\n private nodeFlowService = inject(NodeFlowService);\n private localeConstantsService = inject(LocaleConstantsService);\n private externalRedirectStorage = inject(ExternalRedirectStorage);\n private topLocationService = inject(TopLocationService);\n\n postPayment() {\n return this.preparePayment().pipe(\n switchMap(() =>\n this.nodeFlowService.postPayment()),\n );\n }\n\n private preparePayment(): Observable {\n return this.nodeApiService.getShopUrls(this.flow).pipe(\n tap((shopUrls) => {\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper: string = this.env.frontend.checkoutWrapper;\n const successUrl = shopUrls.successUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`;\n const cancelUrl = shopUrls.cancelUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-choose-payment`;\n\n const nodePaymentDetails: Partial = {\n frontendSuccessUrl: successUrl,\n frontendFinishUrl: successUrl,\n frontendFailureUrl: cancelUrl,\n frontendCancelUrl: cancelUrl,\n forceRedirect: true,\n };\n\n this.nodeFlowService.assignPaymentDetails(nodePaymentDetails);\n\n return this.nodeFlowService.getPaymentData();\n }),\n );\n }\n\n public redirect(): void {\n const paymentResponse = this.store.selectSnapshot(PaymentState.response);\n if (paymentResponse?.paymentDetails?.redirectUrl) {\n this.externalRedirectStorage.saveDataBeforeRedirect(this.flow).pipe(\n tap(() => this.topLocationService.href = paymentResponse.paymentDetails.redirectUrl),\n map(() => paymentResponse),\n take(1)\n ).subscribe();\n } else {\n throw new Error($localize `:@@payment-openbank.errors.finish.emptyRedirectUrl:`);\n }\n\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Store } from '@ngxs/store';\nimport { Observable, of } from 'rxjs';\nimport { map, switchMap, tap } from 'rxjs/operators';\n\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { FlowState } from '@pe/checkout/store';\nimport { PaymentTermsDocument, PaymentTermsDocumentMetadata } from '@pe/checkout/types';\nimport { camelCase } from '@pe/checkout/utils/camelcase';\n\nimport { ZiniaViewTerms } from '../models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TermsService {\n\n private readonly cache = new Map();\n\n constructor(\n private store: Store,\n private nodeFlowService: NodeFlowService,\n ) {}\n\n getTerms(flowId: string): Observable {\n return this.store.selectOnce(FlowState.flow).pipe(\n map(flow => flow.connectionId),\n switchMap((id) => {\n const data = this.cache.get(`${flowId}-${id}`);\n\n return data ? of(data) : this.fetchTerms(flowId, id);\n }),\n );\n }\n\n private fetchTerms(flowId: string, id: string): Observable {\n return this.nodeFlowService.getTerms(id).pipe(\n map(terms => Object.entries(terms).reduce((acc, [key, value]: [string, PaymentTermsDocument[]]) => ({\n ...acc,\n [key]: value.map(item => ({\n label: this.parseText(item.text, item.metadata),\n required: item.required,\n documentId: item.documentId,\n })),\n }), {})),\n tap((terms) => {\n this.cache.set(`${flowId}-${id}`, terms);\n }),\n );\n }\n\n\n private parseText(text: string, metadata: PaymentTermsDocumentMetadata) {\n const camelCasedMeta = camelCase(metadata);\n let parsedText = text;\n\n Object.entries(camelCasedMeta.assetsLinks).forEach(([key, value]) => {\n if (/^(http:\\/\\/|https:\\/\\/)/.test(value as string)) {\n parsedText = parsedText\n .replace(`<${key}>`, ``)\n .replace(`${key}>`, '');\n } else if (/\\S+@\\S+/.test(value as string)) {\n parsedText = parsedText\n .replace(`<${key}>`, ``)\n .replace(`${key}>`, '');\n }\n });\n\n return parsedText;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { AbstractApiService, ApiErrorType } from '@pe/checkout/api';\nimport {\n NodePaymentInterface,\n NodePaymentResponseInterface,\n PaymentMethodEnum,\n} from '@pe/checkout/types';\n\n@Injectable()\nexport class ZiniaBNPLApiService extends AbstractApiService {\n\n optVerify(\n flowId: string,\n paymentMethod: PaymentMethodEnum,\n connectionId: string,\n data: any,\n ): Observable> {\n const url = `${this.env.thirdParty.payments}/api/connection/${connectionId}/action/verify-otp-code`;\n\n return this.http.post>(url, data).pipe(\n catchError(err => this.logError(err, flowId, paymentMethod, { url, method: 'POST' }, ApiErrorType.ErrorSubmit))\n );\n }\n\n updateInfo(\n flowId: string,\n paymentMethod: PaymentMethodEnum,\n connectionId: string,\n paymentId: string,\n nodeData: NodePaymentInterface,\n ): Observable> {\n const url = `${this.env.thirdParty.payments}/api/connection/${connectionId}/action/update-details`;\n\n return this.http.post>(\n url,\n { ...nodeData, paymentId },\n ).pipe(\n catchError(err => this.logError(err, flowId, paymentMethod, { url, method: 'POST' }, ApiErrorType.ErrorSubmit)),\n );\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { SelectSnapshot } from '@ngxs-labs/select-snapshot';\nimport { Store } from '@ngxs/store';\nimport { Observable } from 'rxjs';\nimport { map, switchMap } from 'rxjs/operators';\n\nimport { BaseNodeFlowService } from '@pe/checkout/node-api';\nimport { GetApiCallData, PatchPaymentResponse, PaymentState, SetPaymentComplete } from '@pe/checkout/store';\nimport {\n NodePaymentInterface,\n NodePaymentResponseInterface,\n PaymentMethodEnum,\n} from '@pe/checkout/types';\n\nimport { ZiniaBNPLApiService } from './zinia-bnpl-api.service';\n\n@Injectable()\nexport class ZiniaBnplFlowService extends BaseNodeFlowService {\n\n @SelectSnapshot(PaymentState.paymentPayload)\n private paymentPayload: NodePaymentInterface;\n\n private readonly ziniaBNPLApiService = inject(ZiniaBNPLApiService);\n private readonly store = inject(Store);\n\n optVerify(\n flowId: string, paymentMethod: PaymentMethodEnum, data: any\n ): Observable> {\n return this.ziniaBNPLApiService.optVerify(\n flowId,\n paymentMethod,\n this.flow.connectionId,\n data\n ).pipe(\n switchMap(response => response.payment?.apiCallId\n ? this.store.dispatch(new GetApiCallData(response))\n : this.store.dispatch(new PatchPaymentResponse(response))\n ),\n map(() => this.store.selectSnapshot>(PaymentState.response))\n );\n }\n\n updateInfo(): Observable> {\n return this.store.selectOnce(PaymentState.response).pipe(\n switchMap(response => this.ziniaBNPLApiService.updateInfo(\n this.flow.id,\n this.paymentMethod,\n this.flow.connectionId,\n response.id,\n this.paymentPayload,\n ))\n ).pipe(\n switchMap(response => response.payment.apiCallId\n ? this.store.dispatch([new PatchPaymentResponse(response), new GetApiCallData(response)])\n : this.store.dispatch(new PatchPaymentResponse(response))\n ),\n switchMap(() => this.store.dispatch(new SetPaymentComplete())),\n map(() => this.store.selectSnapshot(PaymentState.response)),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DeviceUUID } from 'device-uuid';\nimport { DeviceDetectorService } from 'ngx-device-detector';\n\nimport { BrowserInfoInterface, DeviceInfoInterface } from '../models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ZiniaBnplUtilsService {\n private readonly deviceUUID = new DeviceUUID();\n\n constructor(\n private deviceService: DeviceDetectorService,\n ) {\n }\n\n getDeviceInfo(): DeviceInfoInterface {\n return {\n deviceUuid: this.deviceUUID.get(),\n ...this.deviceService.isMobile()\n ? {\n mobileDeviceInfo: {\n device: this.deviceService.device,\n version: this.deviceUUID.version,\n },\n }\n : {\n webDeviceInfo: {\n version: this.deviceUUID.version,\n },\n },\n };\n }\n\n getBrowserInfo(): BrowserInfoInterface {\n return {\n javaEnabled: navigator.javaEnabled(),\n javascriptEnabled: true,\n cookiesEnabled: navigator.cookieEnabled,\n language: navigator.language || 'en-us',\n platform: navigator.platform,\n screenColorDepth: window.screen.colorDepth,\n screenHeight: window.screen.height,\n screenWidth: window.screen.width,\n timeZone: new Date().getTimezoneOffset(),\n userAgent: navigator.userAgent,\n acceptHeader: '*/*',\n };\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map, switchMap, tap } from 'rxjs/operators';\n\nimport { NodeApiService } from '@pe/checkout/api';\nimport { TopLocationService } from '@pe/checkout/location';\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { PaymentState } from '@pe/checkout/store';\nimport {\n FlowInterface,\n NodePaymentResponseInterface,\n NodeShopUrlsInterface,\n PaymentStatusEnum,\n} from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { PaymentDetails, PaymentResponse } from '../models';\nimport { ZiniaBnplUtilsService } from '../services';\n\n@Injectable()\nexport class ZiniaPaymentService extends AbstractPaymentService {\n\n private env = inject(PE_ENV);\n private nodeApiService = inject(NodeApiService);\n private nodeFlowService = inject(NodeFlowService);\n private localeConstantsService = inject(LocaleConstantsService);\n private ziniaBNPLUtilsService = inject(ZiniaBnplUtilsService);\n private topLocationService = inject(TopLocationService);\n\n public postPayment() {\n return this.preparePayment(this.flow).pipe(\n switchMap(() => this.nodeFlowService.postPayment()),\n );\n }\n\n public redirect(): void {\n const { successUrl, cancelUrl, pendingUrl } = this.flow.apiCall || {};\n const paymentResponse = this.store.selectSnapshot(PaymentState.response);\n\n if (this.isStatusSuccess(paymentResponse) && successUrl) {\n this.topLocationService.href = successUrl;\n } else if (this.isStatusFail(paymentResponse) && cancelUrl) {\n this.topLocationService.href = cancelUrl;\n } else if (this.isStatusPending(paymentResponse) && pendingUrl) {\n this.topLocationService.href = pendingUrl;\n }\n }\n\n public preparePayment(flow: FlowInterface): Observable {\n return this.nodeApiService.getShopUrls(flow).pipe(\n tap((shopUrls) => {\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper: string = this.env.frontend.checkoutWrapper;\n const successUrl = shopUrls.successUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`;\n const cancelUrl = shopUrls.cancelUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-choose-payment`;\n\n const nodePaymentDetails: Partial = {\n frontendSuccessUrl: successUrl,\n frontendFinishUrl: successUrl,\n frontendFailureUrl: cancelUrl,\n frontendCancelUrl: cancelUrl,\n forceRedirect: false,\n isPhoneValidated: true,\n deviceInfo: this.ziniaBNPLUtilsService.getDeviceInfo(),\n browserInfo: this.ziniaBNPLUtilsService.getBrowserInfo(),\n };\n\n return this.nodeFlowService.assignPaymentDetails(nodePaymentDetails).pipe(\n map(() => this.nodeFlowService.getPaymentData()),\n );\n }),\n );\n }\n\n private isStatusSuccess(paymentResponse: NodePaymentResponseInterface): boolean {\n return [\n PaymentStatusEnum.STATUS_ACCEPTED,\n PaymentStatusEnum.STATUS_PAID,\n ].includes(paymentResponse.payment.status);\n }\n\n private isStatusFail(paymentResponse: NodePaymentResponseInterface): boolean {\n return [\n PaymentStatusEnum.STATUS_FAILED,\n PaymentStatusEnum.STATUS_DECLINED,\n ].includes(paymentResponse.payment.status);\n }\n\n private isStatusPending(paymentResponse: NodePaymentResponseInterface): boolean {\n return [\n PaymentStatusEnum.STATUS_IN_PROCESS,\n ].includes(paymentResponse.payment.status) && !paymentResponse.paymentDetails.verifyValue;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Store } from '@ngxs/store';\nimport { Observable, of } from 'rxjs';\nimport { map, switchMap, tap } from 'rxjs/operators';\n\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { StorageService } from '@pe/checkout/storage';\nimport { FlowState } from '@pe/checkout/store';\nimport { PaymentTermsDocument, PaymentTermsDocumentMetadata } from '@pe/checkout/types';\nimport { camelCase } from '@pe/checkout/utils/camelcase';\n\nimport { ZiniaViewTerms } from '../models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TermsService {\n\n constructor(\n private store: Store,\n private nodeFlowService: NodeFlowService,\n private storage: StorageService\n ) {}\n\n getTerms(flowId: string): Observable {\n return this.store.selectOnce(FlowState.flow).pipe(\n map(flow => flow.connectionId),\n switchMap((id) => {\n const data = this.getFromCache(flowId, id);\n\n return data ? of(data) : this.fetchTerms(flowId, id);\n }),\n );\n }\n\n private fetchTerms(flowId: string, id: string): Observable {\n return this.nodeFlowService.getTerms(id).pipe(\n map(terms => Object.entries(terms).reduce((acc, [key, value]: [string, PaymentTermsDocument[]]) => ({\n ...acc,\n [key]: value.map(item => ({\n label: this.parseText(item.text, item.metadata),\n required: item.required,\n documentId: item.documentId,\n })),\n }), {})),\n tap((terms) => {\n this.cache(flowId, id, terms);\n }),\n );\n }\n\n private cache(flowId: string, connectionId: string, data: ZiniaViewTerms): void {\n const key = `${flowId}-${connectionId}`;\n\n this.storage.set(key, JSON.stringify(data));\n }\n\n private getFromCache(flowId: string, connectionId: string): ZiniaViewTerms {\n const key = `${flowId}-${connectionId}`;\n\n return JSON.parse(this.storage.get(key));\n }\n\n private parseText(text: string, metadata: PaymentTermsDocumentMetadata) {\n const camelCasedMeta = camelCase(metadata);\n let parsedText = text;\n\n Object.entries(camelCasedMeta.assetsLinks).forEach(([key, value]) => {\n if (/^(http:\\/\\/|https:\\/\\/)/.test(value as string)) {\n parsedText = parsedText\n .replace(`<${key}>`, ``)\n .replace(`${key}>`, '');\n } else if (/\\S+@\\S+/.test(value as string)) {\n parsedText = parsedText\n .replace(`<${key}>`, ``)\n .replace(`${key}>`, '');\n }\n });\n\n return parsedText;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DeviceUUID } from 'device-uuid';\nimport { DeviceDetectorService } from 'ngx-device-detector';\n\nimport { BrowserInfoInterface, DeviceInfoInterface } from '../models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ZiniaBnplUtilsService {\n private readonly deviceUUID = new DeviceUUID();\n\n constructor(\n private deviceService: DeviceDetectorService,\n ) {\n }\n\n getDeviceInfo(): DeviceInfoInterface {\n return {\n deviceUuid: this.deviceUUID.get(),\n ...this.deviceService.isMobile()\n ? {\n mobileDeviceInfo: {\n device: this.deviceService.device,\n version: this.deviceUUID.version,\n },\n }\n : {\n webDeviceInfo: {\n version: this.deviceUUID.version,\n },\n },\n };\n }\n\n getBrowserInfo(): BrowserInfoInterface {\n return {\n javaEnabled: navigator.javaEnabled(),\n javascriptEnabled: true,\n cookiesEnabled: navigator.cookieEnabled,\n language: navigator.language || 'en-us',\n platform: navigator.platform,\n screenColorDepth: window.screen.colorDepth,\n screenHeight: window.screen.height,\n screenWidth: window.screen.width,\n timeZone: new Date().getTimezoneOffset(),\n userAgent: navigator.userAgent,\n acceptHeader: '*/*',\n };\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { switchMap, tap } from 'rxjs/operators';\n\nimport { NodeApiService } from '@pe/checkout/api';\nimport { TopLocationService } from '@pe/checkout/location';\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { PaymentState } from '@pe/checkout/store';\nimport {\n FlowInterface,\n NodePaymentResponseInterface,\n NodeShopUrlsInterface,\n PaymentStatusEnum,\n} from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { PaymentDetails, PaymentResponse } from '../models';\n\nimport { ZiniaBnplUtilsService } from './zinia-bnpl-utils.service';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private env = inject(PE_ENV);\n private nodeApiService = inject(NodeApiService);\n private nodeFlowService = inject(NodeFlowService);\n private localeConstantsService = inject(LocaleConstantsService);\n private topLocationService = inject(TopLocationService);\n private ziniaBNPLUtilsService = inject(ZiniaBnplUtilsService);\n\n public postPayment() {\n return this.preparePayment(this.flow).pipe(\n switchMap(() => this.nodeFlowService.postPayment()),\n );\n }\n\n public redirect(): void {\n const { successUrl, cancelUrl, pendingUrl } = this.flow.apiCall || {};\n const paymentResponse = this.store.selectSnapshot(PaymentState.response);\n\n if (this.isStatusSuccess(paymentResponse) && successUrl) {\n this.topLocationService.href = successUrl;\n } else if (this.isStatusFail(paymentResponse) && cancelUrl) {\n this.topLocationService.href = cancelUrl;\n } else if (this.isStatusPending(paymentResponse) && pendingUrl) {\n this.topLocationService.href = pendingUrl;\n }\n }\n\n private preparePayment(flow: FlowInterface): Observable {\n return this.nodeApiService.getShopUrls(flow).pipe(\n tap((shopUrls) => {\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper: string = this.env.frontend.checkoutWrapper;\n const successUrl = shopUrls.successUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`;\n const cancelUrl = shopUrls.cancelUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-choose-payment`;\n\n const nodePaymentDetails: Partial = {\n frontendSuccessUrl: successUrl,\n frontendFinishUrl: successUrl,\n frontendFailureUrl: cancelUrl,\n frontendCancelUrl: cancelUrl,\n forceRedirect: false,\n deviceInfo: this.ziniaBNPLUtilsService.getDeviceInfo(),\n browserInfo: this.ziniaBNPLUtilsService.getBrowserInfo(),\n };\n\n this.nodeFlowService.assignPaymentDetails(nodePaymentDetails);\n }),\n );\n }\n\n private isStatusSuccess(paymentResponse: NodePaymentResponseInterface): boolean {\n return [\n PaymentStatusEnum.STATUS_ACCEPTED,\n PaymentStatusEnum.STATUS_PAID,\n ].includes(paymentResponse.payment.status);\n }\n\n private isStatusFail(paymentResponse: NodePaymentResponseInterface): boolean {\n return [\n PaymentStatusEnum.STATUS_FAILED,\n PaymentStatusEnum.STATUS_DECLINED,\n ].includes(paymentResponse.payment.status);\n }\n\n private isStatusPending(paymentResponse: NodePaymentResponseInterface): boolean {\n return [\n PaymentStatusEnum.STATUS_IN_PROCESS,\n ].includes(paymentResponse.payment.status) && !paymentResponse.paymentDetails.verifyValue;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Store } from '@ngxs/store';\nimport { Observable, of } from 'rxjs';\nimport { map, switchMap, tap } from 'rxjs/operators';\n\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { FlowState } from '@pe/checkout/store';\nimport { PaymentTermsDocument, PaymentTermsDocumentMetadata } from '@pe/checkout/types';\nimport { camelCase } from '@pe/checkout/utils/camelcase';\n\nimport { ZiniaViewTerms } from '../models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TermsService {\n\n private readonly cache = new Map();\n\n constructor(\n private store: Store,\n private nodeFlowService: NodeFlowService,\n ) {}\n\n getTerms(flowId: string): Observable {\n return this.store.selectOnce(FlowState.flow).pipe(\n map(flow => flow.connectionId),\n switchMap((id) => {\n const data = this.cache.get(`${flowId}-${id}`);\n\n return data ? of(data) : this.fetchTerms(flowId, id);\n }),\n );\n }\n\n private fetchTerms(flowId: string, id: string): Observable {\n return this.nodeFlowService.getTerms(id).pipe(\n map(terms => Object.entries(terms).reduce((acc, [key, value]: [string, PaymentTermsDocument[]]) => ({\n ...acc,\n [key]: value.map(item => ({\n label: this.parseText(item.text, item.metadata),\n required: item.required,\n documentId: item.documentId,\n })),\n }), {})),\n tap((terms) => {\n this.cache.set(`${flowId}-${id}`, terms);\n }),\n );\n }\n\n private parseText(text: string, metadata: PaymentTermsDocumentMetadata) {\n const camelCasedMeta = camelCase(metadata);\n let parsedText = text;\n\n Object.entries(camelCasedMeta.assetsLinks).forEach(([key, value]) => {\n if (/^(http:\\/\\/|https:\\/\\/)/.test(value as string)) {\n parsedText = parsedText\n .replace(`<${key}>`, ``)\n .replace(`${key}>`, '');\n } else if (/\\S+@\\S+/.test(value as string)) {\n parsedText = parsedText\n .replace(`<${key}>`, ``)\n .replace(`${key}>`, '');\n }\n });\n\n return parsedText;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { AbstractApiService, ApiErrorType } from '@pe/checkout/api';\nimport {\n NodePaymentInterface,\n NodePaymentResponseInterface,\n PaymentMethodEnum,\n} from '@pe/checkout/types';\n\n@Injectable()\nexport class ZiniaBnplApiService extends AbstractApiService {\n\n optVerify(\n flowId: string,\n paymentMethod: PaymentMethodEnum,\n connectionId: string,\n data: any,\n ): Observable> {\n const url = `${this.env.thirdParty.payments}/api/connection/${connectionId}/action/verify-otp-code`;\n\n return this.http.post>(url, data).pipe(\n catchError(err => this.logError(err, flowId, paymentMethod, { url, method: 'POST' }, ApiErrorType.ErrorSubmit))\n );\n }\n\n updateInfo(\n flowId: string,\n paymentMethod: PaymentMethodEnum,\n connectionId: string,\n paymentId: string,\n nodeData: NodePaymentInterface,\n ): Observable> {\n const url = `${this.env.thirdParty.payments}/api/connection/${connectionId}/action/update-details`;\n\n return this.http.post>(\n url,\n { ...nodeData, paymentId },\n ).pipe(\n catchError(err => this.logError(err, flowId, paymentMethod, { url, method: 'POST' }, ApiErrorType.ErrorSubmit)),\n );\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { SelectSnapshot } from '@ngxs-labs/select-snapshot';\nimport { Store } from '@ngxs/store';\nimport { Observable } from 'rxjs';\nimport { map, switchMap } from 'rxjs/operators';\n\nimport { BaseNodeFlowService } from '@pe/checkout/node-api';\nimport { GetApiCallData, PatchPaymentResponse, PaymentState, SetPaymentComplete } from '@pe/checkout/store';\nimport {\n NodePaymentInterface,\n NodePaymentResponseInterface,\n PaymentMethodEnum,\n} from '@pe/checkout/types';\n\nimport { ZiniaBnplApiService } from './zinia-bnpl-api.service';\n\n@Injectable()\nexport class ZiniaBnplFlowService extends BaseNodeFlowService {\n\n @SelectSnapshot(PaymentState.paymentPayload)\n private paymentPayload: NodePaymentInterface;\n\n private readonly ziniaBNPLApiService = inject(ZiniaBnplApiService);\n private readonly store = inject(Store);\n\n optVerify(\n flowId: string, paymentMethod: PaymentMethodEnum, data: any\n ): Observable> {\n return this.ziniaBNPLApiService.optVerify(\n flowId,\n paymentMethod,\n this.flow.connectionId,\n data\n ).pipe(\n switchMap(response => response.payment?.apiCallId\n ? this.store.dispatch(new GetApiCallData(response))\n : this.store.dispatch(new PatchPaymentResponse(response))\n ),\n map(() => this.store.selectSnapshot>(PaymentState.response))\n );\n }\n\n updateInfo(): Observable> {\n return this.store.selectOnce(PaymentState.response).pipe(\n switchMap(response => this.ziniaBNPLApiService.updateInfo(\n this.flow.id,\n this.paymentMethod,\n this.flow.connectionId,\n response.id,\n this.paymentPayload,\n ).pipe(\n switchMap(response => response.payment.apiCallId\n ? this.store.dispatch([new PatchPaymentResponse(response), new GetApiCallData(response)])\n : this.store.dispatch(new PatchPaymentResponse(response))\n ),\n switchMap(() => this.store.dispatch(new SetPaymentComplete())),\n map(() => this.store.selectSnapshot(PaymentState.response)),\n ))\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DeviceUUID } from 'device-uuid';\nimport { DeviceDetectorService } from 'ngx-device-detector';\n\nimport { BrowserInfoInterface, DeviceInfoInterface } from '../models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ZiniaBnplUtilsService {\n private readonly deviceUUID = new DeviceUUID();\n\n constructor(\n private deviceService: DeviceDetectorService,\n ) {\n }\n\n getDeviceInfo(): DeviceInfoInterface {\n return {\n deviceUuid: this.deviceUUID.get(),\n ...this.deviceService.isMobile()\n ? {\n mobileDeviceInfo: {\n device: this.deviceService.device,\n version: this.deviceUUID.version,\n },\n }\n : {\n webDeviceInfo: {\n version: this.deviceUUID.version,\n },\n },\n };\n }\n\n getBrowserInfo(): BrowserInfoInterface {\n return {\n javaEnabled: navigator.javaEnabled(),\n javascriptEnabled: true,\n cookiesEnabled: navigator.cookieEnabled,\n language: navigator.language || 'en-us',\n platform: navigator.platform,\n screenColorDepth: window.screen.colorDepth,\n screenHeight: window.screen.height,\n screenWidth: window.screen.width,\n timeZone: new Date().getTimezoneOffset(),\n userAgent: navigator.userAgent,\n acceptHeader: '*/*',\n };\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map, switchMap, tap } from 'rxjs/operators';\n\nimport { NodeApiService } from '@pe/checkout/api';\nimport { TopLocationService } from '@pe/checkout/location';\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { PaymentState } from '@pe/checkout/store';\nimport {\n FlowInterface,\n NodePaymentResponseInterface,\n NodeShopUrlsInterface,\n PaymentStatusEnum,\n} from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { PaymentDetails, PaymentResponse } from '../models';\n\nimport { ZiniaBnplUtilsService } from '.';\n\n@Injectable()\nexport class ZiniaPaymentService extends AbstractPaymentService {\n\n private env = inject(PE_ENV);\n private nodeApiService = inject(NodeApiService);\n private nodeFlowService = inject(NodeFlowService);\n private localeConstantsService = inject(LocaleConstantsService);\n private ziniaBNPLUtilsService = inject(ZiniaBnplUtilsService);\n private topLocationService = inject(TopLocationService);\n\n postPayment() {\n return this.preparePayment(this.flow).pipe(\n switchMap(() => this.nodeFlowService.postPayment()),\n );\n }\n\n public preparePayment(flow: FlowInterface): Observable {\n return this.nodeApiService.getShopUrls(flow).pipe(\n tap((shopUrls) => {\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper: string = this.env.frontend.checkoutWrapper;\n const successUrl = shopUrls.successUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`;\n const cancelUrl = shopUrls.cancelUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-choose-payment`;\n\n const nodePaymentDetails: Partial = {\n frontendSuccessUrl: successUrl,\n frontendFinishUrl: successUrl,\n frontendFailureUrl: cancelUrl,\n frontendCancelUrl: cancelUrl,\n forceRedirect: false,\n isPhoneValidated: true,\n deviceInfo: this.ziniaBNPLUtilsService.getDeviceInfo(),\n browserInfo: this.ziniaBNPLUtilsService.getBrowserInfo(),\n };\n\n return this.nodeFlowService.assignPaymentDetails(nodePaymentDetails).pipe(\n map(() => this.nodeFlowService.getPaymentData()),\n );\n }),\n );\n }\n\n public redirect(): void {\n const { successUrl, cancelUrl, pendingUrl } = this.flow.apiCall || {};\n const paymentResponse = this.store.selectSnapshot(PaymentState.response);\n\n if (this.isStatusSuccess(paymentResponse) && successUrl) {\n this.topLocationService.href = successUrl;\n } else if (this.isStatusFail(paymentResponse) && cancelUrl) {\n this.topLocationService.href = cancelUrl;\n } else if (this.isStatusPending(paymentResponse) && pendingUrl) {\n this.topLocationService.href = pendingUrl;\n }\n }\n\n private isStatusSuccess(paymentResponse: NodePaymentResponseInterface): boolean {\n return [\n PaymentStatusEnum.STATUS_ACCEPTED,\n PaymentStatusEnum.STATUS_PAID,\n ].includes(paymentResponse.payment.status);\n }\n\n private isStatusFail(paymentResponse: NodePaymentResponseInterface): boolean {\n return [\n PaymentStatusEnum.STATUS_FAILED,\n PaymentStatusEnum.STATUS_DECLINED,\n ].includes(paymentResponse.payment.status);\n }\n\n private isStatusPending(paymentResponse: NodePaymentResponseInterface): boolean {\n return [\n PaymentStatusEnum.STATUS_IN_PROCESS,\n ].includes(paymentResponse.payment.status) && !paymentResponse.paymentDetails.verifyValue;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Store } from '@ngxs/store';\nimport { Observable, of } from 'rxjs';\nimport { map, switchMap, tap } from 'rxjs/operators';\n\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { FlowState } from '@pe/checkout/store';\nimport { PaymentTermsDocument, PaymentTermsDocumentMetadata } from '@pe/checkout/types';\nimport { camelCase } from '@pe/checkout/utils/camelcase';\n\nimport { ZiniaViewTerms } from '../models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TermsService {\n\n private readonly cache = new Map();\n\n constructor(\n private store: Store,\n private nodeFlowService: NodeFlowService,\n ) {}\n\n getTerms(flowId: string): Observable {\n return this.store.selectOnce(FlowState.flow).pipe(\n map(flow => flow.connectionId),\n switchMap((id) => {\n const data = this.cache.get(`${flowId}-${id}`);\n\n return data ? of(data) : this.fetchTerms(flowId, id);\n }),\n );\n }\n\n private fetchTerms(flowId: string, id: string): Observable {\n return this.nodeFlowService.getTerms(id).pipe(\n map(terms => Object.entries(terms).reduce((acc, [key, value]: [string, PaymentTermsDocument[]]) => ({\n ...acc,\n [key]: value.map(item => ({\n label: this.parseText(item.text, item.metadata),\n required: item.required,\n documentId: item.documentId,\n })),\n }), {})),\n tap((terms) => {\n this.cache.set(`${flowId}-${id}`, terms);\n }),\n );\n }\n\n private parseText(text: string, metadata: PaymentTermsDocumentMetadata) {\n const camelCasedMeta = camelCase(metadata);\n let parsedText = text;\n\n Object.entries(camelCasedMeta.assetsLinks).forEach(([key, value]) => {\n if (/^(http:\\/\\/|https:\\/\\/)/.test(value)) {\n parsedText = parsedText\n .replace(`<${key}>`, ``)\n .replace(`${key}>`, '');\n } else if (/\\S+@\\S+/.test(value)) {\n parsedText = parsedText\n .replace(`<${key}>`, ``)\n .replace(`${key}>`, '');\n }\n });\n\n return parsedText;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { AbstractApiService, ApiErrorType } from '@pe/checkout/api';\nimport {\n NodePaymentInterface,\n NodePaymentResponseInterface,\n PaymentMethodEnum,\n} from '@pe/checkout/types';\n\n@Injectable()\nexport class ZiniaBnplApiService extends AbstractApiService {\n\n optVerify(\n flowId: string,\n paymentMethod: PaymentMethodEnum,\n connectionId: string,\n data: any,\n ): Observable> {\n const url = `${this.env.thirdParty.payments}/api/connection/${connectionId}/action/verify-otp-code`;\n\n return this.http.post>(url, data).pipe(\n catchError(err => this.logError(err, flowId, paymentMethod, { url, method: 'POST' }, ApiErrorType.ErrorSubmit))\n );\n }\n\n updateInfo(\n flowId: string,\n paymentMethod: PaymentMethodEnum,\n connectionId: string,\n paymentId: string,\n nodeData: NodePaymentInterface,\n ): Observable> {\n const url = `${this.env.thirdParty.payments}/api/connection/${connectionId}/action/update-details`;\n\n return this.http.post>(\n url,\n { ...nodeData, paymentId },\n ).pipe(\n catchError(err => this.logError(err, flowId, paymentMethod, { url, method: 'POST' }, ApiErrorType.ErrorSubmit)),\n );\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Store } from '@ngxs/store';\nimport { Observable } from 'rxjs';\nimport { map, switchMap, withLatestFrom } from 'rxjs/operators';\n\nimport { BaseNodeFlowService } from '@pe/checkout/node-api';\nimport { GetApiCallData, PatchPaymentResponse, PaymentState, SetPaymentComplete } from '@pe/checkout/store';\nimport {\n NodePaymentResponseInterface,\n PaymentMethodEnum,\n} from '@pe/checkout/types';\n\nimport { ZiniaBnplApiService } from './zinia-bnpl-api.service';\n\n@Injectable()\nexport class ZiniaBnplFlowService extends BaseNodeFlowService {\n private readonly ziniaBNPLApiService = inject(ZiniaBnplApiService);\n private readonly store = inject(Store);\n\n optVerify(\n flowId: string, paymentMethod: PaymentMethodEnum, data: any\n ): Observable> {\n return this.ziniaBNPLApiService.optVerify(\n flowId,\n paymentMethod,\n this.flow.connectionId,\n data\n ).pipe(\n switchMap(response => response.payment?.apiCallId\n ? this.store.dispatch(new GetApiCallData(response))\n : this.store.dispatch(new PatchPaymentResponse(response))\n ),\n map(() => this.store.selectSnapshot>(PaymentState.response))\n );\n }\n\n updateInfo(): Observable> {\n return this.store.selectOnce(PaymentState.response).pipe(\n withLatestFrom(this.store.selectOnce(PaymentState.paymentPayload)),\n switchMap(([resp, paymentPayload]) => this.ziniaBNPLApiService.updateInfo(\n this.flow.id,\n this.paymentMethod,\n this.flow.connectionId,\n resp.id,\n paymentPayload,\n ).pipe(\n switchMap(response => response.payment.apiCallId\n ? this.store.dispatch([new PatchPaymentResponse(response), new GetApiCallData(response)])\n : this.store.dispatch(new PatchPaymentResponse(response))\n ),\n switchMap(() => this.store.dispatch(new SetPaymentComplete())),\n map(() => this.store.selectSnapshot(PaymentState.response)),\n ))\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DeviceUUID } from 'device-uuid';\nimport { DeviceDetectorService } from 'ngx-device-detector';\n\nimport { BrowserInfoInterface, DeviceInfoInterface } from '../models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ZiniaBnplUtilsService {\n private readonly deviceUUID = new DeviceUUID();\n\n constructor(\n private deviceService: DeviceDetectorService,\n ) {\n }\n\n getDeviceInfo(): DeviceInfoInterface {\n return {\n deviceUuid: this.deviceUUID.get(),\n ...this.deviceService.isMobile()\n ? {\n mobileDeviceInfo: {\n device: this.deviceService.device,\n version: this.deviceUUID.version,\n },\n }\n : {\n webDeviceInfo: {\n version: this.deviceUUID.version,\n },\n },\n };\n }\n\n getBrowserInfo(): BrowserInfoInterface {\n return {\n javaEnabled: false,\n javascriptEnabled: true,\n cookiesEnabled: navigator.cookieEnabled,\n language: navigator.language || 'en-us',\n platform: navigator.platform,\n screenColorDepth: window.screen.colorDepth,\n screenHeight: window.screen.height,\n screenWidth: window.screen.width,\n timeZone: new Date().getTimezoneOffset(),\n userAgent: navigator.userAgent,\n acceptHeader: '*/*',\n };\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map, switchMap, tap } from 'rxjs/operators';\n\nimport { NodeApiService } from '@pe/checkout/api';\nimport { TopLocationService } from '@pe/checkout/location';\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { PaymentState } from '@pe/checkout/store';\nimport {\n FlowInterface,\n NodePaymentResponseInterface,\n NodeShopUrlsInterface,\n PaymentStatusEnum,\n} from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { PaymentDetails, PaymentResponse } from '../models';\n\nimport { ZiniaBnplUtilsService } from '.';\n\n@Injectable()\nexport class ZiniaPaymentService extends AbstractPaymentService {\n\n private env = inject(PE_ENV);\n private nodeApiService = inject(NodeApiService);\n private nodeFlowService = inject(NodeFlowService);\n private localeConstantsService = inject(LocaleConstantsService);\n private ziniaBNPLUtilsService = inject(ZiniaBnplUtilsService);\n private topLocationService = inject(TopLocationService);\n\n postPayment() {\n return this.preparePayment(this.flow).pipe(\n switchMap(() => this.nodeFlowService.postPayment()),\n );\n }\n\n public preparePayment(flow: FlowInterface): Observable {\n return this.nodeApiService.getShopUrls(flow).pipe(\n tap((shopUrls) => {\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper: string = this.env.frontend.checkoutWrapper;\n const successUrl = shopUrls.successUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`;\n const cancelUrl = shopUrls.cancelUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-choose-payment`;\n\n const nodePaymentDetails: Partial = {\n frontendSuccessUrl: successUrl,\n frontendFinishUrl: successUrl,\n frontendFailureUrl: cancelUrl,\n frontendCancelUrl: cancelUrl,\n forceRedirect: false,\n isPhoneValidated: true,\n deviceInfo: this.ziniaBNPLUtilsService.getDeviceInfo(),\n browserInfo: this.ziniaBNPLUtilsService.getBrowserInfo(),\n };\n\n return this.nodeFlowService.assignPaymentDetails(nodePaymentDetails).pipe(\n map(() => this.nodeFlowService.getPaymentData()),\n );\n }),\n );\n }\n\n public redirect(): void {\n const { successUrl, cancelUrl, pendingUrl } = this.flow.apiCall || {};\n const paymentResponse = this.store.selectSnapshot(PaymentState.response);\n\n if (this.isStatusSuccess(paymentResponse) && successUrl) {\n this.topLocationService.href = successUrl;\n } else if (this.isStatusFail(paymentResponse) && cancelUrl) {\n this.topLocationService.href = cancelUrl;\n } else if (this.isStatusPending(paymentResponse) && pendingUrl) {\n this.topLocationService.href = pendingUrl;\n }\n }\n\n private isStatusSuccess(paymentResponse: NodePaymentResponseInterface): boolean {\n return [\n PaymentStatusEnum.STATUS_ACCEPTED,\n PaymentStatusEnum.STATUS_PAID,\n ].includes(paymentResponse.payment.status);\n }\n\n private isStatusFail(paymentResponse: NodePaymentResponseInterface): boolean {\n return [\n PaymentStatusEnum.STATUS_FAILED,\n PaymentStatusEnum.STATUS_DECLINED,\n ].includes(paymentResponse.payment.status);\n }\n\n private isStatusPending(paymentResponse: NodePaymentResponseInterface): boolean {\n return [\n PaymentStatusEnum.STATUS_IN_PROCESS,\n ].includes(paymentResponse.payment.status) && !paymentResponse.paymentDetails.verifyValue;\n }\n}\n","import { Directive } from '@angular/core';\n\nimport { AbstractContainerComponent } from '@pe/checkout/payment';\nimport {\n ErrorInterface,\n} from '@pe/checkout/types';\n\n@Directive()\nexport abstract class BaseContainerComponent extends AbstractContainerComponent {\n errorMessage: string = null;\n errors: ErrorInterface;\n}\n","import { Directive, EventEmitter, OnInit, Output, inject } from '@angular/core';\nimport { ApmService } from '@elastic/apm-rum-angular';\nimport { BehaviorSubject } from 'rxjs';\nimport { filter, switchMap, takeUntil, tap } from 'rxjs/operators';\n\nimport { TrackingService } from '@pe/checkout/api';\nimport { ThreatMetrixService } from '@pe/checkout/tmetrix';\nimport { FlowInterface, TimestampEvent } from '@pe/checkout/types';\nimport { PaymentHelperService } from '@pe/checkout/utils';\n\nimport { BaseContainerComponent } from './base-container.component';\n\n@Directive()\nexport abstract class BaseInquiryContainerComponent extends BaseContainerComponent implements OnInit {\n protected threatMetrixService = inject(ThreatMetrixService);\n protected paymentHelperService = inject(PaymentHelperService);\n protected trackingService = inject(TrackingService);\n private apmService = inject(ApmService);\n\n @Output() continue = new EventEmitter();\n @Output() buttonText: EventEmitter = new EventEmitter();\n @Output() serviceReady: EventEmitter = new EventEmitter();\n\n private readonly threatMetrixLoad$ = new BehaviorSubject(null);\n threatMetrixProcess$ = this.threatMetrixLoad$.pipe(\n filter(d => !!d),\n switchMap(flow => this.threatMetrixService.nodeInitFor(\n flow.id,\n flow.connectionId,\n this.paymentMethod,\n ))\n );\n\n abstract triggerSubmit(): void;\n\n ngOnInit(): void {\n this.threatMetrixProcess$.pipe(\n filter(({ loaded }) => loaded),\n tap(({ riskSessionId }) => {\n this.serviceReady.emit(!!riskSessionId);\n riskSessionId && this.nodeFlowService.assignPaymentDetails({ riskSessionId });\n\n if (!riskSessionId) {\n this.apmService.apm.setCustomContext({\n tmxSessionData: (window).tmxSessionData,\n });\n this.apmService.apm.captureError('riskSessionId not provided');\n }\n }),\n takeUntil(this.destroy$)\n ).subscribe();\n\n this.paymentHelperService.setPaymentLoading(true);\n this.analyticsFormService.initPaymentMethod(this.paymentMethod);\n this.threatMetrixLoad$.next(this.flow);\n\n this.buttonText.next($localize`:@@payment-zinia-installments.actions.pay:`);\n }\n\n reloadThreatMetrix() {\n this.flow && this.threatMetrixLoad$.next(this.flow);\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable, throwError } from 'rxjs';\nimport { map, switchMap, tap } from 'rxjs/operators';\n\nimport { NodeApiService } from '@pe/checkout/api';\nimport { TopLocationService } from '@pe/checkout/location';\nimport { NodeFlowService } from '@pe/checkout/node-api';\nimport { AbstractPaymentService } from '@pe/checkout/payment';\nimport { ExternalRedirectStorage } from '@pe/checkout/storage';\nimport { NodeShopUrlsInterface } from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { PE_ENV } from '@pe/common';\n\nimport { PaymentDetails, PaymentResponse } from '../models';\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private env = inject(PE_ENV);\n private nodeApiService = inject(NodeApiService);\n private nodeFlowService = inject(NodeFlowService);\n private localeConstantsService = inject(LocaleConstantsService);\n private externalRedirectStorage = inject(ExternalRedirectStorage);\n private topLocationService = inject(TopLocationService);\n\n postPayment() {\n return this.preparePayment().pipe(\n switchMap(() =>\n this.nodeFlowService.postPayment().pipe(\n switchMap((paymentResponse) => {\n if (paymentResponse?.paymentDetails?.redirectUrl) {\n return this.externalRedirectStorage.saveDataBeforeRedirect(this.flow).pipe(\n tap(() => this.topLocationService.href = paymentResponse.paymentDetails.redirectUrl),\n map(() => paymentResponse),\n );\n }\n\n return throwError(new Error($localize `:@@payment-openbank.errors.finish.emptyRedirectUrl:`));\n }),\n )),\n );\n }\n\n private preparePayment(): Observable {\n return this.nodeApiService.getShopUrls(this.flow).pipe(\n tap((shopUrls) => {\n const lang = this.localeConstantsService.getLang();\n const checkoutWrapper: string = this.env.frontend.checkoutWrapper;\n const successUrl = shopUrls.successUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-payment`;\n const cancelUrl = shopUrls.cancelUrl || `${checkoutWrapper}/${lang}/pay/${this.flow.id}/redirect-to-choose-payment`;\n\n const nodePaymentDetails: Partial = {\n frontendSuccessUrl: successUrl,\n frontendFinishUrl: successUrl,\n frontendFailureUrl: cancelUrl,\n frontendCancelUrl: cancelUrl,\n forceRedirect: true,\n };\n\n this.nodeFlowService.assignPaymentDetails(nodePaymentDetails);\n\n return this.nodeFlowService.getPaymentData();\n }),\n );\n }\n}\n","import { Location } from '@angular/common';\nimport { Inject, Injectable } from '@angular/core';\n\nimport { CustomConfigInterface, EnvironmentConfigInterface, PE_ENV } from '@pe/common/core';\n\nenum MediaUrlTypeEnum {\n Regular = 'regular',\n Thumbnail = 'thumbnail',\n GridThumbnail = 'grid-thumbnail',\n Blurred = 'blurred',\n BlurredThumbnail = 'blurred-thumbnail'\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MediaApiService {\n\n constructor(@Inject(PE_ENV) private env: EnvironmentConfigInterface) {}\n\n getMediaUrl(blob: string, container: string, type: MediaUrlTypeEnum = null, size: string = null): string {\n if (!blob) {\n return blob;\n }\n if (blob.indexOf('http://') === 0 || blob.indexOf('https://') === 0) {\n return blob;\n }\n type = type || MediaUrlTypeEnum.Regular;\n const containerUrlPart: string = size ? `${container}:${size}` : container;\n const config: CustomConfigInterface = this.env.custom;\n const baseUrlNormalized: string = Location.stripTrailingSlash(config.storage);\n\n // NOTE: Suffixes '-thumbnail' and '-blurred' are set y media micro (NOT FOR ALL BLOB CONTAINERS!)\n const blobName: string = ['regular', ''].indexOf(type) >= 0 ? blob : `${blob}-${type}`;\n\n const blobEncoded: string = encodeURIComponent(blobName).replace('(', '%28').replace(')', '%29');\n\n return `${baseUrlNormalized}/${containerUrlPart}/${blobEncoded}`;\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable, Inject } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { CartItemInterface } from '@pe/checkout/types';\nimport { EnvironmentConfigInterface, PE_ENV } from '@pe/common/core';\n\nimport { CouponInterface } from '../types';\n\n@Injectable()\nexport class CouponsApiService {\n constructor(\n @Inject(PE_ENV) private env: EnvironmentConfigInterface,\n private httpClient: HttpClient\n ) {\n }\n\n requestCouponData(\n businessId: string,\n couponCode: string,\n cart: CartItemInterface[],\n shippingCountryCode: string,\n customerDetails: { name: string, email: string }\n ): Observable {\n return this.httpClient.post(\n `${this.env.backend.coupons}/business/${businessId}/coupons/apply-coupon`,\n {\n couponCode,\n cart,\n ...(shippingCountryCode ? { shippingCountry: shippingCountryCode } : {}),\n customer: customerDetails,\n }\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { SelectSnapshot } from '@ngxs-labs/select-snapshot';\nimport { Store } from '@ngxs/store';\nimport { Observable } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport { FlowState, PatchFlow } from '@pe/checkout/store';\nimport { FlowInterface } from '@pe/checkout/types';\n\nimport { CouponsApiService } from './coupons-api.service';\n\n@Injectable()\nexport class CouponsStateService {\n\n @SelectSnapshot(FlowState.flow) private flow: FlowInterface;\n\n constructor(\n private store: Store,\n private apiService: CouponsApiService,\n ) {}\n\n updateCoupon(coupon: string = null): Observable {\n const { businessId, cart } = this.flow;\n const shippingAddress = this.flow.shippingAddress || this.flow.billingAddress;\n const cartWithoutCoupon = cart.map(item => ({\n ...item,\n originalPrice: item.price,\n }));\n\n return this.apiService.requestCouponData(\n businessId,\n coupon,\n cartWithoutCoupon,\n shippingAddress?.country,\n {\n email: shippingAddress?.email,\n name: `${shippingAddress?.firstName || ''} ${shippingAddress?.lastName || ''}`.trim(),\n },\n ).pipe(\n switchMap((codeData) => {\n const amount = codeData.cart.reduce((acc, item) => acc += item.quantity * item.price && acc, 0);\n\n return this.store.dispatch(\n new PatchFlow({\n cart: codeData.cart,\n amount,\n coupon,\n })\n );\n }),\n );\n }\n\n removeCoupon(): Observable {\n const { cart } = this.flow;\n\n let amount = 0;\n const updatedCart = cart.map((item) => {\n amount += item.price * item.quantity;\n\n return { ...item, originalPrice: item.price };\n });\n\n return this.store.dispatch(new PatchFlow({ cart: updatedCart, coupon: null, amount }));\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { PluginsModule as SdkPluginsModule } from '@pe/checkout/plugins';\nimport { StorageModule as SdkStorageModule } from '@pe/checkout/storage';\nimport { UtilsModule } from '@pe/checkout/utils';\n\nimport { CouponsApiService, CouponsStateService } from './services';\n\n@NgModule({\n imports: [\n UtilsModule,\n SdkStorageModule,\n SdkPluginsModule,\n ],\n providers: [\n CouponsApiService,\n CouponsStateService,\n ],\n})\nexport class CouponsModule {}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TopLocationService {\n private _waitRedirect = false;\n private _isRedirecting = false;\n private _deprecatedIsRedirecting = false;\n\n public get isRedirecting(): boolean {\n return this._isRedirecting || this._deprecatedIsRedirecting;\n }\n\n /** @deprecated remove this we should not set redirecting from outside */\n public set isRedirecting(value: boolean) {\n this._deprecatedIsRedirecting = value;\n }\n\n set href(href: string) {\n if (this._isRedirecting) {\n return;\n }\n this._isRedirecting = true;\n try {\n window.top.location.href = href;\n } catch (err) {\n // a fallback option in case the redirect for the example in the iframe is unavailable\n window.open(href, '_blank');\n }\n }\n\n get href(): string {\n return window.top.location.href;\n }\n\n set waitRedirect(value: boolean) {\n this._waitRedirect = value;\n }\n\n get waitRedirect(): boolean {\n return this._waitRedirect;\n }\n\n}\n","import { Injectable } from '@angular/core';\n\nimport {\n FlowInterface, NodePaymentResponseInterface, PaymentInterface,\n} from '@pe/checkout/types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ApiCallUrlService {\n\n getCustomerRedirectUrl(\n nodeResult: NodePaymentResponseInterface, payment: PaymentInterface, flow: FlowInterface\n ): string {\n return nodeResult?._apiCall?.customerRedirectUrl || payment?.apiCall?.customerRedirectUrl ||\n flow?.apiCall?.customerRedirectUrl || null;\n }\n\n getSuccessUrl(\n nodeResult: NodePaymentResponseInterface, payment: PaymentInterface, flow: FlowInterface\n ): string {\n return nodeResult?._apiCall?.successUrl || payment?.apiCall?.successUrl || flow?.apiCall?.successUrl || null;\n }\n\n getPendingUrl(\n nodeResult: NodePaymentResponseInterface, payment: PaymentInterface, flow: FlowInterface\n ): string {\n return (nodeResult?._apiCall?.pendingUrl || nodeResult?._apiCall?.successUrl) ||\n (payment?.apiCall?.pendingUrl || payment?.apiCall?.successUrl) ||\n (flow?.apiCall?.pendingUrl || flow?.apiCall?.successUrl) || null;\n }\n\n getCustomerRedirectPendingUrl(\n nodeResult: NodePaymentResponseInterface, payment: PaymentInterface, flow: FlowInterface\n ): string {\n return (nodeResult?._apiCall?.customerRedirectUrl\n || nodeResult?._apiCall?.pendingUrl\n || nodeResult?._apiCall?.successUrl)\n || (payment?.apiCall?.customerRedirectUrl\n || payment?.apiCall?.pendingUrl\n || payment?.apiCall?.successUrl)\n || (payment?.apiCall?.customerRedirectUrl\n || flow?.apiCall?.pendingUrl\n || flow?.apiCall?.successUrl)\n || null;\n }\n\n getFailureUrl(\n nodeResult: NodePaymentResponseInterface, payment: PaymentInterface, flow: FlowInterface\n ): string {\n return nodeResult?._apiCall?.failureUrl || payment?.apiCall?.failureUrl || flow?.apiCall?.failureUrl || null;\n }\n\n canChangePaymentMethod(\n isDisableChangePaymentFlag: boolean, nodeResult: NodePaymentResponseInterface, flow: FlowInterface\n ): boolean {\n return flow.paymentOptions?.length > 1 &&\n (Boolean(!isDisableChangePaymentFlag && flow.paymentOptions && flow.paymentOptions?.length > 1) ||\n Boolean(nodeResult && nodeResult._apiCall && nodeResult._apiCall.cancelUrl) ||\n Boolean(flow.apiCall && flow.apiCall.cancelUrl));\n }\n\n getChangePaymentUrl(\n nodeResult: NodePaymentResponseInterface,\n payment: PaymentInterface,\n flow: FlowInterface,\n useShopUrlIfEmpty = false,\n ): string {\n return (nodeResult && nodeResult._apiCall\n ? (nodeResult._apiCall.failureUrl || nodeResult._apiCall.cancelUrl)\n : null)\n || (payment && payment.apiCall\n ? (payment.apiCall.failureUrl || payment.apiCall.cancelUrl)\n : null)\n || (flow && flow.apiCall\n ? (flow.apiCall.failureUrl || flow.apiCall.cancelUrl)\n : null)\n || (useShopUrlIfEmpty\n ? flow && flow.shopUrl\n : null)\n || null;\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { SelectSnapshot } from '@ngxs-labs/select-snapshot';\n\nimport { FlowStorage } from '@pe/checkout/storage';\nimport { FlowState } from '@pe/checkout/store';\nimport {\n AddressInterface,\n FlowInterface,\n NodePaymentAddressInterface,\n NodePaymentInterface,\n PaymentMethodEnum,\n} from '@pe/checkout/types';\nimport { extractStreetNameAndNumber } from '@pe/checkout/utils/address';\n\nimport { NodeFlowDataInterface } from '../interfaces';\n\nconst win = window as any;\n\n@Injectable()\nexport abstract class BaseNodeFlowService {\n\n @SelectSnapshot(FlowState.flow) protected flow: FlowInterface;\n\n @SelectSnapshot(FlowState.paymentMethod) protected paymentMethod: PaymentMethodEnum;\n\n protected flowStorage = this.injector.get(FlowStorage);\n\n constructor(protected injector: Injector) {}\n\n protected getNodeFlowData():\n NodeFlowDataInterface {\n const key = `pe_nodeFlowStore_${this.flow.id}`;\n if (!win[key]) {\n win[key] = this.flowStorage.getData(this.flow.id, 'nodeFlowStore', { paymentsData: {} });\n }\n\n return win[key];\n }\n\n protected saveNodeFlowDataToStorage(\n data: NodeFlowDataInterface\n ): void {\n this.flowStorage.setData(this.flow.id, 'nodeFlowStore', data, true);\n }\n\n\n protected flowToNodePayment(): NodePaymentInterface {\n const result: NodePaymentInterface = {\n payment: {\n flowId: this.flow.id,\n reference: this.flow.reference,\n total: this.flow.total,\n amount: this.flow.amount,\n currency: this.flow.currency,\n customerName: this.flow.billingAddress ? `${this.flow.billingAddress?.firstName} ${this.flow.billingAddress?.lastName}`.trim() : null,\n customerEmail: this.flow.billingAddress ? this.flow.billingAddress?.email : null,\n businessId: this.flow.businessId,\n businessName: this.flow.businessName,\n deliveryFee: this.flow.deliveryFee || 0,\n shippingOrderId: this.flow.shippingOrderId || null,\n shippingMethodName: this.flow.shippingMethodName || null,\n apiCallId: this.flow.apiCall?.id,\n channel: this.flow.channel,\n channelSetId: this.flow.channelSetId,\n\n address: null,\n shippingAddress: null,\n },\n paymentItems: [],\n };\n\n this.flow.channelSource && (result.payment.channelSource = this.flow.channelSource);\n this.flow.channelType && (result.payment.channelType = this.flow.channelType);\n\n if (this.flow.billingAddress) {\n result.payment.address = this.flowAddressToNodePaymentAddress(this.flow.billingAddress);\n }\n if (this.flow.shippingAddressId) {\n const shippingAddress = this.flow.shippingAddresses.find(a => a.id === this.flow.shippingAddressId);\n result.payment.shippingAddress = this.flowAddressToNodePaymentAddress(shippingAddress);\n }\n if (this.flow.cart && this.flow.cart?.length) {\n (this.flow.cart || []).forEach((item) => {\n result.paymentItems.push({\n identifier: item.identifier,\n name: item.name,\n price: item.price,\n priceNet: item.priceNet,\n vatRate: item.vat,\n thumbnail: item.image,\n quantity: item.quantity,\n sku: item.sku,\n productId: item.productId || item._id || item.id,\n options: item.options,\n extraData: {\n subscriptionPlan: null, // TODO\n },\n });\n });\n }\n\n return result;\n }\n\n private flowAddressToNodePaymentAddress(address: AddressInterface): NodePaymentAddressInterface {\n const result: NodePaymentAddressInterface = {\n city: address.city,\n country: address.country,\n email: address.email,\n firstName: address.firstName,\n lastName: address.lastName,\n phone: address.phone,\n salutation: address.salutation,\n street: address.street,\n streetName: address.streetName || extractStreetNameAndNumber(address.street)[0],\n streetNumber: address.streetNumber || extractStreetNameAndNumber(address.street)[1],\n zipCode: address.zipCode,\n };\n\n return result;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Store } from '@ngxs/store';\nimport { Observable } from 'rxjs';\nimport { filter, map, switchMap } from 'rxjs/operators';\n\nimport { NodeApiService } from '@pe/checkout/api';\nimport {\n EditPayment,\n PatchPaymentDetails,\n PaymentState,\n PollPaymentForStatus,\n PostPayment,\n SetPaymentDetails,\n UpdatePayment,\n} from '@pe/checkout/store';\nimport {\n NodePaymentResponseInterface,\n PaymentStatusEnum,\n PaymentTerms,\n} from '@pe/checkout/types';\n\nimport { BaseNodeFlowService } from './base-node-flow.service';\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NodeFlowService extends BaseNodeFlowService {\n\n private nodeApiService = this.injector.get(NodeApiService);\n private store = this.injector.get(Store);\n\n setPaymentDetails(data: PaymentDetailsOrFormToken): Observable {\n return this.store.dispatch(new SetPaymentDetails(data));\n }\n\n assignPaymentDetails(\n data: PaymentDetailsOrFormToken,\n ): Observable {\n return this.store.dispatch(new PatchPaymentDetails(data));\n }\n\n getPaymentData(): PaymentDetailsOrFormToken {\n return this.store.selectSnapshot(PaymentState.details);\n }\n\n getFinalResponse(): NodePaymentResponseInterface {\n return this.paymentMethod && this.store.selectSnapshot(PaymentState.response);\n }\n\n getApplicationData(\n transactionId: string\n ): Observable> {\n return this.nodeApiService.getApplicationData>(\n this.flow.id,\n this.paymentMethod,\n this.flow.connectionId,\n transactionId,\n );\n }\n\n getCreditRates(params: TParams): Observable {\n return this.nodeApiService.getCreditRates(\n params,\n this.flow.id,\n this.paymentMethod,\n this.flow.connectionId,\n );\n }\n\n postPayment(): Observable> {\n return this.store.dispatch(new PostPayment()).pipe(\n map(() => this.store.selectSnapshot(PaymentState.response)),\n );\n }\n\n editTransaction(\n paymentId: string\n ): Observable> {\n return this.store.dispatch(new EditPayment(paymentId)).pipe(\n map(() => this.store.selectSnapshot(PaymentState.response)),\n );\n }\n\n updatePayment():\n Observable>\n {\n return this.store.selectOnce(PaymentState.response).pipe(\n switchMap(paymentResponse => this.store.dispatch(new UpdatePayment(paymentResponse.id)).pipe(\n map(() => this.store.selectSnapshot(PaymentState.response)),\n ))\n );\n }\n\n pollPaymentUntilStatus(...statuses: PaymentStatusEnum[]): Observable> {\n this.store.dispatch(new PollPaymentForStatus(statuses));\n\n return this.store.select(PaymentState.response).pipe(\n filter(response => statuses.includes(response.payment.status)),\n );\n }\n\n getTerms(connectionId: string): Observable {\n return this.nodeApiService.getTerms(connectionId);\n }\n}\n","import { Component, ChangeDetectionStrategy, Output, EventEmitter, Input } from '@angular/core';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'payment-error',\n templateUrl: './payment-error.component.html',\n standalone: true,\n})\nexport class PaymentErrorComponent {\n @Input({\n required: true,\n }) errorText: string;\n\n @Output() tryAgain: EventEmitter = new EventEmitter();\n doTryAgain(event: MouseEvent): void {\n this.tryAgain.emit(event);\n }\n}\n","\n \n {{errorText}}\n \n \n checkout_sdk.action.try_again\n \n\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable, Inject } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { EnvironmentConfigInterface, PE_ENV } from '@pe/common/core';\n\nimport { ShippingAddressInterface, ShippingResponseInterface, ShippingCartProduct } from '../types';\n\n@Injectable()\nexport class ShippingApiService {\n constructor(\n @Inject(PE_ENV) private env: EnvironmentConfigInterface,\n private httpClient: HttpClient\n ) {\n }\n\n attachShipping(channelSetId: string, shippingOrderId: string, integrationSubscriptionId: string): Observable {\n return this.httpClient.post(`${this.env.backend.shipping}/api/channel-set/${channelSetId}/shipping/select-method`, {\n shippingOrderId,\n integrationSubscriptionId,\n });\n }\n\n requestShippingData(\n channelSetId: string,\n address: ShippingAddressInterface,\n products: ShippingCartProduct[],\n ): Observable {\n return this.httpClient.post(\n `${this.env.backend.shipping}/api/channel-set/${channelSetId}/shipping/methods`,\n {\n shippingAddress: address,\n shippingItems: products,\n }\n );\n /* // TODO Remove\n return of({\n \"shippingOrderId\": \"ade63d9b-4dbe-4d9b-b082-6b70d1d79c26\",\n \"methods\": [\n {\n \"integrationSubscriptionId\": \"507875cb-102f-47a6-9845-ebbfbada5648\",\n \"integrationRule\": {\n \"isActive\": true,\n \"_id\": \"f7e67897-0f1b-4a5b-ac84-e05cea9f0034\",\n \"type\": {\n \"_id\": \"71e689f2-a185-11e9-a252-1fc0734f1106\",\n \"name\": \"freeOver\",\n \"title\": \"shipping.rule.freeOver\",\n \"isExtendable\": true,\n \"isCompatible\": true,\n \"createdAt\": \"2019-02-11T09:30:00.340Z\",\n \"updatedAt\": \"2019-02-11T09:30:00.340Z\",\n \"__v\": 0\n },\n \"freeOver\": 501,\n \"rate\": 0,\n \"weightRanges\": [],\n \"rateRanges\": []\n },\n \"rate\": 0\n }\n ]\n });*/\n }\n}\n","export interface ShippingOptionDeliveryTypeInterface {\n _id: string;\n name: string;\n title: string;\n price: number;\n deliveryTimeDays: number;\n}\n// Data from server\n\nexport interface ShippingResponseMethodInterface {\n business: any;\n icon: string;\n integration: string;\n integrationSubscriptionId: string;\n name: string;\n rate: number;\n}\n\nexport interface ShippingResponseInterface {\n shippingOrderId: string;\n methods: ShippingResponseMethodInterface[];\n}\n\n// Normalized data\n\nexport interface ShippingOptionSaveDataInterface { // Subset of FlowInterface\n // shipping_category: string; // integration, custom\n // shipping_option_name: string; // default\n shippingMethodName: string; // dhl, freeShipping\n shippingFee: number;\n}\n\nexport interface NormilizedShippingOptionInterface {\n title: string;\n deliveryTimeDays: number;\n price: number;\n saveData: ShippingOptionSaveDataInterface;\n}\n\nexport interface NormilizedShippingInterface {\n icon: string;\n title: string;\n description: string;\n options?: NormilizedShippingOptionInterface[];\n\n shippingOrderId: string;\n integrationSubscriptionId: string;\n saveData?: ShippingOptionSaveDataInterface;\n}\n\n// Data to send\n\nexport enum WeightUnitEnum {\n kg = 'kg'\n}\n\nexport enum DimensionUnitEnum {\n cm = 'cm'\n}\n\nexport interface ShippingCartProduct {\n // uuid - left for compatibility\n uuid: string;\n productId: string;\n quantity: number;\n name: string;\n image: string;\n currency: string;\n price: number;\n weight: number;\n width: number;\n length: number;\n height: number;\n weightUnit: WeightUnitEnum;\n dimensionUnit: DimensionUnitEnum;\n}\n\nexport interface ShippingAddressInterface {\n name: string;\n streetName: string;\n streetNumber: string;\n city: string;\n stateProvinceCode: string;\n zipCode: string;\n countryCode: string;\n phone: string;\n}\n","import { Injectable, Injector } from '@angular/core';\n\nimport { MediaApiService } from '@pe/checkout/api/media';\nimport { ProductInterface, ProductTypes } from '@pe/checkout/products';\nimport { AddressInterface, FlowInterface } from '@pe/checkout/types';\nimport { PeCurrencyPipe } from '@pe/checkout/utils';\n\nimport {\n ShippingAddressInterface,\n ShippingCartProduct,\n ShippingResponseInterface,\n NormilizedShippingInterface,\n WeightUnitEnum,\n DimensionUnitEnum,\n} from '../types';\n\n@Injectable()\nexport class ShippingConverterService {\n\n private mediaService = this.injector.get(MediaApiService);\n private currencyPipe = this.injector.get(PeCurrencyPipe);\n\n constructor(protected injector: Injector) {}\n\n getCartItemIdsFromFlow(flow: FlowInterface): string[] {\n return (flow.cart || []).map(item => item.productId);\n }\n\n convertFlowAddressToShippingAddress(address: AddressInterface): ShippingAddressInterface {\n const result: ShippingAddressInterface = {\n name: `${address.salutation || ''} ${address.firstName || ''} ${address.lastName || ''}`.trim(),\n streetName: address.streetName || address.street,\n streetNumber: address.streetNumber || '', // TODO address.apartment too ?\n city: address.city,\n stateProvinceCode: '',\n zipCode: address.zipCode,\n countryCode: address.country,\n phone: address.phone || address.mobilePhone,\n };\n\n return result;\n }\n\n convertFlowCartToShippingProducts(flow: FlowInterface, products: ProductInterface[]): ShippingCartProduct[] {\n const result: ShippingCartProduct[] = [];\n (flow.cart || []).forEach((cartItem) => {\n const product: ProductInterface = products.find(p =>\n p.id === cartItem.productId\n || !!(p.variants || []).find(pp => pp.id === cartItem.productId)\n );\n if (product && product.shipping && product.type === ProductTypes.Physical) {\n const shippingProduct: ShippingCartProduct = {\n uuid: cartItem.productId,\n productId: cartItem.productId,\n quantity: cartItem.quantity || 0,\n name: cartItem.name || '---',\n image: product.images && product.images.length\n ? this.mediaService.getMediaUrl(product.images[0], 'products')\n : null,\n currency: flow.currency,\n price: cartItem.price || 0,\n weight: parseFloat(product.shipping.weight),\n width: parseFloat(product.shipping.width),\n length: parseFloat(product.shipping.length),\n height: parseFloat(product.shipping.height),\n weightUnit: WeightUnitEnum.kg,\n dimensionUnit: DimensionUnitEnum.cm,\n };\n result.push(shippingProduct);\n }\n });\n\n return result;\n }\n\n convertShippingToNormilized(data: ShippingResponseInterface, currency: string): NormilizedShippingInterface[] {\n const result: NormilizedShippingInterface[] = [];\n data.methods.forEach((method) => {\n const desc: string = this.formatDescription(method.rate, currency);\n result.push({\n icon: method.icon,\n title: method.name,\n // title: this.translateService.translate(`checkout_shipping_types.${method.name}.title`),\n description: desc,\n shippingOrderId: data.shippingOrderId,\n integrationSubscriptionId: method.integrationSubscriptionId,\n saveData: {\n // shipping_category: 'custom',\n // shipping_option_name: method.integrationRule.type.name,\n shippingMethodName: method.name,\n shippingFee: method.rate,\n },\n });\n });\n\n /* // TODO Remove\n if (data.customShipping) {\n const bots = data.customShipping.byOrderTotalsShipping;\n if (bots && bots.isActive && bots.installed) {\n const fee = bots.rateRanges && bots.rateRanges ? bots.rateRanges[0].rate : 0;\n result.push({\n icon: '',\n title: bots.title,\n description: this.formatDescription(fee, currency),\n saveData: {\n shipping_category: 'custom',\n shippingMethodName: 'byOrderTotalsShipping',\n shipping_option_name: 'default',\n shippingFee: fee\n }\n });\n }\n\n const bws = data.customShipping.byWeightShipping;\n if (bws && bws.isActive && bws.installed) {\n const fee = bws.weightRanges && bws.weightRanges ? bws.weightRanges[0].rate : 0;\n const fromTo = bws.weightRanges && bws.weightRanges ? bws.weightRanges[0] : null;\n const fromToText = fromTo ?\n this.translateService.translate('checkout_shipping_edit.delivery_type_labels.weight_from_to', {\n from: this.formatWeight(fromTo.from),\n to: this.formatWeight(fromTo.upTo)\n }) : '';\n result.push({\n icon: '',\n title: bws.title,\n description: this.formatDescription(fee, currency) + (fromToText ? ` (${fromToText})` : ''),\n saveData: {\n shipping_category: 'custom',\n shippingMethodName: 'byWeightShipping',\n shipping_option_name: 'default',\n shippingFee: fee\n }\n });\n }\n\n const frs = data.customShipping.flatRateShipping;\n if (frs && frs.isActive && frs.installed) {\n result.push({\n icon: '',\n title: frs.title,\n description: this.formatDescription(frs.rate, currency),\n saveData: {\n shipping_category: 'custom',\n shippingMethodName: 'flatRateShipping',\n shipping_option_name: 'default',\n shippingFee: frs.rate\n }\n });\n }\n\n const fs = data.customShipping.freeShipping;\n if (fs && fs.isActive && fs.installed) {\n result.push({\n icon: '',\n title: fs.title,\n description: this.formatDescription(0, currency),\n saveData: {\n shipping_category: 'custom',\n shippingMethodName: 'freeShipping',\n shipping_option_name: 'default',\n shippingFee: 0\n }\n });\n }\n }\n\n if (data.integrations && data.integrations.length) {\n forEach(data.integrations, (shipping: ShippingOptionInterface) => {\n const d: NormilizedShippingInterface = {\n icon: shipping.integration.displayOptions.icon,\n title: shipping.integration.displayOptions.title,\n description: null,\n options: []\n };\n forEach(shipping.integrationSettings.deliveryTypes, (deliveryType: ShippingOptionDeliveryTypeInterface) => {\n d.options.push({\n title: deliveryType.title,\n deliveryTimeDays: deliveryType.deliveryTimeDays,\n price: deliveryType.price,\n saveData: {\n shipping_category: 'integration',\n shippingMethodName: shipping.integration.name,\n shipping_option_name: deliveryType.name,\n shippingFee: deliveryType.price\n }\n });\n });\n result.push(d);\n });\n }*/\n return result;\n }\n\n private formatDescription(price: number, currency: string, translationKey: string = null): string {\n const priceText = this.currencyPipe.transform(price, currency, 'symbol');\n let result = priceText;\n if (translationKey) {\n // TODO: translate elsewhere if translation key gets used\n // result = $localize `:@@${translationKey}:${price}:price:`;\n result = `${translationKey}${price}`;\n // result = this.translateService.translate(translationKey, { price: priceText });\n }\n\n return result;\n }\n\n // private formatWeight(value: number): string {\n // return this.decimalPipe.transform(value, '1.0-2') + WeightUnitEnum.kg;\n // }\n}\n","import { Injectable } from '@angular/core';\nimport { MD5 } from 'object-hash';\nimport { BehaviorSubject, Observable, Observer, Subscription, of } from 'rxjs';\nimport { catchError, filter, mergeMap, map, take } from 'rxjs/operators';\n\nimport { ApiService as SdkApiService } from '@pe/checkout/api';\nimport { ProductsStateService, ProductInterface } from '@pe/checkout/products';\nimport { FlowInterface, CartItemInterface } from '@pe/checkout/types';\n\nimport {\n ShippingOptionSaveDataInterface,\n NormilizedShippingInterface,\n} from '../types';\n\nimport { ShippingApiService } from './shipping-api.service';\nimport { ShippingConverterService } from './shipping-converter.service';\n\n@Injectable()\nexport class ShippingStateService {\n\n // Note: Why we don't use SessionStorageService from ngx-webstorage?\n // Because both custom elements (edit and view) has own copy of StateService.\n // As result it will be 2 copies of SessionStorageService\n // And as SessionStorageService uses internal cache for access data - we will get double requests.\n\n private lastError: BehaviorSubject = new BehaviorSubject(null);\n private shippingsCache: {\n [key: string]: {\n subject?: BehaviorSubject;\n processed?: boolean\n }\n } = {};\n\n constructor(\n private apiService: ShippingApiService,\n private converterService: ShippingConverterService,\n private sdkApiService: SdkApiService,\n private productsStateService: ProductsStateService\n ) {\n }\n\n getShippings(flow: FlowInterface, resetCache = false): Observable {\n const hash: string = this.makeHash(flow.id, flow.cart, flow.amount, flow.currency, flow.billingAddress);\n if (!this.shippingsCache[hash]) {\n this.shippingsCache[hash] = {\n subject: new BehaviorSubject(null),\n };\n }\n const data = this.shippingsCache[hash];\n if (!data.processed || resetCache) {\n data.processed = true;\n data.subject.next(null);\n this.lastError.next(null);\n\n const cache = this.getDataFromCache(hash);\n const call = cache ? of(cache) : this.getShippingsData(flow);\n\n call.pipe(\n catchError((err) => {\n this.lastError.next(err);\n\n return [];\n })\n ).subscribe((ret) => {\n data.subject.next(ret);\n this.saveDataToCache(hash, ret);\n });\n }\n\n return data.subject.asObservable();\n }\n\n getShippingsOnce(flow: FlowInterface, resetCache = false): Observable {\n return new Observable((observer: Observer) => {\n let errorSub: Subscription = null;\n this.getShippings(flow, resetCache).pipe(filter(d => !!d), take(1)).subscribe((value) => {\n if (errorSub) {\n errorSub.unsubscribe();\n }\n observer.next(value);\n });\n errorSub = this.lastError.pipe(filter(d => !!d), take(1)).subscribe((err) => {\n observer.error(err);\n });\n });\n }\n\n saveShipping(\n channelSetId: string,\n shippingOrderId: string,\n integrationSubscriptionId: string,\n flowId: string,\n saveData: ShippingOptionSaveDataInterface\n ): Observable {\n return this.apiService.attachShipping(channelSetId, shippingOrderId, integrationSubscriptionId).pipe(\n mergeMap(() => this.sdkApiService._patchFlow(flowId, { ...saveData, shippingOrderId: shippingOrderId } as any))\n );\n }\n\n private getShippingsData(flow: FlowInterface): Observable {\n let products$: Observable = of([]);\n if (flow.cart && flow.cart?.length) {\n products$ = this.productsStateService.getProductsOnce(this.converterService.getCartItemIdsFromFlow(flow));\n }\n\n return products$.pipe(\n mergeMap((products: ProductInterface[]) =>\n this.apiService.requestShippingData(\n flow.channelSetId,\n this.converterService.convertFlowAddressToShippingAddress(flow.billingAddress),\n this.converterService.convertFlowCartToShippingProducts(flow, products)\n ).pipe(\n map(data => this.converterService.convertShippingToNormilized(data, flow.currency)),\n )\n ),\n );\n }\n\n private makeHash(\n flowId: string,\n cart: CartItemInterface[],\n amount: number,\n currency: string,\n billingAddress: any,\n ): string {\n return MD5(JSON.stringify({ flowId, cart, amount, currency, billingAddress }));\n }\n\n private getDataFromCache(hash: string): NormilizedShippingInterface[] {\n const ret = sessionStorage.getItem(`pe_checkout_shipping_${hash}`);\n\n return ret ? JSON.parse(ret) : null;\n }\n\n private saveDataToCache(hash: string, data: NormilizedShippingInterface[]): void {\n sessionStorage.setItem(`pe_checkout_shipping_${hash}`, JSON.stringify(data));\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { ApiService as SdkApiService } from '@pe/checkout/api';\nimport { PluginsModule as SdkPluginsModule } from '@pe/checkout/plugins';\nimport { ProductsStateService } from '@pe/checkout/products';\nimport { StorageModule as SdkStorageModule } from '@pe/checkout/storage';\nimport { UtilsModule } from '@pe/checkout/utils';\n\nimport { ShippingApiService, ShippingStateService, ShippingConverterService } from './services';\n\n// This way we make sure that when we have 2 checkouts: one as lib in COSF and another as custom element in POS and\n// they are both together in the memory:\n// In this case they don't have same shared global services (rxjs conflicts in this case)\nconst win = (window as any)[`checkout_sdk_shipping_${Math.random().toString().slice(2)}`] = {} as any;\n\nexport function shippingStateServiceFactory(\n apiService: ShippingApiService,\n converterService: ShippingConverterService,\n sdkApiService: SdkApiService,\n productsStateService: ProductsStateService\n): ShippingStateService {\n if (!win.pe_CheckoutWrapper_ShippingStateService) {\n win.pe_CheckoutWrapper_ShippingStateService = new ShippingStateService(\n apiService,\n converterService,\n sdkApiService,\n productsStateService,\n );\n }\n\n return win.pe_CheckoutWrapper_ShippingStateService;\n}\n\n@NgModule({\n imports: [\n UtilsModule,\n SdkStorageModule,\n SdkPluginsModule,\n ],\n providers: [\n ShippingApiService,\n ShippingConverterService,\n {\n provide: ShippingStateService, useFactory: shippingStateServiceFactory,\n deps: [ShippingApiService, ShippingConverterService, SdkApiService, ProductsStateService],\n },\n ],\n})\nexport class ShippingModule {\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\n\nimport { CheckoutUiButtonComponent } from './button.component';\n\n\n@NgModule({\n declarations: [\n CheckoutUiButtonComponent,\n ],\n imports: [\n CommonModule,\n\n MatButtonModule,\n ],\n exports: [\n CheckoutUiButtonComponent,\n ],\n})\nexport class CheckoutUiButtonModule {}\n","var V3_URL = 'https://js.stripe.com/v3';\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(V3_URL, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!V3_URL_REGEX.test(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(V3_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"2.1.7\",\n startTime: startTime\n });\n};\n\nvar stripePromise = null;\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise !== null) {\n return stripePromise;\n }\n\n stripePromise = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n }\n\n script.addEventListener('load', function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n });\n script.addEventListener('error', function () {\n reject(new Error('Failed to load Stripe.js'));\n });\n } catch (error) {\n reject(error);\n return;\n }\n });\n return stripePromise;\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n// own script injection.\n\nvar stripePromise$1 = Promise.resolve().then(function () {\n return loadScript(null);\n});\nvar loadCalled = false;\nstripePromise$1[\"catch\"](function (err) {\n if (!loadCalled) {\n console.warn(err);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now();\n return stripePromise$1.then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n","import type {\n PaymentRequestShippingAddressEvent,\n PaymentRequest,\n PaymentRequestPaymentMethodEvent,\n PaymentRequestShippingOptionEvent,\n} from '@stripe/stripe-js';\nimport { Observable, from } from 'rxjs';\n\nexport class PaymentRequestAdapter {\n constructor(private readonly paymentRequest: PaymentRequest) {}\n\n public readonly success = () => new Observable(\n (observer) => {\n this.paymentRequest.once('paymentmethod', (event) => {\n observer.next(event);\n observer.complete();\n });\n\n () => observer.complete();\n });\n\n public readonly cancel = () => new Observable(\n (observer) => {\n this.paymentRequest.once('cancel', () => {\n observer.next();\n observer.complete();\n });\n\n () => observer.complete();\n });\n\n public readonly shippingAddressChange = () => new Observable(\n (observer) => {\n this.paymentRequest.on('shippingaddresschange', (event) => {\n observer.next(event);\n });\n\n () => observer.complete();\n });\n\n public readonly shippingOptionChange = () => new Observable(\n (observer) => {\n this.paymentRequest.on('shippingoptionchange', (event) => {\n observer.next(event);\n });\n\n () => observer.complete();\n });\n\n public canMakePayment() {\n return from(this.paymentRequest.canMakePayment());\n }\n\n public show() {\n this.paymentRequest.show();\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n PaymentRequest,\n PaymentRequestPaymentMethodEvent,\n PaymentRequestShippingAddressEvent,\n PaymentRequestShippingOptionEvent,\n Stripe,\n} from '@stripe/stripe-js';\nimport { Observable, from, of } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport { PaymentRequestEvent } from '../models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PaymentRequestService {\n\n public listenToPaymentRequest(paymentRequest: PaymentRequest) {\n return new Observable((observer) => {\n paymentRequest.once('paymentmethod', (event: PaymentRequestPaymentMethodEvent) => {\n observer.next({ source: 'success', data: event });\n observer.complete();\n });\n\n paymentRequest.once('cancel', () => {\n observer.next({ source: 'cancel' });\n observer.complete();\n });\n\n paymentRequest.on('shippingaddresschange', (event: PaymentRequestShippingAddressEvent) => {\n observer.next({ source: 'shippingaddresschange', data: event });\n });\n\n paymentRequest.on('shippingoptionchange', (event: PaymentRequestShippingOptionEvent) => {\n observer.next({ source: 'shippingoptionchange', data: event });\n });\n });\n }\n\n public confirmPayment(\n event: PaymentRequestPaymentMethodEvent,\n stripe: Stripe,\n clientSecret: string,\n ) {\n return from(\n stripe.confirmCardPayment(\n clientSecret,\n { payment_method: event.paymentMethod.id },\n { handleActions: false }\n ),\n ).pipe(\n switchMap((confirmResult) => {\n if (confirmResult.error) {\n event.complete('fail');\n\n return of(false);\n }\n event.complete('success');\n if (confirmResult.paymentIntent.status === 'requires_action') {\n return from(stripe.confirmCardPayment(clientSecret));\n }\n\n return of(confirmResult);\n }),\n );\n }\n}\n","import { HttpClient, HttpContext, HttpHeaders } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\n\nimport { BYPASS_AUTH } from '@pe/checkout/api';\nimport {\n NodeApiCallInterface,\n NodePaymentResponseInterface,\n PaymentMethodEnum,\n PaymentPayload,\n} from '@pe/checkout/types';\nimport { PE_ENV } from '@pe/common';\n\nimport {\n CreateFlowRequestDto,\n CreateFlowResponseDto,\n PublishKeyRequestDto,\n PublishKeyResponseDto,\n} from '../models';\nimport { ShippingMethods, ShippingOptionsDTO } from '../models/payment.dto';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StripeWalletApiService {\n\n private readonly http = inject(HttpClient);\n private readonly env = inject(PE_ENV);\n\n public initPayment(\n paymentMethod: PaymentMethodEnum,\n payload: PublishKeyRequestDto,\n ) {\n return this.http.post(\n `${this.env.backend.checkout}/api/finance-express/${paymentMethod}/init`,\n payload,\n );\n }\n\n public createFlow(\n payload: CreateFlowRequestDto,\n ) {\n return this.http.post(\n `${this.env.backend.checkout}/api/flow/v1`,\n payload,\n {\n context: new HttpContext().set(BYPASS_AUTH, true),\n },\n );\n }\n\n public submitPayment(\n paymentMethod: PaymentMethodEnum,\n body: PaymentPayload,\n token: string,\n ) {\n return this.http.post>(\n `${this.env.backend.checkout}/api/finance-express/${paymentMethod}/pay`,\n body,\n {\n context: new HttpContext().set(BYPASS_AUTH, true),\n headers: new HttpHeaders().append('authorization', `Bearer ${token}`),\n }\n );\n }\n\n public getCallbacks(flowId: string, token: string) {\n return this.http.get(\n `${this.env.backend.checkout}/api/flow/v1/${flowId}/callbacks`,\n {\n context: new HttpContext().set(BYPASS_AUTH, true),\n headers: new HttpHeaders().append('authorization', `Bearer ${token}`),\n }\n );\n }\n\n public getShippingOptions(url: string, shippingData: ShippingOptionsDTO) {\n return this.http.post(\n url,\n {\n shipping: {\n shippingAddress: shippingData,\n },\n },\n );\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { PaymentRequestShippingAddress, PaymentRequestShippingOption } from '@stripe/stripe-js';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport {\n AddressInterface,\n CustomWidgetConfigInterface,\n FlowInterface,\n PaymentMethodEnum,\n} from '@pe/checkout/types';\n\nimport { ShippingOptionsDTO } from '../models/payment.dto';\n\nimport { StripeWalletApiService } from './stripe-wallet-api.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StripeWalletService {\n\n private api = inject(StripeWalletApiService);\n\n public getPublishKey(\n paymentMethod: PaymentMethodEnum,\n channelSetId: string,\n amount: number,\n deliveryFee: number,\n ) {\n return this.api.initPayment(\n paymentMethod,\n {\n flow: {\n channelSetId,\n },\n initData: { amount, deliveryFee },\n },\n );\n }\n\n public createFlow(\n channelSetId: string,\n config: CustomWidgetConfigInterface,\n amount: number,\n ) {\n return this.api.createFlow({\n channelSetId,\n amount,\n cancelUrl: config.cancelUrl,\n failureUrl: config.failureUrl,\n successUrl: config.successUrl,\n noticeUrl: config.noticeUrl,\n pendingUrl: config.pendingUrl,\n ...config.reference && { reference: config.reference },\n });\n }\n\n public submitPayment(\n paymentMethod: PaymentMethodEnum,\n flow: FlowInterface,\n config: CustomWidgetConfigInterface,\n deliveryFee: number,\n shippingAddress: PaymentRequestShippingAddress,\n shippingOption: PaymentRequestShippingOption,\n ) {\n const shippingAddressRecipient = shippingAddress?.recipient?.split(' ');\n\n const payload = {\n payment: {\n deliveryFee,\n amount: flow.amount,\n apiCallId: flow.apiCall.id,\n billingAddress: flow.billingAddress,\n businessId: flow.businessId,\n businessName: flow.businessName,\n channel: flow.channel,\n channelSetId: flow.channelSetId,\n currency: flow.currency,\n flowId: flow.id,\n reference: flow.reference,\n total: flow.total,\n shippingOption: {\n name: shippingOption.label,\n price: shippingOption.amount / 100,\n carrier: shippingOption.id,\n },\n ...shippingAddress && {\n shippingAddress: {\n city: shippingAddress.city,\n country: shippingAddress.country,\n zipCode: shippingAddress.postalCode,\n postalCode: shippingAddress.postalCode,\n state: shippingAddress.region,\n firstName: shippingAddressRecipient[0],\n lastName: shippingAddressRecipient[1],\n street: shippingAddress.addressLine.filter(Boolean).join(', '),\n } as AddressInterface,\n },\n },\n paymentDetails: {\n frontendCancelUrl: config.cancelUrl,\n frontendFailureUrl: config.failureUrl,\n frontendFinishUrl: config.successUrl,\n quoteCallbackUrl: config.quoteCallbackUrl,\n },\n paymentItems: config.cart ?? [],\n };\n\n return this.api.submitPayment(paymentMethod, payload, flow.guestToken);\n }\n\n public getCallbacks(flowId: string, token: string) {\n return this.api.getCallbacks(flowId, token);\n }\n\n public getShippingOptions(url: string, shippingData: ShippingOptionsDTO): Observable {\n return this.api.getShippingOptions(url, shippingData).pipe(\n map(response => response.shippingMethods.map(item => ({\n id: item.reference,\n label: item.name,\n detail: '',\n amount: item.price * 100,\n }))),\n );\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport {\n PaymentRequestWallet,\n Stripe,\n loadStripe,\n} from '@stripe/stripe-js';\nimport { BehaviorSubject, EMPTY, ReplaySubject, from, merge } from 'rxjs';\nimport { catchError, filter, map, switchMap, tap } from 'rxjs/operators';\n\nimport { PaymentMethodEnum } from '@pe/checkout/types';\n\nimport { ComponentConfig } from '../models';\n\nimport { PaymentRequestAdapter } from './payment-request-adapter.class';\nimport { PaymentRequestService } from './payment-request.service';\nimport { StripeWalletService } from './stripe-wallet.service';\n\nconst PAYMENT_WALLET: { [key in PaymentMethodEnum]?: PaymentRequestWallet[] } = {\n apple_pay: ['googlePay', 'browserCard', 'link'],\n google_pay: ['applePay', 'browserCard', 'link'],\n};\n\nconst TOTAL_LABEL = 'Total';\n\n@Injectable()\nexport class PayService {\n\n private readonly stripeService = inject(StripeWalletService);\n private readonly paymentRequestService = inject(PaymentRequestService);\n\n private readonly amount$ = new ReplaySubject(1);\n private readonly deliveryFee$ = new BehaviorSubject(0);\n\n public init(\n componentConfig: ComponentConfig,\n paymentMethod: PaymentMethodEnum,\n ) {\n return this.stripeService.getPublishKey(\n paymentMethod,\n componentConfig.channelSet,\n componentConfig.amount,\n componentConfig.config.shippingOption?.price ?? 0,\n ).pipe(\n switchMap(({\n flow: { country, currency },\n initData: { publishKey, totalCharge },\n }) => from(\n loadStripe(publishKey, { apiVersion: '2023-10-16' })\n ).pipe(\n switchMap((stripe) => {\n const amount = Math.round(100 * totalCharge);\n this.amount$.next(amount);\n\n const paymentRequest = new PaymentRequestAdapter(\n stripe.paymentRequest({\n country,\n currency: currency?.toLowerCase(),\n total: {\n label: TOTAL_LABEL,\n amount: amount,\n },\n disableWallets: PAYMENT_WALLET[paymentMethod],\n requestPayerEmail: true,\n requestPayerName: true,\n requestPayerPhone: true,\n requestShipping: !!componentConfig.config?.quoteCallbackUrl,\n shippingOptions: [],\n }),\n );\n\n return paymentRequest.canMakePayment().pipe(\n map(() => ({\n stripe,\n paymentRequest,\n })),\n );\n })\n )),\n );\n }\n\n public pay(\n componentConfig: ComponentConfig,\n paymentMethod: PaymentMethodEnum,\n paymentRequest: PaymentRequestAdapter,\n stripe: Stripe,\n ) {\n return this.stripeService.createFlow(\n componentConfig.channelSet,\n componentConfig.config,\n componentConfig.amount,\n ).pipe(\n switchMap(flow =>\n this.stripeService.getCallbacks(flow.id, flow.guestToken).pipe(\n switchMap(callbacks => this.amount$.pipe(\n switchMap(amount => merge(\n paymentRequest.success().pipe(\n tap(event => event.shippingOption\n && this.deliveryFee$.next(event.shippingOption.amount / 100)),\n switchMap(event => this.stripeService.submitPayment(\n paymentMethod,\n flow,\n componentConfig.config,\n this.deliveryFee$.getValue(),\n event.shippingAddress,\n event.shippingOption,\n ).pipe(\n switchMap(({ paymentDetails: { clientSecret } }) =>\n this.paymentRequestService.confirmPayment(event, stripe, clientSecret).pipe(\n filter(value => !!value),\n tap(() => {\n window.top.location.href = callbacks.successUrl;\n }),\n ),\n ),\n )),\n ),\n paymentRequest.cancel().pipe(\n tap(() => {\n window.top.location.href = callbacks.cancelUrl;\n }),\n ),\n paymentRequest.shippingAddressChange().pipe(\n switchMap(({ updateWith, shippingAddress }) => {\n if (!componentConfig.config?.quoteCallbackUrl) {\n return EMPTY;\n }\n\n return this.stripeService.getShippingOptions(\n componentConfig.config?.quoteCallbackUrl,\n {\n country: shippingAddress.country,\n zipCode: shippingAddress.postalCode,\n }\n ).pipe(\n tap((shippingOptions) => {\n if (!shippingOptions?.length) {\n updateWith({\n status: 'invalid_shipping_address',\n });\n\n return;\n }\n\n const option = shippingOptions[0];\n\n updateWith({\n status: 'success',\n total: {\n amount: amount + (option?.amount ?? 0),\n label: TOTAL_LABEL,\n },\n shippingOptions,\n });\n }),\n catchError(() => {\n updateWith({\n status: 'fail',\n });\n\n return EMPTY;\n })\n );\n }),\n ),\n paymentRequest.shippingOptionChange().pipe(\n tap(({ updateWith, shippingOption }) => {\n updateWith({\n status: 'success',\n total: {\n amount: amount + shippingOption.amount,\n label: TOTAL_LABEL,\n },\n });\n this.deliveryFee$.next(shippingOption.amount / 100);\n }),\n ),\n )),\n )),\n ),\n ),\n );\n }\n}\n"],"names":["ButtonCancelComponent","constructor","this","topLocationService","inject","TopLocationService","finishFlowService","FinishFlowService","onButtonClick","embeddedMode","isInIframe","merchantMode","flow","apiCall","cancelUrl","closeCheckout","href","static","t","_angular_core__WEBPACK_IMPORTED_MODULE_3__","Xpm","selectors","inputs","buttonText","isDefault","features","i0","PeDestroyService","decls","vars","consts","template","rf","ctx","_c0","__decorate","ViewSelectSnapshot","ParamsState","tslib__WEBPACK_IMPORTED_MODULE_6__","w6","Boolean","prototype","CheckoutUiButtonCancelModule","_angular_core__WEBPACK_IMPORTED_MODULE_0__","oAB","cJS","CommonModule","BaseContainerComponent","AbstractContainerComponent","errorMessage","core","lG2","AllianzApiService","AbstractApiService","getPayment","connectionId","paymentId","http","post","env","thirdParty","payments","fesm2022_core","Yz7","factory","ɵfac","AllianzFlowService","BaseNodeFlowService","allianzApiService","injector","get","store","Store","paymentResponse","selectSnapshot","PaymentState","response","id","pipe","switchMap","dispatch","PatchPaymentResponse","PaymentService","AbstractPaymentService","nodeFlowService","NodeFlowService","postPayment","BfsApiService","BfsFlowService","bfsApiService","PE_ENV","externalRedirectStorage","ExternalRedirectStorage","localeConstantsService","LocaleConstantsService","preparePayment","delayWhen","paymentDetails","redirectUrl","saveDataBeforeRedirect","tap","Error","lang","getLang","checkoutWrapper","frontend","guestToken","AuthSelectors","accessToken","frontendFinishUrl","URL","frontendCancelUrl","window","origin","searchParams","set","nodePaymentDetails","toString","forceRedirect","assignPaymentDetails","ctx_r1","nodeResult","payment","total","currency","businessName","createdAt","isPosPayment","billingAddressName","orderId","isCanShowTransactionLink","transactionLink","ctx_r2","applicationNumber","ctx_r3","canChangePaymentMethod","ctx_r4","FinishComponent_ng_container_1_checkout_sdk_finish_status_success_1_Template","FinishComponent_ng_container_1_ng_container_2_Template","FinishComponent_ng_container_1_checkout_sdk_finish_status_fail_3_Template","FinishComponent_ng_container_1_checkout_sdk_finish_status_unknown_4_Template","ctx_r0","isStatusSuccess","isStatusPending","isStatusFail","isStatusUnknown","FinishComponent","AbstractFinishComponent","PaymentStatusEnum","STATUS_ACCEPTED","STATUS_PAID","indexOf","status","STATUS_NEW","STATUS_IN_PROCESS","STATUS_FAILED","STATUS_DECLINED","_angular_core__WEBPACK_IMPORTED_MODULE_7__","i18n_0","$localize","onClose","FinishComponent_ng_container_1_Template","buttons","getIframeCallbackUrl","isLoading","isChangingPaymentMethod","asSinglePayment","nodeApiService","NodeApiService","getShopUrls","shopUrls","setPaymentDetails","PaymentServiceV2","loadScript","startIvyCheckout","fromMutationObserver","document","body","first","map","SelectSnapshot","tslib_es6","Object","SharedModule","provide","ABSTRACT_PAYMENT_SERVICE","useClass","imports","FinishModule","apiService","ApiService","FinishComponent_ng_container_1_checkout_sdk_finish_status_pending_2_Template","standalone","NgIf","i1","i2","i3","i4","i5","changeDetection","api","FlowState","waitRedirect","redirect","successUrl","frontendSuccessUrl","frontendFailureUrl","failureUrl","FinishComponent_ng_container_1_checkout_sdk_finish_status_fail_2_Template","FinishComponent_ng_container_1_checkout_sdk_finish_status_unknown_3_Template","ctx_r5","FinishComponent_ng_container_1_ng_container_3_Template","FinishComponent_ng_container_1_checkout_sdk_finish_status_fail_4_Template","FinishComponent_ng_container_1_checkout_sdk_finish_status_unknown_5_Template","isStatusNew","flow$","takeWhile","state","finished","FlowStateEnum","FINISH","Select","Observable","SdkFinishModule","SdkStorageModule","FinishContainerComponent","AbstractFinishContainerComponent","showFinishModalFromExistingPayment","getFinalResponse","analyticsFormService","initPaymentMethod","paymentMethod","cdr","markForCheck","cleanUp","close","tryAgain","$event","changePayment","showCloseButton","isDisableChangePayment","PaymentDetailsContainerComponent","continue","EventEmitter","ngOnInit","emit","outputs","encapsulation","SantanderNoInvoiceModule","BasePaymentModule","resolveFinishContainerComponent","componentFactoryResolver","resolveComponentFactory","resolvePaymentDetailsStepContainerComponent","PAYMENT_SETTINGS","useValue","addressSettings","BILLING_ADDRESS_SETTINGS","hasNodeOptions","HAS_NODE_FORM_OPTIONS","UtilStepService","getYesNoOptions","label","value","translateOptions","values","keysPool","valuesSet","Set","reduce","acc","item","has","push","add","v","getCountries","withEmpty","nodeFormOptions","countriesPromise","getCountryList","from","countries","mapCountries","config","seCountry","options","countryCodes","filter","c","toUpperCase","String","result","unshift","mapTo","of","AbstractFinishTemplateComponent","isCheckStatusTimeout","translations","processingTitle","processingText","getNodeResultDetails","_angular_core__WEBPACK_IMPORTED_MODULE_6__","StripeApiService","paymentPublishKey","nodeData","url","amount","deliveryFee","catchError","err","logError","flowId","method","StripeFlowService","stripeApiService","getStripeData","PaymentMethodEnum","STRIPE","paymentPayload","StripeCommonService","stripeFlowService","initStripe","combineLatest","addScriptToPage","data","Stripe","publishKey","obs","scriptId","getElementById","next","script","createElement","src","onload","onerror","error","head","appendChild","preparePaymentData","nodeAdditionalPaymentDetails","postbackUrl","AbstractPaymentContainerComponent","finishModalShown","isShowingWallet","isCheckStatusProcessing","paymentPreInitialize","providedIn","postPaymentSubject$","ReplaySubject","postPayment$","asObservable","confirmCardPayment$","BehaviorSubject","UtilsModule","FormsModule","ReactiveFormsModule","SdkFormUtilsModule","isFinishModalShown$","takeUntil","destroy$","subscribe","allowBrowserCard","verifyUrl","FinishComponent_ng_container_2_checkout_sdk_finish_status_success_1_Template","FinishComponent_ng_container_2_checkout_sdk_finish_status_fail_2_Template","FinishComponent_ng_container_2_checkout_sdk_finish_status_unknown_3_Template","updateStatus","ngZone","NgZone","ngAfterViewInit","onStable","skipWhile","isBankIframe","fromEvent","e","event","specificStatus","_angular_core__WEBPACK_IMPORTED_MODULE_9__","viewQuery","i18n_1","FinishComponent_ng_container_2_Template","dynamicDescriptor","extra","dynamic_descriptor","PluginsModule","getPaymentData","take","TermsService","cache","Map","getTerms","selectOnce","fetchTerms","terms","entries","key","m","parseText","text","metadata","required","documentId","camelCasedMeta","camelCase","parsedText","assetsLinks","forEach","test","replace","ZiniaBNPLApiService","optVerify","ApiErrorType","ErrorSubmit","updateInfo","ZiniaBnplFlowService","ziniaBNPLApiService","apiCallId","GetApiCallData","SetPaymentComplete","ZiniaBnplUtilsService","deviceService","deviceUUID","DeviceUUID","getDeviceInfo","deviceUuid","isMobile","mobileDeviceInfo","device","version","webDeviceInfo","getBrowserInfo","javaEnabled","navigator","javascriptEnabled","cookiesEnabled","cookieEnabled","language","platform","screenColorDepth","screen","colorDepth","screenHeight","height","screenWidth","width","timeZone","Date","getTimezoneOffset","userAgent","acceptHeader","ZiniaPaymentService","ziniaBNPLUtilsService","pendingUrl","isPhoneValidated","deviceInfo","browserInfo","includes","verifyValue","storage","getFromCache","n","JSON","stringify","parse","ZiniaBnplApiService","p","withLatestFrom","resp","BaseInquiryContainerComponent","threatMetrixService","ThreatMetrixService","paymentHelperService","PaymentHelperService","trackingService","TrackingService","apmService","ApmService","serviceReady","threatMetrixLoad$","threatMetrixProcess$","d","nodeInitFor","loaded","riskSessionId","apm","setCustomContext","tmxSessionData","captureError","setPaymentLoading","reloadThreatMetrix","throwError","MediaUrlTypeEnum","Regular","Thumbnail","GridThumbnail","Blurred","BlurredThumbnail","MediaApiService","getMediaUrl","blob","container","type","size","containerUrlPart","baseUrlNormalized","Location","stripTrailingSlash","custom","blobName","encodeURIComponent","CouponsApiService","httpClient","requestCouponData","businessId","couponCode","cart","shippingCountryCode","customerDetails","backend","coupons","shippingCountry","customer","CouponsStateService","updateCoupon","coupon","shippingAddress","billingAddress","cartWithoutCoupon","originalPrice","price","country","email","name","firstName","lastName","trim","codeData","quantity","PatchFlow","removeCoupon","updatedCart","CouponsModule","SdkPluginsModule","_waitRedirect","_isRedirecting","_deprecatedIsRedirecting","isRedirecting","top","location","open","ApiCallUrlService","getCustomerRedirectUrl","_apiCall","customerRedirectUrl","getSuccessUrl","getPendingUrl","getCustomerRedirectPendingUrl","getFailureUrl","isDisableChangePaymentFlag","paymentOptions","length","getChangePaymentUrl","useShopUrlIfEmpty","shopUrl","win","flowStorage","FlowStorage","getNodeFlowData","getData","paymentsData","saveNodeFlowDataToStorage","setData","flowToNodePayment","reference","customerName","customerEmail","shippingOrderId","shippingMethodName","channel","channelSetId","address","paymentItems","channelSource","channelType","flowAddressToNodePaymentAddress","shippingAddressId","shippingAddresses","find","a","identifier","priceNet","vatRate","vat","thumbnail","image","sku","productId","_id","extraData","subscriptionPlan","city","phone","salutation","street","streetName","extractStreetNameAndNumber","streetNumber","zipCode","SetPaymentDetails","PatchPaymentDetails","details","getApplicationData","transactionId","getCreditRates","params","PostPayment","editTransaction","EditPayment","updatePayment","UpdatePayment","pollPaymentUntilStatus","statuses","PollPaymentForStatus","select","PaymentErrorComponent","doTryAgain","errorText","ShippingApiService","attachShipping","integrationSubscriptionId","shipping","requestShippingData","products","shippingItems","WeightUnitEnum","kg","DimensionUnitEnum","cm","ShippingConverterService","mediaService","currencyPipe","PeCurrencyPipe","getCartItemIdsFromFlow","convertFlowAddressToShippingAddress","stateProvinceCode","countryCode","mobilePhone","convertFlowCartToShippingProducts","cartItem","product","variants","pp","ProductTypes","Physical","shippingProduct","uuid","images","weight","parseFloat","weightUnit","dimensionUnit","convertShippingToNormilized","methods","desc","formatDescription","rate","icon","title","description","saveData","shippingFee","translationKey","transform","ShippingStateService","converterService","sdkApiService","productsStateService","lastError","shippingsCache","getShippings","resetCache","hash","makeHash","subject","processed","getDataFromCache","getShippingsData","ret","saveDataToCache","getShippingsOnce","observer","errorSub","unsubscribe","saveShipping","mergeMap","_patchFlow","products$","getProductsOnce","MD5","sessionStorage","getItem","setItem","Math","random","slice","shippingStateServiceFactory","pe_CheckoutWrapper_ShippingStateService","ShippingModule","useFactory","deps","SdkApiService","ProductsStateService","CheckoutUiButtonModule","MatButtonModule","V3_URL","V3_URL_REGEX","EXISTING_SCRIPT_MESSAGE","stripePromise","stripePromise$1","Promise","resolve","then","reject","console","warn","scripts","querySelectorAll","concat","i","findScript","queryString","advancedFraudSignals","headOrBody","injectScript","addEventListener","loadCalled","catch","PaymentRequestAdapter","paymentRequest","success","once","complete","cancel","shippingAddressChange","on","shippingOptionChange","canMakePayment","show","PaymentRequestService","listenToPaymentRequest","source","confirmPayment","stripe","clientSecret","confirmCardPayment","payment_method","handleActions","confirmResult","paymentIntent","StripeWalletApiService","HttpClient","initPayment","payload","checkout","createFlow","context","HttpContext","BYPASS_AUTH","submitPayment","token","headers","HttpHeaders","append","getCallbacks","getShippingOptions","shippingData","StripeWalletService","getPublishKey","initData","noticeUrl","shippingOption","shippingAddressRecipient","recipient","split","carrier","postalCode","region","addressLine","join","quoteCallbackUrl","shippingMethods","detail","PAYMENT_WALLET","apple_pay","google_pay","TOTAL_LABEL","PayService","stripeService","paymentRequestService","amount$","deliveryFee$","init","componentConfig","channelSet","totalCharge","_len","arguments","args","Array","_key","startTime","now","maybeStripe","apply","undefined","registerWrapper","_registerWrapper","loadStripe","apiVersion","round","toLowerCase","disableWallets","requestPayerEmail","requestPayerName","requestPayerPhone","requestShipping","shippingOptions","pay","callbacks","merge","getValue","updateWith","option","EMPTY"],"sourceRoot":"webpack:///"}
\n {{errorText}}\n