import { PaymentIntent, Address, Callbacks, PaymentInfo, PaymentAttempt, PaymentIntentResponse, PaymentAttemptStatus, GatewayInstances, } from './types'; import CallbackHandler from './callback'; import RedirectHandler from '../auth-redirect/handler'; import {PaymentOptions} from '../../hosted_fields/common/base-types'; export default class PaymentIntentHandler extends RedirectHandler { callbackHandler: CallbackHandler; protected paymentInfo: PaymentInfo | any; redirectTimeout: number; /** * default implementations, to be overridden in the payment/ gateway handler */ initPayment(): Promise; validate(): Promise; getPaymentData(): any; mount(options: any): Promise; mountPaymentButton(id: string, options: any): Promise; constructor(paymentIntent?: PaymentIntent, gatewayInstances?: GatewayInstances); initCallbacks(paymentInfo: PaymentInfo, callbacks?: Callbacks): void; sanitizeData(): void; getGatewayHandler(paymentIntent?: PaymentIntent, gatewayInstances?: GatewayInstances): Promise; getDirectDebitGatewayHandler( paymentIntent?: PaymentIntent, gatewayInstances?: GatewayInstances ): Promise; /** * @param options - type PaymentOptions or any (type ANY to support for bancontact) * @returns */ handlePayment(options: PaymentOptions | any): Promise; /** * @param options - type PaymentInfo or any (type ANY to support for bancontact) * @returns */ initiateAuthorization(paymentInfo: PaymentInfo | any, callbacks?: Callbacks): Promise; protected cancelPayment(reason?: string): Promise; protected confirmPayment(data?: any): Promise; protected handleConfirmPaymentResponse: (intentResponse: PaymentIntentResponse) => Promise; getPaymentIntent(): PaymentIntent; setPaymentIntent(paymentIntent: PaymentIntent): void; updatePaymentIntent(paymentIntent: PaymentIntent): void; protected stopPoll(data?: any): Promise; protected pollForAuthCompletion(): Promise; }