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AgB,GAE/BI,EAAW,CACT5mB,OAAQ,UACR1B,MAAO,CACLgK,OAAQA,GAAUue,GAAQve,QAAU,GACpC7V,MAAOgyB,GAET+B,mBACD,IACF,EACDhe,cAAW,KACToe,EAAW,CACT5mB,OAAQ,SAGH8mB,WAnCFA,UAwCb7F,EAAeO,uBAAuB5uB,QACpC4B,OAAI,EAAGoyB,aAAYhD,qBACjBgD,EAAW,CACT5mB,OAAQ,UACR1B,MAAO,CACLgK,OAAQA,EAASsb,EAAetb,OAChC7V,MAAOgyB,KAGX74B,KAAKk5B,aAAahb,KAAK8Z,EAAetb,OAAS,IAAG,UAQlE,CAAC3b,SAAAf,KAAA,mBAAAgB,iBA7JU83B,EAAU,EAAA/3B,SAAAf,KAAA,WAAAgM,EAAAyD,IAAA,OAAVqpB,EAAUppB,QAAVopB,EAAUnpB,mBAAVmpB,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/shared/forms/src/lib/name/name.validator.ts","./libs/shared/forms/src/lib/zip-code/zip-code.validator.ts","./libs/shared/forms/src/lib/zip-code/postal-code-patterns.constant.ts","./libs/lazy/sections/address-edit/src/lib/components/variants/abstract-address-edit.component.ts","./libs/lazy/sections/address-view/src/lib/address-view.module.ts","./libs/lazy/sections/address-view/src/lib/pipes/address-full-name.pipe.ts","./libs/lazy/sections/address-view/src/lib/pipes/address-line.pipe.ts","./libs/lazy/sections/address-view/src/lib/components/address-summary/address-summary.component.html","./libs/lazy/sections/address-view/src/lib/components/address-summary/address-summary.component.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/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-directdebit/src/lib/shared/components/finish/finish.component.html","./libs/payments/stripe-directdebit/src/lib/shared/components/finish/finish.component.ts","./libs/payments/stripe-directdebit/src/lib/shared/services/payment.service.ts","./libs/payments/stripe-directdebit/src/lib/shared/shared.module.ts","./libs/payments/stripe-directdebit/src/lib/shared/components/base-container.component.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/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/plugins/src/lib/pipes/safe-url.pipe.ts","./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 { AbstractControl, ValidationErrors } from '@angular/forms';\n\nconst VALID_NAME_CHARACTERS = /^[\\p{L}\\p{M}_\\s-]*$/u;\n\nexport function namePatternValidator(control: AbstractControl): ValidationErrors | null {\n const val: string = control.value;\n\n return !val || VALID_NAME_CHARACTERS.test(val) ? null : { invalidName: true };\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\n\nexport class ZipCodeValidators {\n private static zipCodePattern = /[\\S]/g;\n\n static zipCodeValid(pattern: string): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const value: string = control.value || '';\n\n if (value) {\n const regexp = new RegExp(pattern);\n\n return regexp.test(value) ? null : { zipCodeInvalid: true };\n }\n\n return null;\n };\n }\n \n static Required(control: AbstractControl): ValidationErrors | null {\n return control.value \n && control.value.match(ZipCodeValidators.zipCodePattern) ? null : { zipCodeInvalid: true };\n }\n}\n","export const POSTAL_PATTERNS_BY_COUNTRY: { [key: string]: string } = {\n DE: '^\\\\d{5}$',\n NO: '^\\\\d{4}$',\n AT: '^\\\\d{4}$',\n};\n","\nimport { Directive, Input, OnInit } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { SelectSnapshot } from '@ngxs-labs/select-snapshot';\nimport { parsePhoneNumber } from 'libphonenumber-js/min';\nimport { defer, merge } from 'rxjs';\nimport { debounceTime, map, scan, shareReplay, startWith, switchMap, takeUntil, tap } from 'rxjs/operators';\n\nimport { AnalyticsFormService } from '@pe/checkout/analytics';\nimport { CompositeForm } from '@pe/checkout/forms';\nimport { AddressAutocompleteService, addressMask } from '@pe/checkout/forms/address-autocomplete';\nimport { emailRequiredValidator } from '@pe/checkout/forms/email';\nimport { namePatternValidator } from '@pe/checkout/forms/name';\nimport { PhoneValidators } from '@pe/checkout/forms/phone';\nimport { phoneMask } from '@pe/checkout/forms/phone';\nimport { POSTAL_PATTERNS_BY_COUNTRY, ZipCodeValidators } from '@pe/checkout/forms/zip-code';\nimport { FlowState } from '@pe/checkout/store';\nimport {\n AddressInterface,\n FlowInterface,\n PaymentAddressSettingsInterface,\n} from '@pe/checkout/types';\nimport { AddressMapperService, CustomElementService } from '@pe/checkout/utils';\n\nimport {\n AddressValidators,\n SALUTATION_OPTIONS,\n SELECT_ADDRESS_OPTIONS,\n} from '../../constants';\nimport { AddressFormInterface } from '../../interfaces';\nimport { AddressService } from '../../services';\n\nconst NOT_ONLY_WHITE_SPACES = Validators.pattern(/\\S+/);\n\n\n@Directive()\nexport abstract class AbstractAddressEditComponent extends CompositeForm implements OnInit {\n\n public formGroup: FormGroup = this.fb.group({\n email: this.fb.control(null, emailRequiredValidator),\n salutation: this.fb.control(null, [Validators.required]),\n firstName: this.fb.control(null, [Validators.required, NOT_ONLY_WHITE_SPACES, namePatternValidator]),\n lastName: this.fb.control(null, [Validators.required, NOT_ONLY_WHITE_SPACES, namePatternValidator]),\n country: this.fb.control(null, [Validators.required]),\n city: this.fb.control(null, [Validators.required, Validators.pattern(/^([^0-9]*)$/)]),\n fullAddress: this.fb.control(null),\n street: this.fb.control(null, [Validators.required, AddressValidators.houseNumberRequired]),\n streetName: this.fb.control(null),\n streetNumber: this.fb.control(null),\n socialSecurityNumber: this.fb.control(null),\n zipCode: this.fb.control(null, [ZipCodeValidators.Required]),\n phone: this.fb.control(null),\n });\n\n public readonly phoneMask = phoneMask;\n public readonly addressMask = addressMask;\n\n private addressService = this.injector.get(AddressService);\n private analyticsFormService = this.injector.get(AnalyticsFormService);\n protected addressMapperService = this.injector.get(AddressMapperService);\n protected customElementService = this.injector.get(CustomElementService);\n protected addressAutocompleteService = this.injector.get(AddressAutocompleteService);\n\n @SelectSnapshot(FlowState.flow) flow!: FlowInterface;\n\n @Input() paymentSettings: PaymentAddressSettingsInterface;\n\n @Input() isFilledFieldsReadonly = true;\n\n @Input() isPhoneRequired: boolean;\n\n @Input() isCodeForPhoneRequired: boolean;\n\n\n public readonly addressItems$ = this.addressAutocompleteService.addressItems$;\n public readonly salutationFormOptions = SALUTATION_OPTIONS;\n public readonly selectAddressFormOptions = [\n ...SELECT_ADDRESS_OPTIONS,\n ...(this.flow.shippingAddresses ?? []).map(value => ({ label: value.fullAddress, value })),\n ];\n\n public readonly countriesOptions$ = this.addressService.getCountries().pipe(\n shareReplay(1),\n );\n\n public readonly selectAddressControl = this.fb.control(\n { disabled: false, value: null },\n [Validators.required],\n );\n\n public readonly countryChanges$ = defer(() => this.formGroup.get('country').valueChanges.pipe(\n startWith(this.formGroup.get('country').value),\n ));\n\n private parsePhoneNumber: typeof parsePhoneNumber;\n\n public get control(): FormControl {\n return this.ngControl?.control as FormControl;\n }\n\n ngOnInit(): void {\n super.ngOnInit();\n\n (window as any).PayeverStatic?.SvgIconsLoader?.loadIcons(\n ['geocoder-24'],\n null,\n this.customElementService.shadowRoot\n );\n\n const basePhoneValidatorRequired = this.isPhoneRequired ? [Validators.required] : [];\n if (this.paymentSettings) {\n basePhoneValidatorRequired.push(AddressValidators.phoneValid(\n this.isPhoneRequired,\n this.paymentSettings.codeRequired,\n this.paymentSettings.phonePattern,\n this.paymentSettings.phonePatternCodeRequired,\n ));\n this.formGroup.get('phone').setValidators(basePhoneValidatorRequired);\n this.formGroup.updateValueAndValidity();\n } else {\n this.loadLibPhoneNumber();\n }\n\n const updateZipCodeValidation$ = this.formGroup.get('country').valueChanges\n .pipe(\n startWith(this.formGroup.get('country').value),\n tap((value: string) => {\n this.formGroup.get('zipCode').setValidators([\n ZipCodeValidators.Required,\n ZipCodeValidators.zipCodeValid(this.paymentSettings?.postalCodePattern || POSTAL_PATTERNS_BY_COUNTRY[value]),\n ]);\n this.formGroup.get('zipCode').updateValueAndValidity();\n })\n );\n\n const updatePhoneValidation$ = this.formGroup.get('country').valueChanges.pipe(\n startWith(this.formGroup.get('country').value),\n tap((country) => {\n const codeRequired = this.isCodeForPhoneRequired;\n const controlName = $localize`:@@checkout_address_edit.form.phone.label:`;\n const validators = [\n PhoneValidators.country(this.paymentSettings?.countryCode || country, controlName),\n ...basePhoneValidatorRequired,\n ];\n codeRequired && validators.push(PhoneValidators.codeRequired(this.paymentSettings?.countryCode || country));\n this.formGroup.get('phone').setValidators(validators);\n this.formGroup.get('phone').updateValueAndValidity();\n })\n );\n\n const updateFullAddress$ = merge(\n this.formGroup.get('country').valueChanges.pipe(\n startWith(this.formGroup.get('country').value),\n map(country => ({ country })),\n ),\n this.formGroup.get('city').valueChanges.pipe(\n startWith(this.formGroup.get('city').value),\n map(city => ({ city })),\n ),\n this.formGroup.get('street').valueChanges.pipe(\n startWith(this.formGroup.get('street').value),\n map(street => ({ street })),\n tap(({ street }) => {\n const streetName = street?.split(/(\\d+)/)[0]?.trim();\n const streetNumber = street?.split(/(\\d+)/)[1]?.trim();\n\n this.formGroup.get('streetName').setValue(streetName);\n this.formGroup.get('streetNumber').setValue(streetNumber);\n }),\n ),\n this.formGroup.get('zipCode').valueChanges.pipe(\n startWith(this.formGroup.get('zipCode').value),\n map(zipCode => ({ zipCode })),\n ),\n ).pipe(\n scan((acc, curr) => ({ ...acc, ...curr }), {} as AddressInterface),\n debounceTime(100),\n switchMap(value => this.countriesOptions$.pipe(\n tap((countries) => {\n const fullAddress = this.addressService.parseFullAddress(value, countries);\n this.formGroup.get('fullAddress').patchValue(fullAddress, { emitEvent: false });\n }),\n )),\n );\n\n const selectAddressChange$ = this.selectAddressControl.valueChanges.pipe(\n tap((value: AddressFormInterface) => {\n const newValue = {\n city: value?.city || '',\n country: value?.country || '',\n firstName: value?.firstName || '',\n fullAddress: value?.fullAddress || '',\n lastName: value?.lastName || '',\n socialSecurityNumber: value?.socialSecurityNumber || '',\n street: value?.street || '',\n streetName: value?.streetName || '',\n streetNumber: value?.streetNumber || '',\n zipCode: value?.zipCode || '',\n ...(value === null && {\n email: '',\n phone: '',\n salutation: '',\n }),\n };\n\n this.formGroup.patchValue(newValue);\n }),\n );\n\n this.markFieldsAsReadonly();\n merge(\n updateZipCodeValidation$,\n updatePhoneValidation$,\n updateFullAddress$,\n selectAddressChange$,\n ).pipe(\n takeUntil(this.destroy$),\n ).subscribe();\n }\n\n public fullAddressChange(value: Partial): void {\n this.formGroup.patchValue(value);\n }\n\n private markFieldsAsReadonly(): void {\n this.isFilledFieldsReadonly && Object.values(this.formGroup.controls).forEach((control) => {\n if (control.value) {\n control.disable();\n }\n });\n }\n\n private loadLibPhoneNumber(): void {\n import('libphonenumber-js/max').then((m) => {\n this.parsePhoneNumber = m.parsePhoneNumber;\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { ComponentFactory, ComponentFactoryResolver, NgModule } from '@angular/core';\n\nimport { UiModule } from '@pe/checkout/ui';\n\nimport { AddressSummaryComponent } from './components';\nimport { AddressFullNamePipe, AddressLinePipe } from './pipes';\n\n@NgModule({\n imports: [\n CommonModule,\n UiModule,\n ],\n declarations: [\n AddressSummaryComponent,\n AddressFullNamePipe,\n AddressLinePipe,\n ],\n exports: [\n AddressSummaryComponent,\n ],\n})\nexport class AddressViewModule {\n constructor(private componentFactoryResolver: ComponentFactoryResolver) { }\n\n resolveAddressSummaryComponent(): ComponentFactory {\n return this.componentFactoryResolver.resolveComponentFactory(AddressSummaryComponent);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { AddressInterface } from '@pe/checkout/types';\nimport { SALUTATION_TRANSLATION } from '@pe/checkout/utils';\n\n@Pipe({ name: 'peAddressFullName' })\nexport class AddressFullNamePipe implements PipeTransform {\n\n transform(address: AddressInterface, hideSalutation = false): string {\n const salutation: string = address && address.salutation && !hideSalutation\n ? SALUTATION_TRANSLATION[address.salutation]\n : null;\n\n return address\n ? [salutation, address.firstName, address.lastName].filter(v => !!v).join(' ')\n : '';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { AddressInterface } from '@pe/checkout/types';\nimport { LocaleConstantsService } from '@pe/checkout/utils';\nimport { loadCountries } from '@pe/checkout/utils/countries';\n\n@Pipe({ name: 'peAddressLine' })\nexport class AddressLinePipe implements PipeTransform {\n\n constructor(\n private localeConstantsService: LocaleConstantsService,\n ) {}\n\n private countries$ = loadCountries(this.localeConstantsService.getLang() as any);\n\n\n transform(address: AddressInterface): Observable {\n\n return this.countries$.pipe(\n filter(address => !!address),\n map(countries => address?.country && countries[address.country.toUpperCase() as keyof typeof countries]),\n map(country => address\n ? [address.zipCode, address.city, country ?? ''].filter(v => !!v).join(', ')\n : ''\n ),\n );\n }\n}\n","\n \n \n \n
\n \n \n
\n \n \n

\n
\n\n \n \n \n
\n \n \n
\n \n \n

\n
\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { SelectSnapshot } from '@ngxs-labs/select-snapshot';\n\nimport { FlowState } from '@pe/checkout/store';\nimport { AddressInterface, FlowInterface } from '@pe/checkout/types';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'checkout-main-address-summary',\n templateUrl: 'address-summary.component.html',\n})\nexport class AddressSummaryComponent {\n\n @SelectSnapshot(FlowState.flow) private flow: FlowInterface;\n\n get hideSalutation(): boolean {\n return this.flow.hideSalutation;\n }\n\n get billingAddress(): AddressInterface {\n return this.flow.billingAddress;\n }\n\n get shippingAddress(): AddressInterface {\n return (this.flow.shippingAddresses || []).find(address => address.id === this.flow.shippingAddressId);\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 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 nodePaymentDetails: NodePaymentDetailsInterface = {};\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 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","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","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 payment-stripeDirectDebit.inquiry.finish.labels.sepa_mandate\n \n {{ getNodeResultDetails().mandateReference }}\n

\n \n \n\n \n\n \n
\n\n","import { Component, ChangeDetectionStrategy, Injector, inject } from '@angular/core';\n\nimport { AbstractFinishComponent } from '@pe/checkout/finish';\nimport { PaymentStatusEnum } from '@pe/checkout/types';\nimport { CustomElementService } from '@pe/checkout/utils';\n\nimport { NodePaymentDetailsResponseInterface } from '../../types';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'stripe-direct-debit-shared-finish',\n templateUrl: './finish.component.html',\n styleUrls: ['./finish.component.scss'],\n})\nexport class FinishComponent extends AbstractFinishComponent {\n protected customElementService = inject(CustomElementService);\n\n constructor(injector: Injector) {\n super(injector);\n (window as any).PayeverStatic?.SvgIconsLoader?.loadIcons(\n ['checkmark-32', 'x-round-white-cross-24', 'error-128'],\n null,\n this.customElementService.shadowRoot\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 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 { PollUpdatePayment } from '@pe/checkout/store';\nimport {\n NodePaymentResponseInterface,\n PaymentStatusEnum,\n} from '@pe/checkout/types';\n\nimport { NodeAdditionalPaymentDetailsInterface, NodePaymentDetailsResponseInterface } from '../types';\n\n\n@Injectable()\nexport class PaymentService extends AbstractPaymentService {\n\n private nodeFlowService = this.injector.get(NodeFlowService);\n\n postPayment(): Observable> {\n const nodeAdditionalPaymentDetails: NodeAdditionalPaymentDetailsInterface = {};\n nodeAdditionalPaymentDetails.dynamicDescriptor = this.flow.extra?.dynamic_descriptor;\n this.nodeFlowService.assignPaymentDetails(nodeAdditionalPaymentDetails);\n\n return this.nodeFlowService.postPayment().pipe(\n switchMap(() =>\n this.store.dispatch(new PollUpdatePayment(\n Object.values(PaymentStatusEnum).filter(status => status !== PaymentStatusEnum.STATUS_IN_PROCESS))\n ),\n ),\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 } 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","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 \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, 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 { 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(``, '');\n } else if (/\\S+@\\S+/.test(value as string)) {\n parsedText = parsedText\n .replace(`<${key}>`, ``)\n .replace(``, '');\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,\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 { ThreatMetrixService } from '@pe/checkout/tmetrix';\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 threatMetrixService = inject(ThreatMetrixService);\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 riskSessionId = this.threatMetrixService.getLastRiskId(this.flow.id, this.paymentMethod);\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 ...(riskSessionId && { riskSessionId }),\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(``, '');\n } else if (/\\S+@\\S+/.test(value as string)) {\n parsedText = parsedText\n .replace(`<${key}>`, ``)\n .replace(``, '');\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,\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 { ThreatMetrixService } from '@pe/checkout/tmetrix';\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 threatMetrixService = inject(ThreatMetrixService);\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 riskSessionId = this.threatMetrixService.getLastRiskId(this.flow.id, this.paymentMethod);\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 ...(riskSessionId && { riskSessionId }),\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(``, '');\n } else if (/\\S+@\\S+/.test(value as string)) {\n parsedText = parsedText\n .replace(`<${key}>`, ``)\n .replace(``, '');\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,\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 { ThreatMetrixService } from '@pe/checkout/tmetrix';\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 threatMetrixService = inject(ThreatMetrixService);\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 riskSessionId = this.threatMetrixService.getLastRiskId(this.flow.id, this.paymentMethod);\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 ...(riskSessionId && { riskSessionId }),\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 { BehaviorSubject } from 'rxjs';\nimport { filter, map, switchMap } from 'rxjs/operators';\n\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\n @Output() continue = new EventEmitter();\n @Output() buttonText: 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 ).pipe(\n map(loaded => ({\n inProgress: false,\n loaded,\n }))\n ))\n );\n\n abstract triggerSubmit(): void;\n\n ngOnInit(): void {\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 isRedirecting = false;\n\n set href(href: string) {\n this.isRedirecting = true;\n window.top.location.href = href;\n }\n\n get href(): string {\n return window.top.location.href;\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 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 { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\n\n@Pipe({ name: 'safeUrl' })\nexport class SafeUrlPipe implements PipeTransform {\n\n constructor(private sanitizer: DomSanitizer) {\n }\n\n transform(value: string): SafeUrl {\n return this.sanitizer.bypassSecurityTrustResourceUrl(value);\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","VALID_NAME_CHARACTERS","namePatternValidator","control","val","value","test","invalidName","ZipCodeValidators","zipCodePattern","pattern","RegExp","zipCodeInvalid","match","POSTAL_PATTERNS_BY_COUNTRY","DE","NO","AT","NOT_ONLY_WHITE_SPACES","Validators","AbstractAddressEditComponent","CompositeForm","formGroup","fb","group","email","emailRequiredValidator","salutation","required","firstName","lastName","country","city","fullAddress","street","AddressValidators","houseNumberRequired","streetName","streetNumber","socialSecurityNumber","zipCode","Required","phone","phoneMask","addressMask","addressService","injector","get","AddressService","analyticsFormService","AnalyticsFormService","addressMapperService","AddressMapperService","customElementService","CustomElementService","addressAutocompleteService","AddressAutocompleteService","isFilledFieldsReadonly","addressItems$","salutationFormOptions","SALUTATION_OPTIONS","selectAddressFormOptions","SELECT_ADDRESS_OPTIONS","shippingAddresses","map","label","countriesOptions$","getCountries","pipe","shareReplay","selectAddressControl","disabled","countryChanges$","defer","valueChanges","startWith","ngControl","ngOnInit","super","window","PayeverStatic","SvgIconsLoader","loadIcons","shadowRoot","basePhoneValidatorRequired","isPhoneRequired","paymentSettings","push","phoneValid","codeRequired","phonePattern","phonePatternCodeRequired","setValidators","updateValueAndValidity","loadLibPhoneNumber","updateZipCodeValidation$","tap","zipCodeValid","postalCodePattern","updatePhoneValidation$","isCodeForPhoneRequired","controlName","$localize","validators","PhoneValidators","countryCode","updateFullAddress$","merge","split","trim","setValue","scan","acc","curr","debounceTime","switchMap","countries","parseFullAddress","patchValue","emitEvent","selectAddressChange$","newValue","markFieldsAsReadonly","takeUntil","destroy$","subscribe","fullAddressChange","Object","values","controls","forEach","disable","__webpack_require__","e","then","bind","m","parsePhoneNumber","fesm2022_core","lG2","SelectSnapshot","FlowState","tslib_es6","AddressViewModule","componentFactoryResolver","resolveAddressSummaryComponent","resolveComponentFactory","AddressSummaryComponent","core","UiModule","AddressFullNamePipe","transform","address","hideSalutation","SALUTATION_TRANSLATION","filter","v","join","Yjl","pure","AddressLinePipe","localeConstantsService","countries$","loadCountries","getLang","toUpperCase","i1","ctx_r4","billingAddress","ctx_r5","parsedBilling_r2","AddressSummaryComponent_ng_container_0_p_1_span_1_Template","AddressSummaryComponent_ng_container_0_p_1_span_4_Template","AddressSummaryComponent_ng_container_0_p_1_span_6_Template","ctx_r3","AddressSummaryComponent_ng_container_0_p_1_Template","ctx_r0","ctx_r11","shippingAddress","ctx_r12","parsedShipping_r9","AddressSummaryComponent_ng_container_3_p_1_span_1_Template","AddressSummaryComponent_ng_container_3_p_1_span_4_Template","AddressSummaryComponent_ng_container_3_p_1_span_6_Template","ctx_r10","AddressSummaryComponent_ng_container_3_p_1_Template","ctx_r1","find","id","shippingAddressId","AddressSummaryComponent_ng_container_0_Template","AddressSummaryComponent_ng_container_3_Template","BaseContainerComponent","AbstractContainerComponent","errorMessage","AllianzApiService","AbstractApiService","getPayment","connectionId","paymentId","http","post","env","thirdParty","payments","Yz7","factory","ɵfac","AllianzFlowService","BaseNodeFlowService","allianzApiService","store","Store","paymentResponse","selectSnapshot","PaymentState","response","dispatch","PatchPaymentResponse","PaymentService","AbstractPaymentService","nodeFlowService","NodeFlowService","postPayment","BfsApiService","BfsFlowService","bfsApiService","PE_ENV","externalRedirectStorage","ExternalRedirectStorage","LocaleConstantsService","preparePayment","delayWhen","paymentDetails","redirectUrl","saveDataBeforeRedirect","Error","nodePaymentDetails","lang","checkoutWrapper","frontend","guestToken","AuthSelectors","accessToken","frontendFinishUrl","URL","frontendCancelUrl","origin","searchParams","set","toString","assignPaymentDetails","nodeResult","payment","total","currency","businessName","createdAt","isPosPayment","billingAddressName","orderId","isCanShowTransactionLink","transactionLink","ctx_r2","applicationNumber","canChangePaymentMethod","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","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","onClose","FinishComponent_ng_container_1_Template","buttons","getIframeCallbackUrl","isLoading","isChangingPaymentMethod","asSinglePayment","nodeApiService","NodeApiService","getShopUrls","shopUrls","setPaymentDetails","PaymentServiceV2","loadScript","startIvyCheckout","fromMutationObserver","document","body","first","SharedModule","provide","ABSTRACT_PAYMENT_SERVICE","useClass","imports","FinishModule","apiService","ApiService","FinishComponent_ng_container_1_checkout_sdk_finish_status_fail_2_Template","FinishComponent_ng_container_1_checkout_sdk_finish_status_unknown_3_Template","standalone","NgIf","i2","i3","i4","changeDetection","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","frontendFailureUrl","failureUrl","flow$","takeWhile","state","finished","FlowStateEnum","FINISH","Select","Observable","SdkFinishModule","SdkStorageModule","FinishContainerComponent","AbstractFinishContainerComponent","showFinishModalFromExistingPayment","getFinalResponse","initPaymentMethod","paymentMethod","cdr","markForCheck","cleanUp","close","tryAgain","$event","changePayment","showCloseButton","isDisableChangePayment","PaymentDetailsContainerComponent","continue","EventEmitter","emit","outputs","encapsulation","SantanderNoInvoiceModule","BasePaymentModule","resolveFinishContainerComponent","resolvePaymentDetailsStepContainerComponent","PAYMENT_SETTINGS","useValue","addressSettings","BILLING_ADDRESS_SETTINGS","hasNodeOptions","HAS_NODE_FORM_OPTIONS","UtilStepService","getYesNoOptions","translateOptions","keysPool","valuesSet","Set","reduce","item","has","add","withEmpty","nodeFormOptions","countriesPromise","getCountryList","from","mapCountries","config","seCountry","options","countryCodes","c","String","result","unshift","mapTo","of","getNodeResultDetails","mandateUrl","mandateReference","FinishComponent_ng_container_1_checkout_sdk_finish_status_success_1_div_1_Template","nodeAdditionalPaymentDetails","dynamicDescriptor","extra","dynamic_descriptor","PollUpdatePayment","AbstractFinishTemplateComponent","isCheckStatusTimeout","translations","processingTitle","processingText","_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","postbackUrl","AbstractPaymentContainerComponent","finishModalShown","isShowingWallet","isCheckStatusProcessing","paymentPreInitialize","providedIn","postPaymentSubject$","ReplaySubject","postPayment$","asObservable","confirmCardPayment$","BehaviorSubject","UtilsModule","FormsModule","ReactiveFormsModule","SdkFormUtilsModule","isFinishModalShown$","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","event","specificStatus","_angular_core__WEBPACK_IMPORTED_MODULE_9__","viewQuery","i18n_1","FinishComponent_ng_container_2_Template","PluginsModule","throwError","successUrl","frontendSuccessUrl","forceRedirect","getPaymentData","TermsService","cache","Map","getTerms","selectOnce","fetchTerms","terms","entries","key","O","parseText","text","metadata","documentId","camelCasedMeta","camelCase","parsedText","assetsLinks","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","threatMetrixService","ThreatMetrixService","ziniaBNPLUtilsService","redirect","pendingUrl","riskSessionId","getLastRiskId","isPhoneValidated","deviceInfo","browserInfo","includes","verifyValue","storage","getFromCache","f","JSON","stringify","parse","ZiniaBnplApiService","BaseInquiryContainerComponent","paymentHelperService","PaymentHelperService","threatMetrixLoad$","threatMetrixProcess$","d","nodeInitFor","loaded","inProgress","setPaymentLoading","reloadThreatMetrix","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","cartWithoutCoupon","originalPrice","price","name","codeData","quantity","PatchFlow","removeCoupon","updatedCart","CouponsModule","SdkPluginsModule","isRedirecting","top","location","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","paymentItems","channelSource","channelType","flowAddressToNodePaymentAddress","a","identifier","priceNet","vatRate","vat","thumbnail","image","sku","productId","_id","extraData","subscriptionPlan","extractStreetNameAndNumber","SetPaymentDetails","PatchPaymentDetails","details","getApplicationData","transactionId","getCreditRates","params","PostPayment","editTransaction","EditPayment","updatePayment","UpdatePayment","pollPaymentUntilStatus","statuses","PollPaymentForStatus","select","PaymentErrorComponent","doTryAgain","errorText","SafeUrlPipe","sanitizer","bypassSecurityTrustResourceUrl","ShippingApiService","attachShipping","integrationSubscriptionId","shipping","requestShippingData","products","shippingItems","WeightUnitEnum","kg","DimensionUnitEnum","cm","ShippingConverterService","mediaService","currencyPipe","PeCurrencyPipe","getCartItemIdsFromFlow","convertFlowAddressToShippingAddress","stateProvinceCode","mobilePhone","convertFlowCartToShippingProducts","cartItem","product","p","variants","pp","ProductTypes","Physical","shippingProduct","uuid","images","weight","parseFloat","weightUnit","dimensionUnit","convertShippingToNormilized","methods","desc","formatDescription","rate","icon","title","description","saveData","shippingFee","translationKey","ShippingStateService","converterService","sdkApiService","productsStateService","lastError","shippingsCache","getShippings","resetCache","hash","makeHash","subject","processed","getDataFromCache","getShippingsData","ret","saveDataToCache","getShippingsOnce","observer","errorSub","take","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","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","api","getPublishKey","initData","noticeUrl","shippingOption","shippingAddressRecipient","recipient","carrier","postalCode","region","addressLine","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","getValue","updateWith","option","EMPTY"],"sourceRoot":"webpack:///"}