Edit:
After paypal login, I could successfully complete transaction.But I need to match the successUrl in paypal to verify both url is same and
What I understand with your query is, you have an URL of your Website which perform payment using Paypal, and in Mobile app you are performing the same using the Webview(not Paypal SDK).
Yes, you can get the callback
by doing some coding at your WEB end.
Meaning:
Whenever any user navigate to Payment page then your Server must know whether User visited from Website or through Mobile Webview, Server can send additional parameter key
to any Payment gateway for their custom logic. Later once Payment transaction completed, Payment gateway will return the same additional parameter key
alongwith the result(Success or Failure).
Note: Every Payment gateway has a setting of Redirection url for Success/Failure
Once Paypal redirect to result url(Success/Failure) after Transaction gets completed, Server then again check whether the request has been made from Website or from Mobile Webview with the help of additional parameter key
; check case below...
If from Mobile Webview
www.myserver.com/success
www.myserver.com/failure
If from Webiew then Normal flow
Now in your Mobile's Webview
webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
if(url.equalsIgnoreCase("www.myserver.com/success"))
//Success Toast
else if(url.equalsIgnoreCase("www.myserver.com/failure"))
//Failure Toast
return true;
}
});
That's it.