1.增加 phonepe 代付自动拉起
This commit is contained in:
Submodule libs/rnwalletman updated: 7d3770f6a9...5fb8249509
@@ -1,6 +1,6 @@
|
|||||||
import React, { useEffect, useRef } from 'react';
|
import React, { useEffect, useRef } from 'react';
|
||||||
import { Alert, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
import { Alert, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
||||||
import { onProxyMessage, proxySendMessage, paytmPay, openMobikwikPayToBank } from 'rnwalletman';
|
import { onProxyMessage, proxySendMessage, paytmPay, openMobikwikPayToBank, openPhonePePayToBank } from 'rnwalletman';
|
||||||
|
|
||||||
export default function TestScreen() {
|
export default function TestScreen() {
|
||||||
const subRef = useRef<ReturnType<typeof onProxyMessage> | null>(null);
|
const subRef = useRef<ReturnType<typeof onProxyMessage> | null>(null);
|
||||||
@@ -32,6 +32,12 @@ export default function TestScreen() {
|
|||||||
.catch(err => Alert.alert('Error', String(err)));
|
.catch(err => Alert.alert('Error', String(err)));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handlePhonePePayToBank = () => {
|
||||||
|
openPhonePePayToBank('7973837549', 'AIRP0000001', 'FAZLE HAQ', '100', 'test payment')
|
||||||
|
.then(result => console.log('PhonePe Pay To Bank', result ? 'Success' : 'Failed'))
|
||||||
|
.catch((err: Error) => Alert.alert('Error', String(err)));
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Text style={styles.sectionTitle}>Test Tools</Text>
|
<Text style={styles.sectionTitle}>Test Tools</Text>
|
||||||
@@ -42,6 +48,9 @@ export default function TestScreen() {
|
|||||||
<TouchableOpacity style={[styles.btn, { backgroundColor: '#2ecc33' }]} onPress={handleMobikwikPayToBank}>
|
<TouchableOpacity style={[styles.btn, { backgroundColor: '#2ecc33' }]} onPress={handleMobikwikPayToBank}>
|
||||||
<Text style={styles.btnText}>Mobikwik Pay To Bank Test</Text>
|
<Text style={styles.btnText}>Mobikwik Pay To Bank Test</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
<TouchableOpacity style={[styles.btn, { backgroundColor: '#5a2d9c' }]} onPress={handlePhonePePayToBank}>
|
||||||
|
<Text style={styles.btnText}>PhonePe Pay To Bank Test</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
<TouchableOpacity style={[styles.btn, { backgroundColor: '#3498db' }]} onPress={handleEcho}>
|
<TouchableOpacity style={[styles.btn, { backgroundColor: '#3498db' }]} onPress={handleEcho}>
|
||||||
<Text style={styles.btnText}>Echo Test</Text>
|
<Text style={styles.btnText}>Echo Test</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|||||||
Reference in New Issue
Block a user