1.增加 phonepe 代付自动拉起
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
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() {
|
||||
const subRef = useRef<ReturnType<typeof onProxyMessage> | null>(null);
|
||||
@@ -32,6 +32,12 @@ export default function TestScreen() {
|
||||
.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 (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.sectionTitle}>Test Tools</Text>
|
||||
@@ -42,6 +48,9 @@ export default function TestScreen() {
|
||||
<TouchableOpacity style={[styles.btn, { backgroundColor: '#2ecc33' }]} onPress={handleMobikwikPayToBank}>
|
||||
<Text style={styles.btnText}>Mobikwik Pay To Bank Test</Text>
|
||||
</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}>
|
||||
<Text style={styles.btnText}>Echo Test</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
Reference in New Issue
Block a user