-
Notifications
You must be signed in to change notification settings - Fork 230
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
Chrome tab remains open in background when pay with paypal #244
Comments
Hey @straltest thanks for the report. This is actually an issue with Chrome Custom Tabs in that there currently isn't a way to programatically close a tab. There is an open issue for Chromium here that we've weighed in on, in hopes that they will add a method for us to use to resolve this. Unfortunately at current, this is expected behavior. We will leave this issue open so we can update you or anyone else that comes across this issue with any updates based on the Chromium issue above. |
Hello, @Epreuve, |
I'll close all my tabs |
Same problem since 2019 |
Fixed in 4.0.0-beta1 |
General information
com.braintreepayments.api:braintree:2.+
Android :
minSdkVersion 21
targetSdkVersion 27
compileSdkVersion 27
Issue description
I am working on flutter application. I have made plugin to pay with paypal. I can able to pay successfully using paypal and returning to my application but paypal tab still remains in background and it is not destroyed.
I have also tried using 'com.braintreepayments.api:braintree:3.0.0' but still facing same issue.
I have also downloaded https://github.com/quinnjn/braintree-android-drop-in-paypal-androidx this demo from this link braintree/braintree-android-drop-in#101. Run it in Android simulator API level 28 but same issue is occurring.
Here is my code :
try {
mBraintreeFragment = BraintreeFragment.newInstance(this, tokenizationkey);
} catch (InvalidArgumentException e) {
Log.d(getClass().getSimpleName(), e.getLocalizedMessage());
}
PayPal.requestOneTimePayment(mBraintreeFragment, getPayPalRequest(amount));
private PayPalRequest getPayPalRequest(@nullable String amount) {
PayPalRequest request = new PayPalRequest(amount);
request.currencyCode("EUR");
return request;
}
@OverRide
public void onPaymentMethodNonceCreated(PaymentMethodNonce paymentMethodNonce) {
Log.d(getClass().getSimpleName(), "Payment Method Nonce received: " + paymentMethodNonce.getNonce());
}
After successful payment I am getting nonce and returning to application. Chrome paypal tab not destroyed.
Requesting help to resolve this issue. Let me know if anything I am missing.
The text was updated successfully, but these errors were encountered: