import React from 'react'; import { ProcessedColorValue } from 'react-native'; import { MFCountry, MFEnvironment, MFLanguage, MFCurrencyISO, MFMobileCountryCodeISO, MFNotificationOption, MFKeyType, MFFontWeight, MFFontFamily, MFRecurringType, MFTokenType, MFV3PaymentMode, MFV3WidgetEventName } from './MFEnums'; import { MFSendPaymentRequest, MFSendPaymentResponse, MFInitiatePaymentRequest, MFInitiatePaymentResponse, MFGetPaymentStatusRequest, MFGetPaymentStatusResponse, MFExecutePaymentRequest, MFExecutePaymentResponse, MFDirectPaymentRequest, MFDirectPaymentResponse, MFInitiateSessionRequest, MFInitiateSessionResponse, MFCallbackResponse, MFCardViewStyle, MFApplePayStyle, MFPaymentMethod, MFCustomerAddress, MFInvoiceItem, MFSupplier, MFRecurringModel, MFProcessingDetails, MFPaymentWithTokenRequest, MFInvoiceTransaction, MFSupplierItem, MFCardRequest, DirectPaymentResponse, CardInfo, MFError, MFSubmitCardViewResponse, MFCardViewInput, MFCardViewPlaceHolder, MFCardViewLabel, MFCardViewText, MFCardViewError, MFBoxShadow, MFSavedCardText, MFDeleteAlert, MFApplePayToken, MFApplePayRequest, MFGooglePayRequest, MFGooglePayButtonStyle } from './MFModels'; import { GooglePayButtonConstants, IGooglePayButtonProps, MFGPayButton } from './GooglePay'; import { MFCardViewV3, MFV3Session, IMFCardViewV3Props, IMFV3CreateSessionRequest, IMFV3CreateVerifySessionRequest } from './MFCardV3'; import { MFV3SessionData, MFV3PaymentResult, MFV3VerifyResult, MFV3PaymentDetails, MFV3GetSessionData, MFV3CardDetails, MFV3VerifyCard, MFV3WidgetEvent } from './MFModels'; interface IMFSDK { init(apiKey: string, country: MFCountry, environment: MFEnvironment): void; setUpActionBar(toolBarTitle: String, toolBarTitleColor: ProcessedColorValue | null | undefined, toolBarBackgroundColor: ProcessedColorValue | null | undefined, isShowToolBar: Boolean): void; sendPayment(request: MFSendPaymentRequest, lang: String): Promise; initiatePayment(request: MFInitiatePaymentRequest, lang: String): Promise; getPaymentStatus(request: MFGetPaymentStatusRequest, lang: String): Promise; executePayment(request: MFExecutePaymentRequest, lang: String, onInvoiceCreated: (invoiceId: string) => void): Promise; executePaymentWithSavedToken(request: MFPaymentWithTokenRequest, lang: String, onInvoiceCreated: (invoiceId: string) => void): Promise; executeDirectPayment(directPaymentRequest: MFDirectPaymentRequest, lang: String, onInvoiceCreated: (invoiceId: string) => void): Promise; cancelRecurringPayment(recurringId: String, lang: String): Promise; cancelToken(tokenId: String, lang: String): Promise; initiateSession(initiateSessionRequest: MFInitiateSessionRequest): Promise; } declare class MyFatoorahReactNative implements IMFSDK { init(apiKey: string, country: MFCountry, environment: MFEnvironment): Promise; setUpActionBar(toolBarTitle: String, toolBarTitleColor: ProcessedColorValue | null | undefined, toolBarBackgroundColor: ProcessedColorValue | null | undefined, isShowToolBar: Boolean): Promise; initiatePayment(initiatePaymentRequest: MFInitiatePaymentRequest, lang: MFLanguage): Promise; sendPayment(sendPaymentRequest: MFSendPaymentRequest, lang: MFLanguage): Promise; getPaymentStatus(getPaymentStatusRequest: MFGetPaymentStatusRequest, lang: MFLanguage): Promise; executePayment(executePaymentRequest: MFExecutePaymentRequest, lang: MFLanguage, onInvoiceCreated: (invoiceId: string) => void): Promise; executePaymentWithSavedToken(executePaymentRequest: MFPaymentWithTokenRequest, lang: MFLanguage, onInvoiceCreated: (invoiceId: string) => void): Promise; executeDirectPayment(directPaymentRequest: MFDirectPaymentRequest, lang: String, onInvoiceCreated: (invoiceId: string) => void): Promise; cancelToken(tokenId: String, lang: String): Promise; cancelRecurringPayment(recurringId: String, lang: String): Promise; initiateSession(initiateSessionRequest: MFInitiateSessionRequest): Promise; private AddOnInvoiceCreatedListener; getApplePayToken(request: MFApplePayRequest): Promise; applePayNativePayment(request: MFApplePayRequest, executePaymentRequest: MFExecutePaymentRequest, onInvoiceCreated: (invoiceId: string) => void): Promise; } declare const MFSDK: MyFatoorahReactNative; interface ICardViewProps { style: any; paymentStyle?: MFCardViewStyle; } interface IMFCardView { load(initiateSessionResponse: MFInitiateSessionResponse, onCardBinChanged: (bin: string) => void): Promise; validate(currency?: string): Promise; submit(currency?: string): Promise; pay(request: MFExecutePaymentRequest, lang: MFLanguage, onInvoiceCreated: (invoiceId: string) => void, currency?: string): Promise; } declare class MFCardPaymentView extends React.Component implements IMFCardView { constructor(props: any); validate(currency?: string): Promise; submit(currency?: string): Promise; load(initiateSessionResponse: MFInitiateSessionResponse, onCardBinChanged: (bin: string) => void): Promise; private AddOnCardBinChangedListener; pay(executePaymentRequest: MFExecutePaymentRequest, lang: MFLanguage, onInvoiceCreated: (invoiceId: string) => void, currency?: string): Promise; private AddOnInvoiceCreatedListener; render(): React.JSX.Element; } /** * @deprecated Use MFGPayButton instead. This interface will be removed in a future version. */ interface IMFGooglePayButton { /** * @deprecated Use MFGPayButton.setupWithAutoExecute instead. */ setupGooglePayHelper(sessionId: String, googlePayRequest: MFGooglePayRequest, onInvoiceCreated: (invoiceId: string) => void): Promise; /** * @deprecated Use MFGPayButton.setupTokenOnly instead. */ setupGooglePayTokenHelper(googlePayRequest: MFGooglePayRequest): Promise; /** * @deprecated Use MFGPayButton.setupWithAutoExecute instead. */ setupWithAutoExecute(sessionId: string, googlePayRequest: MFGooglePayRequest, onInvoiceCreated?: (invoiceId: string) => void, onExecutePaymentSuccess?: (response: MFGetPaymentStatusResponse) => void, onError?: (error: MFError) => void): Promise; /** * @deprecated Use MFGPayButton.setupWithManualExecute instead. */ setupWithManualExecute(sessionId: string, googlePayRequest: MFGooglePayRequest, onSessionUpdated?: (updatedSessionId: string) => void, onError?: (error: MFError) => void): Promise; /** * @deprecated Use MFGPayButton.executePayment instead. */ executePayment(executePaymentRequest: MFExecutePaymentRequest, lang: MFLanguage, onInvoiceCreated: (invoiceId: string) => void): Promise; } /** * MFGooglePayButton - Old Google Pay implementation wrapper. * * @deprecated Use MFGPayButton instead. This old implementation will be removed in a future version. */ declare class MFGooglePayButton extends React.Component implements IMFGooglePayButton { /** * @deprecated Use MFGPayButton instead. */ constructor(props: any); mfGPayButton: MFGPayButton | null; /** * @deprecated Use MFGPayButton.setupWithAutoExecute instead. */ setupGooglePayHelper(sessionId: String, googlePayRequest: MFGooglePayRequest, onInvoiceCreated: (invoiceId: string) => void): Promise; /** * @deprecated Use MFGPayButton.setupTokenOnly instead. */ setupGooglePayTokenHelper(googlePayRequest: MFGooglePayRequest): Promise; /** * @deprecated Use MFGPayButton.setupWithAutoExecute instead. */ setupWithAutoExecute(sessionId: String, googlePayRequest: MFGooglePayRequest, onInvoiceCreated?: (invoiceId: string) => void, onExecutePaymentSuccess?: (response: MFGetPaymentStatusResponse) => void, onError?: (error: MFError) => void): Promise; /** * @deprecated Use MFGPayButton.setupWithManualExecute instead. */ setupWithManualExecute(sessionId: String, googlePayRequest: MFGooglePayRequest, onSessionUpdated?: (updatedSessionId: string) => void, onError?: (error: MFError) => void): Promise; /** * @deprecated Use MFGPayButton.executePayment instead. */ executePayment(executePaymentRequest: MFExecutePaymentRequest, lang: MFLanguage, onInvoiceCreated: (invoiceId: string) => void): Promise; /** * @deprecated Use MFGPayButton directly instead. */ render(): React.JSX.Element; } /** * @deprecated Use MFGPayButton.setupTokenOnly and MFGPayButton.openSheet instead. */ interface IMFGooglePayHelperModule { /** * @deprecated Use MFGPayButton.setupTokenOnly instead. */ configForToken(googlePayRequest: MFGooglePayRequest): Promise; /** * @deprecated Use MFGPayButton.openSheet instead. */ openSheet(): Promise; } /** * @deprecated Use MFGPayButton instead. This helper will be removed in a future version. */ declare class MFGooglePayHelperModule implements IMFGooglePayHelperModule { /** * @deprecated Use MFGPayButton.setupTokenOnly instead. */ configForToken(googlePayRequest: MFGooglePayRequest): Promise; /** * @deprecated Use MFGPayButton.openSheet instead. */ openSheet(): Promise; } /** * @deprecated Use MFGPayButton instead. */ declare const MFGooglePayHelper: MFGooglePayHelperModule; interface IApplePayProps { style: any; applePayButtonStyle?: MFApplePayStyle; } interface IMFApplePayButton { applePayPayment(request: MFExecutePaymentRequest, lang: MFLanguage, onInvoiceCreated: (invoiceId: string) => void): Promise; applePayDisplay(request: MFExecutePaymentRequest, lang: MFLanguage): Promise; displayApplePayButton(session: MFInitiateSessionResponse, executePaymentRequest: MFExecutePaymentRequest, lang: MFLanguage): Promise; applePayExecutePayment(request: MFExecutePaymentRequest | undefined): Promise; } declare class MFApplePayButtonView extends React.Component implements IMFApplePayButton { constructor(props: any); applePayPayment(executePaymentRequest: MFExecutePaymentRequest, lang: MFLanguage, onInvoiceCreated: (invoiceId: string) => void): Promise; applePayDisplay(executePaymentRequest: MFExecutePaymentRequest, lang: MFLanguage): Promise; displayApplePayButton(session: MFInitiateSessionResponse, executePaymentRequest: MFExecutePaymentRequest, lang: MFLanguage): Promise; applePayExecutePayment(executePaymentRequest?: MFExecutePaymentRequest | undefined): Promise; private AddOnInvoiceCreatedListener; render(): React.JSX.Element; } interface IMFApplePay { loadApplePay(session: MFInitiateSessionResponse, request: MFExecutePaymentRequest, lang: MFLanguage, merchantName: String | undefined, onApplePayLoaded?: (loaded: Boolean) => void): Promise; openApplePaymentSheet(): Promise; completeApplePayment(request: MFExecutePaymentRequest | undefined, onInvoiceCreated: (invoiceId: string) => void): Promise; } declare class MFApplePayClass implements IMFApplePay { loadApplePay(session: MFInitiateSessionResponse, request: MFExecutePaymentRequest, lang: MFLanguage, merchantName?: String | undefined, onApplePayLoaded?: (loaded: Boolean) => void): Promise; openApplePaymentSheet(): Promise; completeApplePayment(executePaymentRequest?: MFExecutePaymentRequest | undefined, onInvoiceCreated?: (invoiceId: string) => void): Promise; private AddOnInvoiceCreatedListener; private AddOnApplePayLoadedListener; } declare const MFApplePay: MFApplePayClass; export { MFSDK, MFCardPaymentView, MFGooglePayButton, MFApplePayButtonView, MFApplePay, MFInitiatePaymentRequest, MFInitiatePaymentResponse, MFPaymentMethod, MFTokenType, MFSendPaymentRequest, MFCustomerAddress, MFInvoiceItem, MFSupplier, MFSendPaymentResponse, MFExecutePaymentRequest, MFExecutePaymentResponse, MFRecurringModel, MFProcessingDetails, MFPaymentWithTokenRequest, MFGetPaymentStatusRequest, MFGetPaymentStatusResponse, MFInvoiceTransaction, MFSupplierItem, MFInitiateSessionRequest, MFInitiateSessionResponse, MFDirectPaymentRequest, MFCardRequest, MFDirectPaymentResponse, DirectPaymentResponse, CardInfo, MFError, MFEnvironment, MFLanguage, MFCurrencyISO, MFCountry, MFMobileCountryCodeISO, MFNotificationOption, MFKeyType, MFFontWeight, MFFontFamily, MFRecurringType, MFSubmitCardViewResponse, MFCardViewStyle, MFCardViewInput, MFCardViewPlaceHolder, MFCardViewLabel, MFCardViewText, MFCardViewError, MFBoxShadow, MFSavedCardText, MFDeleteAlert, MFApplePayStyle, MFApplePayToken, MFApplePayRequest, MFGooglePayRequest, GooglePayButtonConstants, MFGooglePayHelper, MFGooglePayButtonStyle, MFGPayButton, MFCardViewV3, MFV3Session, MFV3PaymentMode, MFV3WidgetEventName, }; export type { IMFCardViewV3Props, IMFV3CreateSessionRequest, IMFV3CreateVerifySessionRequest, MFV3SessionData, MFV3PaymentResult, MFV3VerifyResult, MFV3PaymentDetails, MFV3GetSessionData, MFV3CardDetails, MFV3VerifyCard, MFV3WidgetEvent, }; //# sourceMappingURL=index.d.ts.map