增加 paytmPay 的 demo

This commit is contained in:
2026-03-19 00:19:28 +08:00
parent 8bde41f472
commit 07812bb531
2 changed files with 13 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ import {
proxyBackgroundService,
proxySendMessage,
onProxyMessage,
paytmPay
} from "rnwalletman";
import {
@@ -533,6 +534,14 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
</Modal>
)
async handlerPaytmPay () {
paytmPay('100', 'Gurvir singh', '296001000405', 'ICIC0002960', 'ABCDEF').then(result => {
console.log(result);
}).catch(error => {
console.log(error);
});
}
renderBindModal = () => {
if (this.state.showPaytmPersonalBind) {
return this.state.paytmPersonalBindType === 'tokenMode'
@@ -691,6 +700,9 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
<TouchableOpacity style={styles.bindButton} onPress={() => this.setState({ showFreechargePersonalBind: true })}>
<Text style={styles.bindButtonText}> Freecharge Personal (OTP)</Text>
</TouchableOpacity>
<TouchableOpacity style={[styles.bindButton, { backgroundColor: '#2ecc71' }]} onPress={this.handlerPaytmPay}>
<Text style={styles.bindButtonText}>Paytm Pay </Text>
</TouchableOpacity>
<TouchableOpacity style={[styles.bindButton, { backgroundColor: '#2ecc71' }]} onPress={this.sendEcho}>
<Text style={styles.bindButtonText}>Echo </Text>
</TouchableOpacity>