Closed RavinduJayasekara closed 3 years ago
Hi Ravinud!
Apologies for the delayed response. _reactNative.NativeModules.PayhereOfficial
evalutes to null
when you have missed the step to perform the react-native link
step.
Please try perform the command on your React Native project root and try rebuilding again. We will be glad to be of further support.
react-native link @payhere/payhere-mobilesdk-reactnative
TypeError: null is not an object (evaluating '_reactNative.NativeModules.PayhereOfficial.startPayment')
import { StatusBar } from "expo-status-bar"; import React from "react"; import { StyleSheet, Text, View, Button } from "react-native"; import PayHere from "@payhere/payhere-mobilesdk-reactnative";
export default function App() {
const fetchUrl = async () => {
};
return (
); }
const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: "#fff", alignItems: "center", justifyContent: "center", }, });
Please let me know what I am doing wrong ????