Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paypal - impossible to complete payment through Paypal app #122

Closed
venator85 opened this issue Apr 16, 2019 · 6 comments
Closed

Paypal - impossible to complete payment through Paypal app #122

venator85 opened this issue Apr 16, 2019 · 6 comments

Comments

@venator85
Copy link

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.

@quinnjn
Copy link
Contributor

quinnjn commented Apr 16, 2019

Thanks for the report! We'll try replicate it and get back to you.

Can you provide the PayPal app version you're experiencing this on? Otherwise, we will try replicate it on the latest Google Play version.

@venator85
Copy link
Author

I used the latest available from the Play Store, which is 7.6.0.
I activated the login via fingerprint feature and configured a working production account.

@quinnjn
Copy link
Contributor

quinnjn commented Apr 16, 2019

We're able to replicate it in Sandbox and Production. We're going to get in touch with PayPal about this issue.

@quinnjn
Copy link
Contributor

quinnjn commented Apr 19, 2019

Shortly after reporting this issue this flow seems to be working again. I'm continuing to follow up with PayPal on why this happened but the issue is resolved.

@quinnjn quinnjn closed this as completed Apr 19, 2019
@venator85
Copy link
Author

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

@quinnjn quinnjn reopened this Apr 19, 2019
@venator85
Copy link
Author

Hi, any news about this issue? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants