import React, {useEffect, useState} from 'react'; import { SafeAreaView, ScrollView, StatusBar, StyleSheet, Text, TouchableOpacity, View, } from 'react-native'; // import {Flutterwave, Paystack, Universal} from './src/index' import Gateway from './src/index' // console.log(Gateway.flutterWave) const App = () => { const [showPaystack, setShowPaystack] = useState(false) const [showFlutterwave, setShowFlutterwave] = useState(false) const [showUniversal, setShowUniversal] = useState(false) const [showWebView, setShowWebView] = useState(false) return ( {/* * key note * always place the components from this library on your outtermost instance component */} { console.log("data returns is ",e) // to validate, returns {status: srring, data: {data} } // status is success for success on paystack await Gateway.validatePaystackPayment({ apiKey: 'sk_test_ac8971390ed43c9b29074c23f4bdaddccc24b865', tnxRef: e.tnxref }) }} onShow={setShowPaystack} /> { console.log("data returns is ",e) }} onShow={setShowFlutterwave} /> { console.log("data returns is ",e) }} onShow={setShowWebView} /> { console.log("data returns is ",e) }} onShow={setShowUniversal} /> UNIVERSAL PAYMENT GATEWAY LIBRARY setShowPaystack(true)} style={[styles.btnContainer]}> click for paystack setShowFlutterwave(true)} style={[styles.btnContainer]}> click for flutterwave setShowWebView(true)} style={[styles.btnContainer]}> click to load logically payment webview setShowUniversal(true)} style={[styles.btnContainer]}> click to utilize universal © seyicoded ); }; const styles = StyleSheet.create({ title: { position: 'absolute', top: '14%', fontWeight: '700', fontSize: 26, textAlign: 'center', }, btnContainer: { width: '100%', alignItems: 'center' }, button: { color: 'white', backgroundColor: 'rgba(0, 0, 250, 0.6)', width: '80%', marginBottom: 30, paddingVertical: 14, textAlign: 'center', borderRadius: 8, overflow: 'hidden' }, foot: { position: 'absolute', bottom: '3%', opacity: 0.4 } }); export default App;