react-native-payment-wrapper
React native payment wrapper
npm install mobile-payment-wrapper
import { StyleSheet, SafeAreaView } from 'react-native';
import { LitePayment } from 'mobile-payment-wrapper';
export default function App() {
const litePaymentConfig = {
publicKey: 'sandbox',
secretKey: '',
options: {},
targetElement: '#payment-element',
returnUrl: 'exampleApp://payment-success',
amount: 2000,
currency: 'usd',
submitButton: {
text: 'Credit Card',
},
merchantIdentifier: 'merchant.com.example',
};
return (
<SafeAreaView style={styles.safeArea}>
<LitePayment config={litePaymentConfig} />
</SafeAreaView>
);
}
const styles = StyleSheet.create({
safeArea: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#fff',
},
});
MIT
Made with create-react-native-library