skip to Main Content

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?

2

Answers


  1. You can use a deeplink to get back to the app. But as far as being notified, if the transaction is completing without a capture API call from you, then a webhook to your public web server (yes it must be a server, not native app) will work best for a guaranteed notification, since the return is not guaranteed.

    Login or Signup to reply.
  2.  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();
              }
    
            }}
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search