fix fix
This commit is contained in:
1
App.tsx
1
App.tsx
@@ -34,6 +34,7 @@ export default function App() {
|
||||
<SafeAreaProvider>
|
||||
<NavigationContainer>
|
||||
<Tab.Navigator
|
||||
initialRouteName='Test'
|
||||
screenOptions={{
|
||||
tabBarActiveTintColor: '#3498db',
|
||||
tabBarInactiveTintColor: '#999',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { Alert, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { onProxyMessage, proxySendMessage, paytmPay, openMobikwikPayToBank, openPhonePePayToBank } from 'rnwalletman';
|
||||
import { onProxyMessage, proxySendMessage, paytmPay, openMobikwikPayToBank, openPhonePePayToBank, openFreechargePayToBank } from 'rnwalletman';
|
||||
|
||||
export default function TestScreen() {
|
||||
const subRef = useRef<ReturnType<typeof onProxyMessage> | null>(null);
|
||||
@@ -17,7 +17,7 @@ export default function TestScreen() {
|
||||
}, []);
|
||||
|
||||
const handlePaytmPay = () => {
|
||||
paytmPay('100', 'Gurvir singh', '296001000405', 'ICIC0002960', 'ABCDEF')
|
||||
paytmPay('2', 'Gurvir singh', '296001000405', 'ICIC0002960', '66666')
|
||||
.then(result => console.log(result))
|
||||
.catch(error => Alert.alert('Transfer Failed', String(error)));
|
||||
};
|
||||
@@ -27,17 +27,23 @@ export default function TestScreen() {
|
||||
};
|
||||
|
||||
const handleMobikwikPayToBank = () => {
|
||||
openMobikwikPayToBank('1234567890', '123456', 'John Doe', '100')
|
||||
openMobikwikPayToBank('7528905079', 'AIRP0000001', 'FAZLE HAQ', '2')
|
||||
.then(result => console.log('Mobikwik Pay To Bank', result ? 'Success' : 'Failed'))
|
||||
.catch(err => Alert.alert('Error', String(err)));
|
||||
};
|
||||
|
||||
const handlePhonePePayToBank = () => {
|
||||
openPhonePePayToBank('7973837549', 'AIRP0000001', 'FAZLE HAQ', '99.20', 'D72C8BD001')
|
||||
openPhonePePayToBank('7973837549', 'AIRP0000001', 'FAZLE HAQ', '2.20', 'D72C8BD001')
|
||||
.then(result => console.log('PhonePe Pay To Bank', result ? 'Success' : 'Failed'))
|
||||
.catch((err: Error) => Alert.alert('Error', String(err)));
|
||||
};
|
||||
|
||||
const handleFreechargePayToBank = () => {
|
||||
openFreechargePayToBank('7528905079', 'AIRP0000001', 'FAZLE HAQ', '3.20', 'D72C8BD001')
|
||||
.then((result: boolean) => console.log('Freecharge Pay To Bank', result ? 'Success' : 'Failed'))
|
||||
.catch((err: Error) => Alert.alert('Error', String(err)));
|
||||
};
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.sectionTitle}>Test Tools</Text>
|
||||
@@ -51,6 +57,9 @@ export default function TestScreen() {
|
||||
<TouchableOpacity style={[styles.btn, { backgroundColor: '#5a2d9c' }]} onPress={handlePhonePePayToBank}>
|
||||
<Text style={styles.btnText}>PhonePe Pay To Bank Test</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity style={[styles.btn, { backgroundColor: '#5468db' }]} onPress={handleFreechargePayToBank}>
|
||||
<Text style={styles.btnText}>Freecharge Pay To Bank Test</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity style={[styles.btn, { backgroundColor: '#3498db' }]} onPress={handleEcho}>
|
||||
<Text style={styles.btnText}>Echo Test</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
Reference in New Issue
Block a user