I have integrated PayPal using Brain Tree using my Custom UI for PayPal Button on my native Android App. I have implemented the SDK for PayPal. when I tried to click my PayPal Button, I'm getting redirected to a Web Browser to PayPal to login using the credentials which is the expected behaviour as mentioned in there documents. I have to disable showing the URL
on the redirected Web Browser shown on the device on clicking the PayPal Button. How can I disable showing the WebBrowser URL on the redirected one? Please suggest me a work around for this.
Asked
Active
Viewed 336 times
0

sooraj
- 41
- 2
- 8
1 Answers
0
You cannot, the URL is required.
With very few exceptions (some old apps with webview-based integrations) , everyone should only log into a PayPal account when they can see the URL, so they know they actually logging into PayPal.

Preston PHX
- 27,642
- 4
- 24
- 44
-
thanks for the update.! so is there any way to get the callback once I click on the Close Button shown on the Web browser to my app? – sooraj Mar 17 '21 at 05:23
-
The close button is to cancel, so maybe onCancel https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-reference/#oncancel -- but if it doesn't fire then it should be returning the user to where they left off – Preston PHX Mar 17 '21 at 05:29
-
getting the following error now : ` java.lang.NoSuchMethodError: No static method newInstance(Landroidx/appcompat/app/AppCompatActivity;Ljava/lang/String;)Lcom/braintreepayments/api/BraintreeFragment; in class Lcom/braintreepayments/api/BraintreeFragment; or its super classes (declaration of 'com.braintreepayments.api.BraintreeFragment' appears in /data/app/com.ust.fcs.wiwo-oRZTGn7OXhiznL9dD72Vtw==/base.apk)` , ` mBraintreeFragment = BraintreeFragment.newInstance( MainActivity.this, btToken); Card.tokenize(mBraintreeFragment, cardBuilder);` on this line – sooraj Mar 17 '21 at 06:04