@@ -2,19 +2,24 @@ import React from 'react';
22import { View , Button , NativeAppEventEmitter } from 'react-native' ;
33const HomeScreen = ( { navigation } ) => {
44 const onClick = ( ) => {
5- navigation . navigate ( 'PaymentScreen ' ) ;
5+ navigation . navigate ( 'AndroidJsPaymentScreen ' ) ;
66 } ;
77 const websitePaymentScreen = ( ) => {
88 navigation . navigate ( 'WebsitePaymentScreen' ) ;
99 } ;
10+ const websiteDefaultUPIScreen = ( ) => {
11+ navigation . navigate ( 'WebsiteDefaultUPIScreen' ) ;
12+ } ;
1013 let paymentResponseFunction = ( response ) => {
1114 console . log ( 'response is : ' + JSON . stringify ( response ) ) ;
1215 navigation . navigate ( 'HomeScreen' ) ;
1316 } ;
1417 NativeAppEventEmitter . addListener ( "paymentResponse" , paymentResponseFunction ) ;
1518 return ( React . createElement ( View , { style : { flex : 1 , justifyContent : 'center' , alignItems : 'center' } } ,
16- React . createElement ( Button , { title : "Payment Page with Android JS bridge" , onPress : onClick } ) ,
19+ React . createElement ( Button , { title : "Payment Page with Android JS Integration" , onPress : onClick } ) ,
20+ React . createElement ( View , { style : { width : 50 , height : 50 , } } ) ,
21+ React . createElement ( Button , { title : "Website JS Integration PaymentScreen" , onPress : websitePaymentScreen } ) ,
1722 React . createElement ( View , { style : { width : 50 , height : 50 , } } ) ,
18- React . createElement ( Button , { title : "Website JS Integration PaymentScreen " , onPress : websitePaymentScreen } ) ) ) ;
23+ React . createElement ( Button , { title : "Website JS Integration with Default UPI " , onPress : websiteDefaultUPIScreen } ) ) ) ;
1924} ;
2025export default HomeScreen ;
0 commit comments