I have a React Native app where i'm using sandbox rest api to complete paypal payment with the help of react-native-webview. This is successfully redirecting me to paypal checkout page and doing the payment. But i need to take user to the previous screen of app after successfull payment. I need to know if the transaction is successfull or not. Can i do that with websocket? If so, how can i do that?
onNavigationStateChange={(navState) => {
console.log("navState.url ", navState)
if (navState.url === "your success url") {
// navigation.navigate('Home');
} else if (navState.url === 'your cancel url') {
// navigation.goBack();
}
}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With