alatpay-react-native
v0.1.0
Published
ALATPay makes payments a breeze for merchants. Easily integrate into your React Native app for seamless transactions on both Android and iOS
Maintainers
Readme
alatpay-react-native
ALATPay makes payments a breeze for merchants. Easily integrate into your React Native app for seamless transactions on both Android and iOS.
Installation
npm install alatpay-react-nativeUsage
import React, { useRef } from 'react';
import { Button, View } from 'react-native';
import ALATPay, { type ALATPayRef } from 'alatpay-react-native';
export default function PaymentScreen() {
const alatpayRef = useRef<ALATPayRef>(null);
return (
<View style={{ flex: 1 }}>
<Button
title="Pay now"
onPress={() => alatpayRef.current?.startTransaction()}
/>
<ALATPay
ref={alatpayRef}
apiKey="your-api-key"
businessId="your-business-id"
amount={1000}
currency="NGN"
customerEmail="[email protected]"
customerFirstName="Jane"
customerLastName="Doe"
onTransactionComplete={(response) => {
console.log('Payment success', response);
}}
onDialogClose={() => {
console.log('Checkout closed');
}}
/>
</View>
);
}Contributing
License
MIT
Made with create-react-native-library
