@adyen/react-native
Version:
Wraps Adyen Checkout Drop-In and Components for iOS and Android for convenient use with React Native
44 lines • 2.28 kB
TypeScript
import React, { type ReactNode } from 'react';
import type { AdyenActionComponent, AdyenComponent, AdyenError, Configuration, PaymentDetailsData, PaymentMethodData, PaymentMethodsResponse, SessionConfiguration, SessionsResult } from '../core';
/**
* Props for AdyenCheckout
*/
export type AdyenCheckoutProps = {
/** Collection of all necessary configurations */
config: Configuration;
/** JSON response from Adyen API `\paymentMethods` */
paymentMethods?: PaymentMethodsResponse;
/** The payment session data from backend response. */
session?: SessionConfiguration;
/**
* Event callback, called when the shopper selects the Pay button and payment details are valid.
* @param data - The payment method data.
* @param component - The Adyen payment component.
* @param extra - Additional data (optional).
*/
onSubmit?: (data: PaymentMethodData, component: AdyenActionComponent, extra?: any) => void;
/**
* Event callback, called when payment about to be terminate.
* @param data - The payment method data.
* @param component - The Adyen payment component.
*/
onError: (error: AdyenError, component: AdyenComponent) => void;
/**
* Event callback, called when a payment method requires more details, for example for native 3D Secure 2, or native QR code payment methods.
* @param data - The payment method data.
* @param component - The Adyen payment component.
*/
onAdditionalDetails?: (data: PaymentDetailsData, component: AdyenActionComponent) => void;
/**
* An optional callback function invoked when a payment session or component
* interaction is successfully completed. This method provides the result of the session
* and a reference to the Adyen component that triggered the completion.
* @param result - The response object containing encoded result data and result code of the completed session.
* @param component - The Adyen component instance that completed the interaction.
*/
onComplete?: (result: SessionsResult, component: AdyenComponent) => void;
/** Inner components */
children: ReactNode;
};
export declare const AdyenCheckout: React.FC<AdyenCheckoutProps>;
//# sourceMappingURL=AdyenCheckout.d.ts.map