UNPKG

ngx-stripe

Version:

Collect Payments with Stripe: The Angular Way

1 lines 330 kB
{"version":3,"file":"ngx-stripe.mjs","sources":["../../../projects/ngx-stripe/src/lib/directives/stripe-element-loading-template.directive.ts","../../../projects/ngx-stripe/src/lib/interfaces/ngx-stripe.interface.ts","../../../projects/ngx-stripe/src/lib/services/stripe-instance.class.ts","../../../projects/ngx-stripe/src/lib/services/window-ref.service.ts","../../../projects/ngx-stripe/src/lib/services/document-ref.service.ts","../../../projects/ngx-stripe/src/lib/services/api-loader.service.ts","../../../projects/ngx-stripe/src/lib/services/stripe.service.ts","../../../projects/ngx-stripe/src/lib/services/stripe-elements.service.ts","../../../projects/ngx-stripe/src/lib/directives/elements.directive.ts","../../../projects/ngx-stripe/src/lib/components/address.component.ts","../../../projects/ngx-stripe/src/lib/components/affirm-message.component.ts","../../../projects/ngx-stripe/src/lib/components/afterpay-clearpay-message.component.ts","../../../projects/ngx-stripe/src/lib/components/card.component.ts","../../../projects/ngx-stripe/src/lib/directives/card-group.directive.ts","../../../projects/ngx-stripe/src/lib/components/card-number.component.ts","../../../projects/ngx-stripe/src/lib/components/card-expiry.component.ts","../../../projects/ngx-stripe/src/lib/components/card-cvc.component.ts","../../../projects/ngx-stripe/src/lib/components/eps-bank.component.ts","../../../projects/ngx-stripe/src/lib/components/express-checkout.component.ts","../../../projects/ngx-stripe/src/lib/components/fpx-bank.component.ts","../../../projects/ngx-stripe/src/lib/components/iban.component.ts","../../../projects/ngx-stripe/src/lib/components/ideal-bank.component.ts","../../../projects/ngx-stripe/src/lib/components/issuing-card-cvc.component.ts","../../../projects/ngx-stripe/src/lib/components/issuing-card-expiry.component.ts","../../../projects/ngx-stripe/src/lib/components/issuing-card-number.component.ts","../../../projects/ngx-stripe/src/lib/components/issuing-card-pin.component.ts","../../../projects/ngx-stripe/src/lib/components/link-authentication.component.ts","../../../projects/ngx-stripe/src/lib/components/p24-bank.component.ts","../../../projects/ngx-stripe/src/lib/components/au-bank-account.component.ts","../../../projects/ngx-stripe/src/lib/components/payment-element.component.ts","../../../projects/ngx-stripe/src/lib/components/payment-method-messaging.component.ts","../../../projects/ngx-stripe/src/lib/components/payment-request-button.component.ts","../../../projects/ngx-stripe/src/lib/services/stripe-factory.service.ts","../../../projects/ngx-stripe/src/lib/ngx-stripe.module.ts","../../../projects/ngx-stripe/src/lib/utils/inject-stripe.ts","../../../projects/ngx-stripe/src/public_api.ts","../../../projects/ngx-stripe/src/ngx-stripe.ts"],"sourcesContent":["import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[ngxStripeLoadingTemplate]',\n standalone: true\n})\nexport class NgxStripeElementLoadingTemplateDirective {\n constructor(public templateRef: TemplateRef<NgxStripeElementLoadingTemplateDirective>) {}\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { StripeConstructorOptions } from '@stripe/stripe-js';\n\nexport const STRIPE_PUBLISHABLE_KEY = new InjectionToken<string>('Stripe Publishable Key');\nexport const STRIPE_OPTIONS = new InjectionToken<StripeConstructorOptions>('Stripe Options');\n\nexport const NGX_STRIPE_VERSION = new InjectionToken<string>('NGX_STRIPE_VERSION');\n","import { BehaviorSubject, from, Observable } from 'rxjs';\nimport { filter, first, map, switchMap } from 'rxjs/operators';\n\nimport {\n ConfirmAcssDebitPaymentData,\n ConfirmAcssDebitPaymentOptions,\n ConfirmAfterpayClearpayPaymentData,\n ConfirmAfterpayClearpayPaymentOptions,\n ConfirmAlipayPaymentData,\n ConfirmAlipayPaymentOptions,\n ConfirmAuBecsDebitPaymentData,\n ConfirmAuBecsDebitSetupData,\n ConfirmBancontactPaymentData,\n ConfirmBancontactPaymentOptions,\n ConfirmBoletoPaymentData,\n ConfirmBoletoPaymentOptions,\n ConfirmCardPaymentData,\n ConfirmCardPaymentOptions,\n ConfirmEpsPaymentData,\n ConfirmEpsPaymentOptions,\n ConfirmFpxPaymentData,\n ConfirmFpxPaymentOptions,\n ConfirmGiropayPaymentData,\n ConfirmGiropayPaymentOptions,\n ConfirmGrabPayPaymentData,\n ConfirmGrabPayPaymentOptions,\n ConfirmIdealPaymentData,\n ConfirmIdealPaymentOptions,\n ConfirmKlarnaPaymentData,\n ConfirmKlarnaPaymentOptions,\n ConfirmOxxoPaymentData,\n ConfirmOxxoPaymentOptions,\n ConfirmP24PaymentData,\n ConfirmP24PaymentOptions,\n ConfirmCardSetupData,\n ConfirmCardSetupOptions,\n ConfirmSepaDebitPaymentData,\n ConfirmSofortPaymentData,\n ConfirmWechatPayPaymentData,\n ConfirmWechatPayPaymentOptions,\n ConfirmSepaDebitSetupData,\n CreatePaymentMethodData,\n VerifyMicrodepositsForPaymentData,\n ConfirmAcssDebitSetupData,\n ConfirmAcssDebitSetupOptions,\n CreateSourceData,\n CreateTokenIbanData,\n CreateTokenCardData,\n CreateTokenPiiData,\n CreateTokenBankAccountData,\n PaymentRequest,\n PaymentRequestOptions,\n RedirectToCheckoutOptions,\n RetrieveSourceParam,\n Stripe,\n StripeCardElement,\n StripeCardNumberElement,\n StripeCardCvcElement,\n StripeConstructorOptions,\n StripeElements,\n StripeElement,\n StripeError,\n StripeIbanElement,\n TokenCreateParams,\n ConfirmBacsDebitSetupData,\n ConfirmBancontactSetupData,\n ConfirmIdealSetupData,\n ConfirmSofortSetupData,\n VerifyMicrodepositsForSetupData,\n WrapperLibrary,\n VerificationSessionResult,\n ConfirmPayPalPaymentData,\n ConfirmPayPalSetupData,\n ConfirmPaymentData,\n ConfirmCustomerBalancePaymentData,\n ConfirmCustomerBalancePaymentOptions,\n ConfirmPayNowPaymentData,\n ConfirmPayNowPaymentOptions,\n ConfirmPromptPayPaymentData,\n ConfirmPromptPayPaymentOptions,\n ConfirmAffirmPaymentData,\n ConfirmAffirmPaymentOptions,\n ConfirmSofortPaymentOptions,\n ConfirmSofortSetupOptions,\n ConfirmKonbiniPaymentData,\n ConfirmKonbiniPaymentOptions,\n ConfirmUsBankAccountPaymentData,\n CollectBankAccountForPaymentOptions,\n ConfirmUsBankAccountSetupData,\n CollectBankAccountForSetupOptions,\n PaymentIntentResult,\n PaymentMethodResult,\n SetupIntentResult,\n TokenResult,\n SourceResult,\n ConfirmPixPaymentData,\n ConfirmPixPaymentOptions,\n RadarSessionPayload,\n ProcessOrderResult,\n RetrieveOrderResult,\n FinancialConnectionsSessionResult,\n CollectBankAccountTokenResult,\n EphemeralKeyNonceResult,\n ProcessOrderParams,\n CollectFinancialConnectionsAccountsOptions,\n CollectBankAccountTokenOptions,\n EphemeralKeyNonceOptions,\n StripeElementsOptionsClientSecret,\n StripeElementsOptionsMode,\n StripeElementsOptions,\n ConfirmBlikPaymentData,\n ConfirmBlikPaymentOptions,\n ConfirmCashappPaymentData,\n ConfirmCashappPaymentOptions,\n PaymentIntentOrSetupIntentResult,\n CreatePaymentMethodFromElements,\n CreatePaymentMethodFromElement,\n ConfirmCashappSetupData,\n ConfirmCashappSetupOptions,\n StripeCheckoutOptions,\n StripeCheckout,\n StripeEmbeddedCheckoutOptions,\n StripeEmbeddedCheckout,\n ConfirmMobilepayPaymentData,\n ConfirmMobilepayPaymentOptions,\n CreateConfirmationToken,\n ConfirmationTokenResult,\n ConfirmSetupData\n} from '@stripe/stripe-js';\n\nimport { StripeServiceInterface } from '../interfaces/stripe-instance.interface';\n\nimport { WindowRef } from './window-ref.service';\nimport { LazyStripeAPILoader, LazyStripeAPILoaderStatus } from './api-loader.service';\n\nexport class StripeInstance implements StripeServiceInterface {\n private stripe$ = new BehaviorSubject<Stripe | undefined>(undefined);\n stripe = this.stripe$.asObservable().pipe(filter((stripe) => Boolean(stripe))) as Observable<Stripe>;\n\n constructor(\n private version: string,\n private loader: LazyStripeAPILoader,\n private window: WindowRef,\n private key: string,\n private options?: StripeConstructorOptions\n ) {\n this.loader\n .asStream()\n .pipe(\n filter((status: LazyStripeAPILoaderStatus) => status.loaded === true),\n first(),\n map(() => (this.window.getNativeWindow() as any).Stripe)\n )\n .subscribe((stripeInstance: any) => {\n const stripe = this.options\n ? (stripeInstance(this.key, this.options) as Stripe)\n : (stripeInstance(this.key) as Stripe);\n\n stripe.registerAppInfo(this.getNgxStripeAppInfo(this.version));\n this.stripe$.next(stripe);\n });\n }\n\n getInstance(): Stripe {\n return this.stripe$.getValue() as Stripe;\n }\n\n elements(options?: StripeElementsOptionsClientSecret): Observable<StripeElements>;\n elements(options?: StripeElementsOptionsMode): Observable<StripeElements>;\n elements(options?: StripeElementsOptions): Observable<StripeElements>;\n elements(options?): Observable<StripeElements> {\n return this.stripe.pipe(\n map((stripe: Stripe) => stripe.elements(options)),\n first()\n );\n }\n\n redirectToCheckout(options: RedirectToCheckoutOptions): Observable<never | { error: StripeError }> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.redirectToCheckout(options))),\n first()\n );\n }\n\n confirmPayment(options: {\n elements: StripeElements;\n confirmParams?: Partial<ConfirmPaymentData>;\n redirect: 'if_required';\n }): Observable<PaymentIntentResult>;\n confirmPayment(options: {\n elements?: StripeElements;\n clientSecret: string;\n confirmParams?: Partial<ConfirmPaymentData>;\n redirect: 'if_required';\n }): Observable<PaymentIntentResult>;\n confirmPayment(options: {\n elements: StripeElements;\n confirmParams: ConfirmPaymentData;\n redirect?: 'always';\n }): Observable<never | { error: StripeError }>;\n confirmPayment(options: {\n elements?: StripeElements;\n clientSecret: string;\n confirmParams: ConfirmPaymentData;\n redirect?: 'always';\n }): Observable<never | { error: StripeError }>;\n confirmPayment(options) {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmPayment(options))),\n first()\n );\n }\n\n confirmAcssDebitPayment(\n clientSecret: string,\n data?: ConfirmAcssDebitPaymentData,\n options?: ConfirmAcssDebitPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmAcssDebitPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmUsBankAccountPayment(\n clientSecret: string,\n data?: ConfirmUsBankAccountPaymentData\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmUsBankAccountPayment(clientSecret, data))),\n first()\n );\n }\n\n confirmAlipayPayment(\n clientSecret: string,\n data?: ConfirmAlipayPaymentData,\n options?: ConfirmAlipayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmAlipayPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmAuBecsDebitPayment(\n clientSecret: string,\n data?: ConfirmAuBecsDebitPaymentData\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmAuBecsDebitPayment(clientSecret, data))),\n first()\n );\n }\n\n confirmBancontactPayment(\n clientSecret: string,\n data?: ConfirmBancontactPaymentData,\n options?: ConfirmBancontactPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmBancontactPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmBlikPayment(\n clientSecret: string,\n data?: ConfirmBlikPaymentData,\n options?: ConfirmBlikPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmBlikPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmBoletoPayment(\n clientSecret: string,\n data?: ConfirmBoletoPaymentData,\n options?: ConfirmBoletoPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmBoletoPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmCardPayment(\n clientSecret: string,\n data?: ConfirmCardPaymentData,\n options?: ConfirmCardPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmCardPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmCashappPayment(\n clientSecret: string,\n data?: ConfirmCashappPaymentData,\n options?: ConfirmCashappPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmCashappPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmCustomerBalancePayment(\n clientSecret: string,\n data: ConfirmCustomerBalancePaymentData,\n options: ConfirmCustomerBalancePaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmCustomerBalancePayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmEpsPayment(\n clientSecret: string,\n data?: ConfirmEpsPaymentData,\n options?: ConfirmEpsPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmEpsPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmFpxPayment(\n clientSecret: string,\n data?: ConfirmFpxPaymentData,\n options?: ConfirmFpxPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmFpxPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmGiropayPayment(\n clientSecret: string,\n data?: ConfirmGiropayPaymentData,\n options?: ConfirmGiropayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmGiropayPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmGrabPayPayment(\n clientSecret: string,\n data?: ConfirmGrabPayPaymentData,\n options?: ConfirmGrabPayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmGrabPayPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmIdealPayment(\n clientSecret: string,\n data?: ConfirmIdealPaymentData,\n options?: ConfirmIdealPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmIdealPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmKlarnaPayment(\n clientSecret: string,\n data?: ConfirmKlarnaPaymentData,\n options?: ConfirmKlarnaPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmKlarnaPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmKonbiniPayment(\n clientSecret: string,\n data?: ConfirmKonbiniPaymentData,\n options?: ConfirmKonbiniPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmKonbiniPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmMobilepayPayment(\n clientSecret: string,\n data?: ConfirmMobilepayPaymentData,\n options?: ConfirmMobilepayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmMobilepayPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmOxxoPayment(\n clientSecret: string,\n data?: ConfirmOxxoPaymentData,\n options?: ConfirmOxxoPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmOxxoPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmP24Payment(\n clientSecret: string,\n data?: ConfirmP24PaymentData,\n options?: ConfirmP24PaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmP24Payment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmPayNowPayment(\n clientSecret: string,\n data?: ConfirmPayNowPaymentData,\n options?: ConfirmPayNowPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmPayNowPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmPayPalPayment(clientSecret: string, data?: ConfirmPayPalPaymentData): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmPayPalPayment(clientSecret, data))),\n first()\n );\n }\n\n confirmPixPayment(\n clientSecret: string,\n data?: ConfirmPixPaymentData,\n options?: ConfirmPixPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmPixPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmPromptPayPayment(\n clientSecret: string,\n data?: ConfirmPromptPayPaymentData,\n options?: ConfirmPromptPayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmPromptPayPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmSepaDebitPayment(clientSecret: string, data?: ConfirmSepaDebitPaymentData): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmSepaDebitPayment(clientSecret, data))),\n first()\n );\n }\n\n confirmSofortPayment(\n clientSecret: string,\n data?: ConfirmSofortPaymentData,\n options?: ConfirmSofortPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmSofortPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmWechatPayPayment(\n clientSecret: string,\n data?: ConfirmWechatPayPaymentData,\n options?: ConfirmWechatPayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmWechatPayPayment(clientSecret, data, options))),\n first()\n );\n }\n\n handleCardAction(clientSecret: string): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.handleCardAction(clientSecret))),\n first()\n );\n }\n\n handleNextAction(options: { clientSecret: string }): Observable<PaymentIntentOrSetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.handleNextAction(options))),\n first()\n );\n }\n\n verifyMicrodepositsForPayment(\n clientSecret: string,\n data?: VerifyMicrodepositsForPaymentData\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.verifyMicrodepositsForPayment(clientSecret, data))),\n first()\n );\n }\n\n createRadarSession(): Observable<RadarSessionPayload> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.createRadarSession())),\n first()\n );\n }\n\n collectBankAccountForPayment(options: CollectBankAccountForPaymentOptions): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.collectBankAccountForPayment(options))),\n first()\n );\n }\n\n createPaymentMethod(paymentMethodData: CreatePaymentMethodData): Observable<PaymentMethodResult>;\n createPaymentMethod(options: CreatePaymentMethodFromElements): Observable<PaymentMethodResult>;\n createPaymentMethod(options: CreatePaymentMethodFromElement): Observable<PaymentMethodResult>;\n createPaymentMethod(options) {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.createPaymentMethod(options))),\n first()\n );\n }\n\n createConfirmationToken(options: CreateConfirmationToken): Observable<ConfirmationTokenResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.createConfirmationToken(options))),\n first()\n );\n }\n\n retrievePaymentIntent(clientSecret: string): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.retrievePaymentIntent(clientSecret))),\n first()\n );\n }\n\n confirmSetup(options: {\n elements: StripeElements;\n confirmParams?: Partial<ConfirmSetupData>;\n redirect: 'if_required';\n }): Observable<SetupIntentResult>;\n confirmSetup(options: {\n elements?: StripeElements;\n clientSecret: string;\n confirmParams?: Partial<ConfirmSetupData>;\n redirect: 'if_required';\n }): Observable<SetupIntentResult>;\n confirmSetup(options: {\n elements: StripeElements;\n confirmParams: ConfirmSetupData;\n redirect?: 'always';\n }): Observable<never | { error: StripeError }>;\n confirmSetup(options: {\n elements?: StripeElements;\n clientSecret: string;\n confirmParams: ConfirmSetupData;\n redirect?: 'always';\n }): Observable<never | { error: StripeError }>;\n confirmSetup(options) {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmSetup(options))),\n first()\n );\n }\n\n confirmAcssDebitSetup(\n clientSecret: string,\n data?: ConfirmAcssDebitSetupData,\n options?: ConfirmAcssDebitSetupOptions\n ): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmAcssDebitSetup(clientSecret, data, options))),\n first()\n );\n }\n\n confirmUsBankAccountSetup(clientSecret: string, data?: ConfirmUsBankAccountSetupData): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmUsBankAccountSetup(clientSecret, data))),\n first()\n );\n }\n\n confirmAuBecsDebitSetup(clientSecret: string, data?: ConfirmAuBecsDebitSetupData): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmAuBecsDebitSetup(clientSecret, data))),\n first()\n );\n }\n\n confirmBacsDebitSetup(clientSecret: string, data?: ConfirmBacsDebitSetupData): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmBacsDebitSetup(clientSecret, data))),\n first()\n );\n }\n\n confirmBancontactSetup(clientSecret: string, data?: ConfirmBancontactSetupData): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmBancontactSetup(clientSecret, data))),\n first()\n );\n }\n\n confirmCardSetup(\n clientSecret: string,\n data?: ConfirmCardSetupData,\n options?: ConfirmCardSetupOptions\n ): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmCardSetup(clientSecret, data, options))),\n first()\n );\n }\n\n confirmCashappSetup(\n clientSecret: string,\n data?: ConfirmCashappSetupData,\n options?: ConfirmCashappSetupOptions\n ): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmCashappSetup(clientSecret, data, options))),\n first()\n );\n }\n\n confirmIdealSetup(clientSecret: string, data?: ConfirmIdealSetupData): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmIdealSetup(clientSecret, data))),\n first()\n );\n }\n\n confirmPayPalSetup(clientSecret: string, data?: ConfirmPayPalSetupData): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmPayPalSetup(clientSecret, data))),\n first()\n );\n }\n\n confirmSepaDebitSetup(clientSecret: string, data?: ConfirmSepaDebitSetupData): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmSepaDebitSetup(clientSecret, data))),\n first()\n );\n }\n\n confirmSofortSetup(\n clientSecret: string,\n data?: ConfirmSofortSetupData,\n options?: ConfirmSofortSetupOptions\n ): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmSofortSetup(clientSecret, data, options))),\n first()\n );\n }\n\n confirmAffirmPayment(\n clientSecret: string,\n data?: ConfirmAffirmPaymentData,\n options?: ConfirmAffirmPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmAffirmPayment(clientSecret, data, options))),\n first()\n );\n }\n\n confirmAfterpayClearpayPayment(\n clientSecret: string,\n data?: ConfirmAfterpayClearpayPaymentData,\n options?: ConfirmAfterpayClearpayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.confirmAfterpayClearpayPayment(clientSecret, data, options))),\n first()\n );\n }\n\n verifyMicrodepositsForSetup(\n clientSecret: string,\n data?: VerifyMicrodepositsForSetupData\n ): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.verifyMicrodepositsForSetup(clientSecret, data))),\n first()\n );\n }\n\n collectBankAccountForSetup(options: CollectBankAccountForSetupOptions): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.collectBankAccountForSetup(options))),\n first()\n );\n }\n\n retrieveSetupIntent(clientSecret: string): Observable<SetupIntentResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.retrieveSetupIntent(clientSecret))),\n first()\n );\n }\n\n processOrder(options: {\n elements: StripeElements;\n confirmParams?: Partial<ProcessOrderParams>;\n redirect: 'if_required';\n }): Observable<ProcessOrderResult>;\n processOrder(options: {\n elements: StripeElements;\n confirmParams: ProcessOrderParams;\n redirect?: 'always';\n }): Observable<never | { error: StripeError }>;\n processOrder(options) {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.processOrder(options))),\n first()\n );\n }\n\n retrieveOrder(clientSecret: string): Observable<RetrieveOrderResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.retrieveOrder(clientSecret))),\n first()\n );\n }\n\n paymentRequest(options: PaymentRequestOptions): PaymentRequest {\n const stripe = this.getInstance();\n return stripe.paymentRequest(options);\n }\n\n createToken(tokenType: StripeIbanElement, data: CreateTokenIbanData): Observable<TokenResult>;\n createToken(\n tokenType: StripeCardElement | StripeCardNumberElement,\n data?: CreateTokenCardData\n ): Observable<TokenResult>;\n createToken(tokenType: 'pii', data: CreateTokenPiiData): Observable<TokenResult>;\n createToken(tokenType: 'bank_account', data: CreateTokenBankAccountData): Observable<TokenResult>;\n createToken(tokenType: 'cvc_update', element?: StripeCardCvcElement): Observable<TokenResult>;\n createToken(tokenType: 'account', data: TokenCreateParams.Account): Observable<TokenResult>;\n createToken(tokenType: 'person', data: TokenCreateParams.Person): Observable<TokenResult>;\n createToken(tokenType, data) {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.createToken(tokenType, data))),\n first()\n );\n }\n\n createSource(element: StripeElement, sourceData: CreateSourceData): Observable<SourceResult>;\n createSource(sourceData: CreateSourceData): Observable<SourceResult>;\n createSource(a, b?): Observable<SourceResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.createSource(a, b))),\n first()\n );\n }\n\n retrieveSource(source: RetrieveSourceParam): Observable<SourceResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.retrieveSource(source))),\n first()\n );\n }\n\n verifyIdentity(clientSecret: string): Observable<VerificationSessionResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.verifyIdentity(clientSecret))),\n first()\n );\n }\n\n collectFinancialConnectionsAccounts(\n options: CollectFinancialConnectionsAccountsOptions\n ): Observable<FinancialConnectionsSessionResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.collectFinancialConnectionsAccounts(options))),\n first()\n );\n }\n\n collectBankAccountToken(options: CollectBankAccountTokenOptions): Observable<CollectBankAccountTokenResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.collectBankAccountToken(options))),\n first()\n );\n }\n\n createEphemeralKeyNonce(options: EphemeralKeyNonceOptions): Observable<EphemeralKeyNonceResult> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.createEphemeralKeyNonce(options))),\n first()\n );\n }\n\n initCheckout(options: StripeCheckoutOptions): Observable<StripeCheckout> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.initCheckout(options))),\n first()\n );\n }\n\n initEmbeddedCheckout(options: StripeEmbeddedCheckoutOptions): Observable<StripeEmbeddedCheckout> {\n return this.stripe.pipe(\n switchMap((stripe) => from(stripe.initEmbeddedCheckout(options))),\n first()\n );\n }\n\n /**\n * @deprecated\n */\n handleCardPayment(clientSecret: string, element?, data?) {\n return this.stripe.pipe(\n switchMap((stripe) => from((stripe as any).handleCardPayment(clientSecret, element, data))),\n first()\n ) as Observable<PaymentIntentResult>;\n }\n\n /**\n * @deprecated\n */\n confirmPaymentIntent(clientSecret: string, element?, data?) {\n return this.stripe.pipe(\n switchMap((stripe) => from((stripe as any).confirmPaymentIntent(clientSecret, element, data))),\n first()\n ) as Observable<PaymentIntentResult>;\n }\n\n /**\n * @deprecated\n */\n handleCardSetup(clientSecret: string, element?, data?) {\n return this.stripe.pipe(\n switchMap((stripe) => from((stripe as any).handleCardSetup(clientSecret, element, data))),\n first()\n ) as Observable<SetupIntentResult>;\n }\n\n /**\n * @deprecated\n */\n confirmSetupIntent(clientSecret: string, element?, data?) {\n return this.stripe.pipe(\n switchMap((stripe) => from((stripe as any).confirmSetupIntent(clientSecret, element, data))),\n first()\n ) as Observable<SetupIntentResult>;\n }\n\n /**\n * @deprecated\n */\n handleFpxPayment(clientSecret: string, element?, data?) {\n return this.stripe.pipe(\n switchMap((stripe) => from((stripe as any).handleFpxPayment(clientSecret, element, data))),\n first()\n ) as Observable<SetupIntentResult>;\n }\n\n private getNgxStripeAppInfo(version: string): WrapperLibrary {\n return {\n name: 'ngx-stripe',\n url: 'https://ngx-stripe.dev',\n partner_id: 'pp_partner_JR4l1rmvUoPP4V',\n version\n };\n }\n}\n","import { Injectable, Inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n@Injectable()\nexport class WindowRef {\n constructor(@Inject(PLATFORM_ID) public platformId: any) {}\n\n public getNativeWindow(): Window {\n if (isPlatformBrowser(this.platformId)) {\n return window;\n }\n return {} as Window;\n }\n}\n","import { Inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n@Injectable()\nexport class DocumentRef {\n constructor(@Inject(PLATFORM_ID) public platformId: any) {}\n\n public getNativeDocument(): Document {\n if (isPlatformBrowser(this.platformId)) {\n return document;\n }\n return {} as Document;\n }\n}\n","import { Inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\nimport { Observable, BehaviorSubject } from 'rxjs';\n\nimport { WindowRef } from './window-ref.service';\nimport { DocumentRef } from './document-ref.service';\n\nexport interface LazyStripeAPILoaderStatus {\n loaded: boolean;\n loading: boolean;\n error: boolean;\n}\n\n@Injectable()\nexport class LazyStripeAPILoader {\n public status = new BehaviorSubject<LazyStripeAPILoaderStatus>({\n error: false,\n loaded: false,\n loading: false\n });\n\n constructor(@Inject(PLATFORM_ID) public platformId: any, public window: WindowRef, public document: DocumentRef) {}\n\n public asStream(): Observable<LazyStripeAPILoaderStatus> {\n this.load();\n return this.status.asObservable();\n }\n\n public isReady(): boolean {\n return this.status.getValue().loaded;\n }\n\n public load() {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n const status: LazyStripeAPILoaderStatus = this.status.getValue();\n if (this.window.getNativeWindow().hasOwnProperty('Stripe')) {\n this.status.next({\n error: false,\n loaded: true,\n loading: false\n });\n } else if (!status.loaded && !status.loading) {\n this.status.next({\n ...status,\n loading: true\n });\n\n const script = this.document.getNativeDocument().createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = 'https://js.stripe.com/v3/';\n\n script.onload = () => {\n this.status.next({\n error: false,\n loaded: true,\n loading: false\n });\n };\n\n script.onerror = () => {\n this.status.next({\n error: true,\n loaded: false,\n loading: false\n });\n };\n\n this.document.getNativeDocument().body.appendChild(script);\n }\n }\n}\n","import { Injectable, Inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport {\n ConfirmAcssDebitPaymentData,\n ConfirmAcssDebitPaymentOptions,\n ConfirmAfterpayClearpayPaymentData,\n ConfirmAfterpayClearpayPaymentOptions,\n ConfirmAlipayPaymentData,\n ConfirmAlipayPaymentOptions,\n ConfirmAuBecsDebitPaymentData,\n ConfirmAuBecsDebitSetupData,\n ConfirmBancontactPaymentData,\n ConfirmBancontactPaymentOptions,\n ConfirmBoletoPaymentData,\n ConfirmBoletoPaymentOptions,\n ConfirmCardPaymentData,\n ConfirmCardPaymentOptions,\n ConfirmEpsPaymentData,\n ConfirmEpsPaymentOptions,\n ConfirmFpxPaymentData,\n ConfirmFpxPaymentOptions,\n ConfirmGiropayPaymentData,\n ConfirmGiropayPaymentOptions,\n ConfirmGrabPayPaymentData,\n ConfirmGrabPayPaymentOptions,\n ConfirmIdealPaymentData,\n ConfirmIdealPaymentOptions,\n ConfirmKlarnaPaymentData,\n ConfirmKlarnaPaymentOptions,\n ConfirmOxxoPaymentData,\n ConfirmOxxoPaymentOptions,\n ConfirmP24PaymentData,\n ConfirmP24PaymentOptions,\n ConfirmCardSetupData,\n ConfirmCardSetupOptions,\n ConfirmSepaDebitPaymentData,\n ConfirmSofortPaymentData,\n ConfirmWechatPayPaymentData,\n ConfirmWechatPayPaymentOptions,\n ConfirmSepaDebitSetupData,\n CreatePaymentMethodData,\n VerifyMicrodepositsForPaymentData,\n ConfirmAcssDebitSetupData,\n ConfirmAcssDebitSetupOptions,\n CreateSourceData,\n CreateTokenIbanData,\n CreateTokenCardData,\n CreateTokenPiiData,\n CreateTokenBankAccountData,\n PaymentRequest,\n PaymentRequestOptions,\n RedirectToCheckoutOptions,\n RetrieveSourceParam,\n Stripe,\n StripeCardElement,\n StripeCardNumberElement,\n StripeCardCvcElement,\n StripeConstructorOptions,\n StripeElements,\n StripeElementsOptions,\n StripeElement,\n StripeError,\n StripeIbanElement,\n TokenCreateParams,\n ConfirmBacsDebitSetupData,\n ConfirmBancontactSetupData,\n ConfirmIdealSetupData,\n ConfirmSofortSetupData,\n VerifyMicrodepositsForSetupData,\n VerificationSessionResult,\n ConfirmPayPalPaymentData,\n ConfirmPayPalSetupData,\n ConfirmPaymentData,\n ConfirmCustomerBalancePaymentData,\n ConfirmCustomerBalancePaymentOptions,\n ConfirmPayNowPaymentData,\n ConfirmPayNowPaymentOptions,\n ConfirmPromptPayPaymentData,\n ConfirmPromptPayPaymentOptions,\n ConfirmAffirmPaymentData,\n ConfirmAffirmPaymentOptions,\n ConfirmSofortPaymentOptions,\n ConfirmSofortSetupOptions,\n ConfirmKonbiniPaymentData,\n ConfirmKonbiniPaymentOptions,\n ConfirmUsBankAccountPaymentData,\n CollectBankAccountForPaymentOptions,\n ConfirmUsBankAccountSetupData,\n CollectBankAccountForSetupOptions,\n ConfirmPixPaymentData,\n ConfirmPixPaymentOptions,\n PaymentIntentResult,\n PaymentMethodResult,\n SetupIntentResult,\n ProcessOrderResult,\n RetrieveOrderResult,\n TokenResult,\n SourceResult,\n FinancialConnectionsSessionResult,\n CollectBankAccountTokenResult,\n EphemeralKeyNonceResult,\n RadarSessionPayload,\n ProcessOrderParams,\n CollectFinancialConnectionsAccountsOptions,\n CollectBankAccountTokenOptions,\n EphemeralKeyNonceOptions,\n StripeElementsOptionsClientSecret,\n StripeElementsOptionsMode,\n ConfirmBlikPaymentData,\n ConfirmBlikPaymentOptions,\n ConfirmCashappPaymentData,\n ConfirmCashappPaymentOptions,\n PaymentIntentOrSetupIntentResult,\n CreatePaymentMethodFromElements,\n CreatePaymentMethodFromElement,\n ConfirmCashappSetupData,\n ConfirmCashappSetupOptions,\n StripeCheckoutOptions,\n StripeCheckout,\n StripeEmbeddedCheckoutOptions,\n StripeEmbeddedCheckout,\n ConfirmMobilepayPaymentData,\n ConfirmMobilepayPaymentOptions,\n CreateConfirmationToken,\n ConfirmationTokenResult,\n ConfirmSetupData\n} from '@stripe/stripe-js';\n\nimport { STRIPE_PUBLISHABLE_KEY, STRIPE_OPTIONS, NGX_STRIPE_VERSION } from '../interfaces/ngx-stripe.interface';\nimport { StripeServiceInterface } from '../interfaces/stripe-instance.interface';\n\nimport { WindowRef } from './window-ref.service';\nimport { LazyStripeAPILoader, LazyStripeAPILoaderStatus } from './api-loader.service';\n\nimport { StripeInstance } from './stripe-instance.class';\n\n@Injectable()\nexport class StripeService implements StripeServiceInterface {\n stripe!: StripeInstance;\n\n constructor(\n @Inject(NGX_STRIPE_VERSION) public version: string,\n @Inject(STRIPE_PUBLISHABLE_KEY) public key: string,\n @Inject(STRIPE_OPTIONS) public options: StripeConstructorOptions,\n public loader: LazyStripeAPILoader,\n public window: WindowRef\n ) {\n if (key) {\n this.stripe = new StripeInstance(this.version, this.loader, this.window, key, options);\n }\n }\n\n getStripeReference(): Observable<any> {\n return this.loader.asStream().pipe(\n filter((status: LazyStripeAPILoaderStatus) => status.loaded === true),\n map(() => (this.window.getNativeWindow() as any).Stripe)\n );\n }\n\n getInstance(): Stripe | undefined {\n return this.stripe.getInstance();\n }\n\n setKey(key: string, options?: StripeConstructorOptions) {\n return this.changeKey(key, options);\n }\n\n changeKey(key: string, options?: StripeConstructorOptions) {\n this.stripe = new StripeInstance(this.version, this.loader, this.window, key, options);\n\n return this.stripe;\n }\n\n elements(options?: StripeElementsOptionsClientSecret): Observable<StripeElements>;\n elements(options?: StripeElementsOptionsMode): Observable<StripeElements>;\n elements(options?: StripeElementsOptions): Observable<StripeElements>;\n elements(options?): Observable<StripeElements> {\n return this.stripe.elements(options);\n }\n\n redirectToCheckout(options: RedirectToCheckoutOptions): Observable<never | { error: StripeError }> {\n return this.stripe.redirectToCheckout(options);\n }\n\n confirmPayment(options: {\n elements: StripeElements;\n confirmParams?: Partial<ConfirmPaymentData>;\n redirect: 'if_required';\n }): Observable<PaymentIntentResult>;\n confirmPayment(options: {\n elements?: StripeElements;\n clientSecret: string;\n confirmParams?: Partial<ConfirmPaymentData>;\n redirect: 'if_required';\n }): Observable<PaymentIntentResult>;\n confirmPayment(options: {\n elements: StripeElements;\n confirmParams: ConfirmPaymentData;\n redirect?: 'always';\n }): Observable<never | { error: StripeError }>;\n confirmPayment(options: {\n elements?: StripeElements;\n clientSecret: string;\n confirmParams: ConfirmPaymentData;\n redirect?: 'always';\n }): Observable<never | { error: StripeError }>;\n confirmPayment(options) {\n return this.stripe.confirmPayment(options);\n }\n\n confirmAcssDebitPayment(\n clientSecret: string,\n data?: ConfirmAcssDebitPaymentData,\n options?: ConfirmAcssDebitPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmAcssDebitPayment(clientSecret, data, options);\n }\n\n confirmUsBankAccountPayment(\n clientSecret: string,\n data?: ConfirmUsBankAccountPaymentData\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmUsBankAccountPayment(clientSecret, data);\n }\n\n confirmAlipayPayment(\n clientSecret: string,\n data?: ConfirmAlipayPaymentData,\n options?: ConfirmAlipayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmAlipayPayment(clientSecret, data, options);\n }\n\n confirmAuBecsDebitPayment(\n clientSecret: string,\n data?: ConfirmAuBecsDebitPaymentData\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmAuBecsDebitPayment(clientSecret, data);\n }\n\n confirmBancontactPayment(\n clientSecret: string,\n data?: ConfirmBancontactPaymentData,\n options?: ConfirmBancontactPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmBancontactPayment(clientSecret, data, options);\n }\n\n confirmBlikPayment(\n clientSecret: string,\n data?: ConfirmBlikPaymentData,\n options?: ConfirmBlikPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmBlikPayment(clientSecret, data, options);\n }\n\n confirmBoletoPayment(\n clientSecret: string,\n data?: ConfirmBoletoPaymentData,\n options?: ConfirmBoletoPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmBoletoPayment(clientSecret, data, options);\n }\n\n confirmCardPayment(\n clientSecret: string,\n data?: ConfirmCardPaymentData,\n options?: ConfirmCardPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmCardPayment(clientSecret, data, options);\n }\n\n confirmCashappPayment(\n clientSecret: string,\n data?: ConfirmCashappPaymentData,\n options?: ConfirmCashappPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmCashappPayment(clientSecret, data, options);\n }\n\n confirmCustomerBalancePayment(\n clientSecret: string,\n data: ConfirmCustomerBalancePaymentData,\n options: ConfirmCustomerBalancePaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmCustomerBalancePayment(clientSecret, data, options);\n }\n\n confirmEpsPayment(\n clientSecret: string,\n data?: ConfirmEpsPaymentData,\n options?: ConfirmEpsPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmEpsPayment(clientSecret, data, options);\n }\n\n confirmFpxPayment(\n clientSecret: string,\n data?: ConfirmFpxPaymentData,\n options?: ConfirmFpxPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmFpxPayment(clientSecret, data, options);\n }\n\n confirmGiropayPayment(\n clientSecret: string,\n data?: ConfirmGiropayPaymentData,\n options?: ConfirmGiropayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmGiropayPayment(clientSecret, data, options);\n }\n\n confirmGrabPayPayment(\n clientSecret: string,\n data?: ConfirmGrabPayPaymentData,\n options?: ConfirmGrabPayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmGrabPayPayment(clientSecret, data, options);\n }\n\n confirmIdealPayment(\n clientSecret: string,\n data?: ConfirmIdealPaymentData,\n options?: ConfirmIdealPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmIdealPayment(clientSecret, data, options);\n }\n\n confirmKlarnaPayment(\n clientSecret: string,\n data?: ConfirmKlarnaPaymentData,\n options?: ConfirmKlarnaPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmKlarnaPayment(clientSecret, data, options);\n }\n\n confirmKonbiniPayment(\n clientSecret: string,\n data?: ConfirmKonbiniPaymentData,\n options?: ConfirmKonbiniPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmKonbiniPayment(clientSecret, data, options);\n }\n\n confirmMobilepayPayment(\n clientSecret: string,\n data?: ConfirmMobilepayPaymentData,\n options?: ConfirmMobilepayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmMobilepayPayment(clientSecret, data, options);\n }\n\n confirmOxxoPayment(\n clientSecret: string,\n data?: ConfirmOxxoPaymentData,\n options?: ConfirmOxxoPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmOxxoPayment(clientSecret, data, options);\n }\n\n confirmP24Payment(\n clientSecret: string,\n data?: ConfirmP24PaymentData,\n options?: ConfirmP24PaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmP24Payment(clientSecret, data, options);\n }\n\n confirmPayNowPayment(\n clientSecret: string,\n data?: ConfirmPayNowPaymentData,\n options?: ConfirmPayNowPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmPayNowPayment(clientSecret, data, options);\n }\n\n confirmPayPalPayment(clientSecret: string, data?: ConfirmPayPalPaymentData): Observable<PaymentIntentResult> {\n return this.stripe.confirmPayPalPayment(clientSecret, data);\n }\n\n confirmPixPayment(\n clientSecret: string,\n data?: ConfirmPixPaymentData,\n options?: ConfirmPixPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmPixPayment(clientSecret, data, options);\n }\n\n confirmPromptPayPayment(\n clientSecret: string,\n data?: ConfirmPromptPayPaymentData,\n options?: ConfirmPromptPayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmPromptPayPayment(clientSecret, data, options);\n }\n\n confirmSepaDebitPayment(clientSecret: string, data?: ConfirmSepaDebitPaymentData): Observable<PaymentIntentResult> {\n return this.stripe.confirmSepaDebitPayment(clientSecret, data);\n }\n\n confirmSofortPayment(\n clientSecret: string,\n data?: ConfirmSofortPaymentData,\n options?: ConfirmSofortPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmSofortPayment(clientSecret, data, options);\n }\n\n confirmWechatPayPayment(\n clientSecret: string,\n data?: ConfirmWechatPayPaymentData,\n options?: ConfirmWechatPayPaymentOptions\n ): Observable<PaymentIntentResult> {\n return this.stripe.confirmWechatPayPayment(clientSecret, data, options);\n }\n\n handleCardAction(clientSecret: string): Observable<PaymentIntentResult> {\n return this.stripe.handleCardAction(clientSecret);\n }\n\n handleNextAction(options: { clientSecret: string }): Observable<PaymentIntentOrSetupIntentResult> {\n return this.stripe.handleNextAction(options);\n }\n\n verifyMicrodepositsForPayment(\n clientSecret: string,\n data?: VerifyMicrodepositsForPaymentData\n ): Observable<PaymentIntentResult> {\n return this.stripe.verifyMicrodepositsForPayment(clientSecret, data);\n }\n\n createRadarSession(): Observable<RadarSessionPayload> {\n return this.stripe.createRadarSession();\n }\n\n collectBankAccountForPayment(options: CollectBankAccountForPaymentOptions): Observable<PaymentIntentResult> {\n return this.stripe.collectBankAccountForPayment(options);\n }\n\n createPaymentMethod(paymentMethodData: CreatePaymentMethodData): Observable<PaymentMethodResult>;\n createPaymentMethod(options: CreatePaymentMethodFromElements): Observable<PaymentMethodResult>;\n createPaymentMethod(options: CreatePaymentMethodFromElement): Observable<PaymentMethodResult>;\n createPaymentMethod(options) {\n return this.stripe.createPaymentMethod(options);\n }\n\n createConfirmationToken(options: CreateConfirmationToken): Observable<ConfirmationTokenResult> {\n return this.stripe.createConfirmationToken(options);\n }\n\n retrievePaymentIntent(clientSecret: string): Observable<PaymentIntentResult> {\n return this.stripe.retrievePaymentIntent(clientSecret);\n }\n\n confirmSetup(options: {\n elements: StripeElements;\n confirmParams?: Partial<ConfirmSetupData>;\n redirect: 'if_required';\n }): Observable<SetupIntentResult>;\n confirmSetup(options: {\n elements?: StripeElements;\n clientSecret: string;\n confirmParams?: Partial<ConfirmSetupData>;\n redirect: 'if_required';\n }): Observable<SetupIntentResult>;\n confirmSetup(options: {\n elements: StripeElements;\n confirmParams: ConfirmSetupData;\n redirect?: 'always'