question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Paypal - impossible to complete payment through Paypal app

See original GitHub issue

General 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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
venator85commented, May 25, 2019

Hi, any news about this issue? Thanks

0reactions
venator85commented, Apr 19, 2019

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).

Read more comments on GitHub >

github_iconTop Results From Across the Web

why won't-my-payment-with-paypal-go-through
why won't-my-payment-with-paypal-go-through.
Read more >
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found