Paypal - impossible to complete payment through Paypal app
See original GitHub issueGeneral information
- SDK/Library version: drop-in 4.1.0
- Environment: both sandbox and production
- Android Version and Device: OnePlus 5T, Android 9.0
Issue description
It is impossible to complete a payment if the Paypal app is installed (and is automatically launched instead of the browser).
Steps to reproduce:
- created an empty android project with androidx, added drop-in 4.1.0, performed the Browser switch setup (app doesn’t have underscores in the package name):
<activity android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="${applicationId}.braintree" />
</intent-filter>
</activity>
- created super simple activity with a sample client token from the docs page (“Try it now”):
class MainActivity : AppCompatActivity() {
private val REQUEST_CODE = 2048
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
findViewById<View>(R.id.btn).setOnClickListener {
val dropInRequest = DropInRequest()
.clientToken("eyJ2ZXJ.......1vIjoib2ZmIn0=")
startActivityForResult(dropInRequest.getIntent(this), REQUEST_CODE)
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
if (requestCode == REQUEST_CODE) {
if (resultCode == Activity.RESULT_OK) {
val result = data?.getParcelableExtra<DropInResult>(DropInResult.EXTRA_DROP_IN_RESULT)
Log.e("result $result", this)
} else if (resultCode == Activity.RESULT_CANCELED) {
Log.e("canceled", this)
} else {
val error = data?.getSerializableExtra(DropInActivity.EXTRA_ERROR) as Exception
Log.e("error", error, this)
}
} else {
super.onActivityResult(requestCode, resultCode, data)
}
}
}
- on clicking the button, paypal is selected and the paypal app (7.6.0, enrolled with biometric access and a working production account) is launched automatically:
- however, when my app is resumed, the drop in activity is stuck on an infinite loading, and no
onActivityResult
is invoked:
This issue also happens with a production Braintree account.
This issue does NOT happen if the Paypal app is not installed, and so Chrome is used.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Why can't I use PayPal to pay, even if I have funds on my ...
Important: Sometimes the issue lies in the fact that that the credit card linked to your PayPal account and flagged as primary source...
Read more >Set up PayPal on your store - Shopify Help Center
Unable to complete activation · Your PayPal account is not a business account · Payment has already been made for this InvoiceID ·...
Read more >My PayPal Payment Failed - Blizzard Support - Battle.net
Common Problems · Make sure your PayPal account is verified and has a valid credit card or bank account associated to it. Check...
Read more >THIS is how to easily cancel a PayPal payment [2022] - Stilt
1. Log in to your PayPal account. 2. Click the Activity button at the top of the screen. 3. Look for the pending...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, any news about this issue? Thanks
Hi Quinn, sorry but I’m still experiencing this issue. I also tried to update the Paypal app to version 7.7.3 (which I just received).