React Native bridge for Adyen drop-in
yarn add @ancon/react-native-adyen-dropin
cd ios && pod install
import AdyenDropin from '@ancon/react-native-adyen-dropin';
// ...
return (
<AdyenDropIn
visible={visible}
paymentMethods={paymentMethods}
paymentMethodsConfiguration={paymentMethodsConfiguration}
paymentResponse={paymentResponse}
detailsResponse={detailsResponse}
onSubmit={handleSubmit}
onAdditionalDetails={handleAdditionalDetails}
onError={handleError}
onSuccess={handleSuccess}
onClose={handleClose}
/>
);
Props | Type | Description | Default |
---|---|---|---|
debug | boolean | Set to true to enable native debugging logs |
false |
visible | boolean | Whether or not the drop-in should show | false |
paymentMethods | object | Payment methods response object | {} |
paymentMethodsConfiguration | object | Payment methods configuration object | {} |
paymentResponse | object | Payment response object (onSubmit request) | |
detailsResponse | object | Details response object (onAdditionalDetails request) | |
onSubmit | function | Callback with data when making a new payment | |
onAdditionalDetails | function | Callback with data when an action is required | |
onError | function | Callback with error (if available) on error or payment failure | |
onSuccess | function | Callback with resultCode on payment success | |
onClose | function | Callback when the drop-in was closed |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT