Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null is not an object (evaluating 'UpiModule.intializePayment') #38

Open
amitleuva1987 opened this issue Apr 9, 2022 · 8 comments
Open

Comments

@amitleuva1987
Copy link

when I run my 'react native' project in 'expo go' app, I receive below error.

null is not an object (evaluating 'UpiModule.intializePayment'). below is the code.

 import React, {useState} from 'react';
 import { SafeAreaView, Text, View, Button, TextInput, StyleSheet } from 'react-native';
 import RNUpiPayment from 'react-native-upi-payment';

function Checkout(){
const text = 'Please enter a value';
const [status, setStatus] = useState('');
function initialize(){
    RNUpiPayment.initializePayment({
        vpa: '9033049648@ybl', // or can be john@ybl or mobileNo@upi
        payeeName: 'Amit Leuva',
        amount: '1',
        transactionRef: '123'
    },successCallback,failureCallback);
}

function successCallback(data){
    setStatus(status='success');
}
function failureCallback(data){
    setStatus(status='success');
}
return(
    <SafeAreaView>
    <View>
        <Button title='Pay now' onPress={() => initialize()} />
    </View>
    </SafeAreaView>
 );
}

export default Checkout;

Do you have alternate way to make this package work with my project?

@tejasvi
Copy link

tejasvi commented Oct 24, 2022

It seems there is no working solution for iOS.

@nitish24p
Copy link
Owner

nitish24p commented Oct 24, 2022

Yes this is only for android. Also if expo doesnt provide native modules support for now this wont work.

@Bhav2307
Copy link

Bhav2307 commented Oct 27, 2022

same issue.

TypeError: null is not an object (evaluating 'UpiModule.intializePayment');

Please Help...

@nitish24p
Copy link
Owner

Please check if the module has been linked properly.

@rakeshlookings
Copy link

Do not use expo because it lacks native module support

@Rahul6694
Copy link

TypeError: null is not an object (evaluating 'UpiModule.intializePayment'

@Karthikpkapture
Copy link

Facing the same issue on react native expo "TypeError: Cannot read property 'intializePayment' of null "

@nitish24p
Copy link
Owner

Not sure if this will work with expo, can you console.log the UpiModule value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants