Open allanascano-otus opened 4 years ago
I still cant solve this problem. If anyone have an idea please help. Thanks.
Hello @allanascano-otus thank you for using the Braintree SDK for Android. We're currently looking into this issue and hope to have an update soon.
I updated to the latest version but Im still getting the same error. But I noticed that after updating the library version and rebuilding my app, on first run after clicking Pay with Paypal button, there was no popup but instead an inline popup was shown:
The transaction was successful with this inline popup. But the succeeding checkouts opens a popup instead and I still get the same Order could not be captured errors.
Is there a way to force the inline popup after clicking Pay with Paypal?
I'm having the same issue as well.
I think I may have a real head-scratcher with this one.
Im trying to integrate PayPal Smart Payment Buttons on my android app.
I found out that for the integration to work, I need to use this library.
Before integrating, I created a quick html to test the paypal smart buttons. Here is the file https://treats4them.s3.amazonaws.com/android_paypal.html
The html source : `<!DOCTYPE html>
`
Everything works on this html page when viewing it on a PC browser. Sadly, when I try to open the same html on my android webview, I get the error - "Error: Order could not be captured" when attempting to submit a payment.
The paypal API was loaded corrrectly on the webview because I got a success callback on my javascript function. Its when clicking the Pay Now button on the paypal popup that results to this error.
Here is my android integration:
AndroidManifest.xml `
<activity android:name="com.treats4themdev.android.PayPalActivity" android:theme="@style/AppTheme.NoActionBar" android:configChanges="orientation|screenSize" />
`
PayPalActivity.java ` package com.treats4themdev.android;
import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.text.TextUtils; import android.util.Log; import android.webkit.JavascriptInterface; import android.webkit.WebView;
import androidx.appcompat.app.AppCompatActivity;
import com.braintreepayments.popupbridge.PopupBridge; import com.braintreepayments.popupbridge.PopupBridgeNavigationListener; import com.paypal.android.sdk.data.collector.PayPalDataCollector;
public class PayPalActivity extends AppCompatActivity implements PopupBridgeNavigationListener {
}
`
Here is the screenshot on the emulator -
Also tried it on my android phone and I got the same error. But when using the Debit or Credit card button instead of the Pay with PayPal button , I was able to submit a payment and it came back with status COMPLETED.
I also tried loading the html file locally but I still get the same error. Hoping someone can help me on this. Thanks in advance.