import { PaymentIntent, Options, PaymentInfo, Callbacks, AdditionalData, } from '../../extensions/three_domain_secure/common/types'; import {PaymentInfo as NetbankingPaymentInfo} from '../../plugins/payments/netbanking_emandates/types'; import {PaymentInfo as OnlineBankingPolandPaymetInfo} from '../../plugins/payments/online_banking_poland/types'; import {PaymentInfo as BancontactPaymentInfo} from '../../plugins/payments/bancontact/types'; import {PaymentInfo as UpiPaymentInfo} from '../../plugins/payments/upi/types'; import {PaymentInfo as DirectDebitPaymentInfo} from '../../plugins/payments/direct_debit/types'; import {PaymentInfo as BoletoPaymentInfo} from '../../plugins/payments/boleto/types'; import {PaymentInfo as KlarnaPayNowPaymentInfo} from '../../plugins/payments/klarna_pay_now/types'; import {ButtonOption} from '../../plugins/payments/google_pay/types'; import {Options as PaypalOptions} from '../../plugins/payments/paypal_express_checkout/types'; import {Options as VenmoOptions} from '../../plugins/payments/venmo/types'; import CbWindowManager from '../../models/cb-window-manager'; import {Card, Events, IDeal} from './enums'; import {ComponentOptions, EventMessage, FieldOptions} from './types'; import ComponentField from '../host/component-field'; import CardComponent from '../host/card-component'; import IDealField from '../host/ideal-field'; import IDealComponent from '../host/ideal-component'; export declare enum ComponentType { Card = 'card', Bank = 'bank_account', IDeal = 'ideal', Dotpay = 'dotpay', FasterPayments = 'faster_payments', PayTo = 'pay_to', SepaInstantTransfer = 'sepa_instant_transfer', Paypal = 'paypal', Netbanking = 'netbanking', Applepay = 'applepay', Venmo = 'venmo', OnlineBankingPoland = 'online_banking_ poland', } export interface Component { name: string; type: ComponentType; mount(id?: any): Promise; framesCreated(): string[]; delegateEvent(event: any): void; isMounted?: () => boolean; deregister?: (string: any) => void; on?: (eventType: Events, eventCallback: Function) => Component; focus?: () => void; blur?: () => void; clear?: () => void; update?: (options: ComponentOptions) => void; framesCreated(): string[]; delegateEvent(data: EventMessage): void; destroy?: () => Promise; } export interface CardComponentInterface extends Component { tokenize(data?: any): any; authorizeWith3ds( paymentIntent: PaymentIntent, additionalData: AdditionalData, callbacks: Callbacks ): Promise; createField(fieldType: Card.ComponentFieldType, fieldOptions: FieldOptions): ComponentField; at(domElement: string | HTMLElement): CardComponent; } export interface IdealComponentInterface extends Component { tokenize(data?: any): any; authorizeWith3ds( paymentIntent: PaymentIntent, additionalData: AdditionalData, callbacks: Callbacks ): Promise; createField(fieldType: IDeal.ComponentFieldType, fieldOptions: FieldOptions): IDealField; at(domElement: string | HTMLElement): IDealComponent; } export interface ThreeDSHandler { setPaymentIntent(paymentIntent: PaymentIntent, options: Options): any; updatePaymentIntent(paymentIntent: any): any; handleCardPayment(paymentInfo: PaymentInfo, callbacks?: Callbacks): Promise; cancel(reason?: string): Promise; getPaymentIntent(): PaymentIntent; openNewWindow(): void; } export interface IDealPayment extends SelectBank, RedirectPayment {} export interface SofortPayment extends RedirectPayment {} export interface GiropayPayment extends RedirectPayment {} export interface DotpayPayment extends SelectBank, RedirectPayment {} export interface FasterPymtsPayment extends SelectBank, RedirectPayment {} export interface PayToPayment extends RedirectPayment {} export interface SepaInstantTransferPayment extends SelectBank, RedirectPayment {} interface SelectBank { mountBankList(id: string, options?: any): Promise; getSelectedBank(): any; } export interface RedirectPayment extends PaymentMethod { setWindowManager(windowManager: CbWindowManager): any; setRedirectMode(val: boolean): any; } export interface PaymentMethod { handlePayment(options: PaymentOptions): Promise; } export interface GooglePayment { mountPaymentButton(id: string, style?: ButtonOption): Promise; setPaymentIntent(paymentIntent: PaymentIntent, options: Options): any; updatePaymentIntent(paymentIntent: PaymentIntent): any; getPaymentIntent(): PaymentIntent; handlePayment(callbacks?: Callbacks): Promise; } export interface PaypalPayment { mountPaymentButton(id: string, option: PaypalOptions): Promise; setPaymentIntent(paymentIntent: PaymentIntent, options: Options): any; updatePaymentIntent(paymentIntent: PaymentIntent): any; getPaymentIntent(): PaymentIntent; handlePayment(callbacks?: Callbacks): Promise; } export interface VenmoPayment { mountPaymentButton(id: string, option: VenmoOptions): Promise; setPaymentIntent(paymentIntent: PaymentIntent, options: Options): any; updatePaymentIntent(paymentIntent: PaymentIntent): any; getPaymentIntent(): PaymentIntent; handlePayment(callbacks?: Callbacks): Promise; } export interface BancontactPayment { setPaymentIntent(paymentIntent: PaymentIntent, options: Options): any; updatePaymentIntent(paymentIntent: PaymentIntent): any; getPaymentIntent(): PaymentIntent; handlePayment(paymentInfo: BancontactPaymentInfo, callbacks?: Callbacks): Promise; } export interface NetbankingPayment { setPaymentIntent(paymentIntent: PaymentIntent, options: Options): any; getPaymentIntent(): PaymentIntent; handlePayment(paymentInfo: NetbankingPaymentInfo, callbacks?: Callbacks): Promise; fetchBankList(options?: any): Promise; } export interface OnlineBankingPolandPayment { setPaymentIntent(paymentIntent: PaymentIntent, options: Options): any; getPaymentIntent(): PaymentIntent; handlePayment(paymentInfo: OnlineBankingPolandPaymetInfo, callbacks?: Callbacks): Promise; fetchBankList(options?: any): Promise; } export interface KlarnaPayNowPayment { setPaymentIntent(paymentIntent: PaymentIntent, options: Options): any; updatePaymentIntent(paymentIntent: PaymentIntent): any; getPaymentIntent(): PaymentIntent; handlePayment(paymentInfo: KlarnaPayNowPaymentInfo, callbacks?: Callbacks): Promise; } export declare type PaymentOptions = { paymentIntent: Function; paymentInfo?: any; callbacks?: Callbacks; redirectMode?: boolean; iframeMode?: boolean; }; export declare enum TabRedirectPayments { ideal = 0, sofort = 1, giropay = 2, dotpay = 3, bancontact = 4, direct_debit = 5, faster_payments = 6, pay_to = 7, sepa_instant_transfer = 8, klarna_pay_now = 9, } export declare const PAYMENT_AUTH_REDIRECT_WINDOW_NAME = 'cb_payment_auth_redirect_window'; export interface ApplePayment { handlePayment(callbacks?: Callbacks): Promise; } export interface UpiPayment { setPaymentIntent(paymentIntent: PaymentIntent, options: Options): any; updatePaymentIntent(paymentIntent: PaymentIntent): any; getPaymentIntent(): PaymentIntent; handlePayment(paymentInfo: UpiPaymentInfo, callbacks?: Callbacks): Promise; } export interface DirectDebitPayment { setPaymentIntent(paymentIntent: PaymentIntent, options: Options): any; updatePaymentIntent(paymentIntent: PaymentIntent): any; getPaymentIntent(): PaymentIntent; handlePayment(paymentInfo: DirectDebitPaymentInfo, callbacks?: Callbacks): Promise; } export interface TestCardsHandlerInterface { setTestCards: Function; renderTestCards: Function; hasTestCards: Function; show: Function; hide: Function; } export interface BoletoPayment { setPaymentIntent(paymentIntent: PaymentIntent, options: Options): any; updatePaymentIntent(paymentIntent: PaymentIntent): any; getPaymentIntent(): PaymentIntent; handlePayment(paymentInfo: BoletoPaymentInfo, callbacks?: Callbacks): Promise; } export interface AmazonPayPayment { setPaymentIntent(paymentIntent: PaymentIntent, options: Options): any; updatePaymentIntent(paymentIntent: PaymentIntent): any; getPaymentIntent(): PaymentIntent; handlePayment(callbacks?: Callbacks): Promise; } export {};