Accept PayPal and credit cards in your Android app

Overview

Important: PayPal Mobile SDKs are Deprecated. The APIs powering them will remain operational long enough for merchants to migrate, but the SDKs themselves will no longer be updated. Please use Braintree Direct in supported countries. In other countries, use Express Checkout and choose the Braintree SDK integration option.

PayPal Android SDK

The PayPal Android SDK makes it easy to add PayPal payments to mobile apps.

This documentation is available in Japanese: 日本語のドキュメント.

Contents

Add the SDK to Your Project

The PayPal Android SDK is now available at Maven Repository. The latest version is available via mavenCentral():

compile 'com.paypal.sdk:paypal-android-sdk:2.16.0'

Use Cases

The SDK supports two use cases for making payments - Single Payment and Future Payments - and a third use case for obtaining information about the customer - Profile Sharing.

Single Payment

Receive a one-time payment from a customer's PayPal account or payment card (scanned with card.io). This can be either (1) an immediate payment which your servers should subsequently verify, or (2) an authorization for a payment which your servers must subsequently capture, or (3) a payment for an order which your servers must subsequently authorize and capture:

  1. Accept a Single Payment and receive back a proof of payment.
  2. On your server, Verify the Payment, Capture the Payment, or Process the Order (PayPal Developer site) using PayPal's API.

Note: Direct Credit Card (DCC) payments are now deprecated in this SDK. Please use Braintree Payments, a PayPal Company, which is the easiest way to accept PayPal, credit cards, and many other payment methods. All new integrations should disable direct credit card payments.

Future Payments

Your customer logs in to PayPal just one time and consents to future payments:

  1. Obtain Customer Consent to receive an authorization code.
  2. On your server, use this authorization code to Obtain OAuth2 Tokens.

Later, when that customer initiates a payment:

  1. Obtain a Client Metadata ID that you'll pass to your server.
  2. On your server, Create a Payment using your OAuth2 tokens, the Client Metadata ID, and PayPal's API.

Profile Sharing

Your customer logs in to PayPal and consents to PayPal sharing information with you:

  1. Obtain Customer Consent to receive an authorization code.
  2. On your server, use this authorization code to Obtain OAuth2 Tokens.
  3. On your server, Retrieve Customer Information using your OAuth2 tokens and PayPal's API.

Integration with the PayPal Wallet App

The SDK will now use the newest version of the PayPal Wallet App if present on the device to log in to a customer account. No additional configuration is required to enable this feature. This integration enables device-specific PayPal FIDO integrations, including login by fingerprint on the Galaxy S5. In addition, a user who logged in to the PayPal Wallet App and checked "Keep me logged in" may not need to log-in again when paying with your app. For more information on how this all works, please read the blog post from one of our architects.

Limitations

  • The integration will not be enabled in any of the testing modes, as the Wallet app does not support this developer testing environment.

Requirements

  • Android 4.1.x (API 16) or later
  • Phone or tablet

Credentials

Your mobile integration requires different client_id values for each environment: Live and Test (Sandbox).

Your server integrations for verifying or creating payments will also require the corresponding client_secret for each client_id.

You can obtain these PayPal API credentials by visiting the Applications page on the PayPal Developer site and logging in with your PayPal account.

Sandbox

Once logged in on this Applications page, you will be assigned test credentials, including Client ID, which will let you test your Android integration against the PayPal Sandbox.

While testing your app, when logging in to PayPal in the SDK's UI you should use a personal Sandbox account email and password. I.e., not your Sandbox business credentials.

You can create both business and personal Sandbox accounts on the Sandbox accounts page.

Sandbox and TLSv1.2

PayPal will be upgrading the endpoint that the PayPal Android SDK uses to communicate with PayPal servers on Jan 18th, 2016. If you're testing on sandbox with a version of the PayPal Android SDK older than 2.13.0, then you'll start seeing communication failures when using Android devices >= API 16, and < API 20. Please upgrade to a version 2.13.0 or higher to fix these errors.

If you're testing on a device older than API 16, Android will not be able to communicate with PayPal, no matter what version of the SDK you use.

These TLS changes coincides with the TLSv1.2 security mandate outlined here, and will be followed by a similar change to the Production endpoints at some later date. For any questions or concerns, please create an issue.

Live

To obtain your live credentials, you will need to have a business account. If you don't yet have a business account, there is a link at the bottom of that same Applications page that will get you started.

International Support

Localizations

The SDK has built-in translations for many languages and locales. See javadoc files for a complete list.

Currencies

The SDK supports multiple currencies. See the REST API country and currency documentation for a complete, up-to-date list.

Disabling Direct Credit Card Payments

Disabling Direct Credit Card Payments is now preferred. To completely disable Direct Credit Card (DCC) payments, exclude the card.io library in your application build.gradle:

dependencies {
    compile('com.paypal.sdk:paypal-android-sdk:2.16.0') {
        exclude group: 'io.card'
    }
}

Override minSdkVersion

As of release 2.14.0, the minSdkVersion has been increased to 16. If you prefer to have your app on a lower minSdkVersion and want to leverage the latest SDK, please disable PayPal for versions below API 16, add xmlns:tools="http://schemas.android.com/tools inside the manifest's xml declaration, and add the following snippet to your AndroidManifest.xml:

<uses-sdk android:minSdkVersion="INSERT_YOUR_DESIRED_minSdkVersion_HERE" tools:overrideLibrary="com.paypal.android.sdk.payments"/>

See the Android manifest merger docs for more information.

Testing

During development, use environment() in the PayPalConfiguration object to change the environment. Set it to either ENVIRONMENT_NO_NETWORK or ENVIRONMENT_SANDBOX to avoid moving real money.

Documentation

  • These docs in the SDK, which include an overview of usage, step-by-step integration instructions, and sample code.
  • The sample app included in this SDK.
  • There are javadocs available.
  • The PayPal Developer Docs, which cover error codes and server-side integration instructions.

Usability

User interface appearance and behavior is set within the library itself. For the sake of usability and user experience consistency, apps should not attempt to modify the SDK's behavior beyond the documented methods.

Next Steps

Depending on your use case, you can now:

Contributing

Please read our contributing guidelines prior to submitting a Pull Request.

License

Please refer to this repo's license file.

Comments
  • java.lang.NoClassDefFoundError: com.paypal.android.sdk.bd

    java.lang.NoClassDefFoundError: com.paypal.android.sdk.bd

    Hi Guys,

    Im getting this error while running the sample code and app crashing at the starting screen itself.

     Process: com.paypal.example.paypalandroidsdkexample, PID: 15992
     java.lang.NoClassDefFoundError: com.paypal.android.sdk.bd
        at com.paypal.android.sdk.ad.a(Unknown Source)
        at com.paypal.android.sdk.I.run(Unknown Source)
    

    I haven't change any code in given SampleApp. Someone please let me know how to fix this issue.

    Thank you.

    sdk-bug 
    opened by praveenb 39
  • Unable to merge dex (Android Studio 3.0)

    Unable to merge dex (Android Studio 3.0)

    General information

    • SDK/Library version: 2.15.3 (Android studio 3.0)
    • Environment: Sandbox
    • PayPal-Debug-ID values:
    • Android Version and Device: Android 6.0

    Issue description

    When i insert this in builg.gradle

    compile 'com.paypal.sdk:paypal-android-sdk:2.15.3' I have this error

    Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
    > com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
    
    opened by SalvatoreAD 35
  • request failure with http statusCode:500,exception:org.apache.http.client.HttpResponseException: Internal Server Error     INTERNAL_SERVICE_ERROR

    request failure with http statusCode:500,exception:org.apache.http.client.HttpResponseException: Internal Server Error INTERNAL_SERVICE_ERROR

    Hi I am testing my app using 2.3.5 Sdk with Live Environment for single payment,but every time I am getting this message capture

    E/paypal.sdk(15311): request failure with http statusCode:500,exception:org.apache.http.client.HttpResponseException: Internal Server Error E/paypal.sdk(15311): request failed with server response:{"name":"INTERNAL_SERVICE_ERROR","debug_id":"3e284a3cfb391","message":"Payment approval returned: {\"id\":\"\",\"state\":\"NON_PAYABLE\",\"cart_id\":\"\",\"payer\":{\"payment_method\":\"paypal\",\"payer_info\":{\"email\":\"\",\"payer_id\":\"\",\"shipping_address\":{\"recipient_name\":\"\",\"id\":\"\",\"line1\":\"\",\"line2\":\"\",\"city\":\"\",\"state\":\"\",\"postal_code\":\"\",\"country_code\":\"US\",\"default_address\":true,\"preferred_address\":false},\"phone\":\"\",\"phone_type\":\"MOBILE\"}},\"payment_approved\":false,\"offers\":[{\"offer_intensity\":\"STRONG\"}],\"payment_contingency\":{\"name\":\"PAYER_ACTION_REQUIRED\",\"cause_name\":\"VERIFY_USER_IDENTITY\",\"resolutions\"[{\"name\":\"STEP_UP_AUTH_NEEDED\"}]}}","information_link":"https://api.paypal.com/docs/api/#INTERNAL_SERVICE_ERROR"}
    E/paypal.sdk(15311): INTERNAL_SERVICE_ERROR
    
    sdk-bug 
    opened by GirishBhat 33
  • INTERNAL_SERVICE_ERROR -DOUBLE PAYMENT

    INTERNAL_SERVICE_ERROR -DOUBLE PAYMENT

    there is a problem I can not solve, you can help me ? Double payment occurrs when there is a disconnection during the transfer or when there is an error with the paypal's server. The User doesn't receive the Activity.RESULT_OK, so he doesn't realise that the transaction has been completed. I was thinking of sending the transaction data with paypal to a php page , which face a liaison between Android and paypal , so that the php page, once it receives the response from paypal, sends continuously successful response to Android until Android does not respond to the page that has received the signal . I can not do it. Please help me . . . thanks.

    Laerte Olmelli

    https://www.facebook.com/laerte.olmex

    [email protected] paypal

    opened by ummo89 29
  • “Login Failed. System error. Please try again later”, INTERNAL_SERVER_ERROR

    “Login Failed. System error. Please try again later”, INTERNAL_SERVER_ERROR

    I need to integrate PayPal with my Android application. Payment tests using ENVIRONMENT_NO_NETWORK work fine. However, when I use "production" I get "Login Failed. System error. Please try again later" when I try to login and pay. This issue is consistent. I have seen multiple posts on this problem, however, I still cannot figure out how to make it work.

    I am using the latest PayPal Android SDK version (I think version 1.2.5, judging from PayPal-Android-SDK Git).

    First, I start the service:

    Intent intent = new Intent(this, PayPalService.class);
    
    intent.putExtra(PaymentActivity.EXTRA_PAYPAL_ENVIRONMENT, PaymentActivity.ENVIRONMENT_PRODUCTION);
    intent.putExtra(PaymentActivity.EXTRA_CLIENT_ID, getString(R.string.paypal_clientid));
    
    startService(intent);
    

    And then I make a payment

    PayPalPayment payment = new PayPalPayment(new BigDecimal("2.00"), "USD", "my payment");
    
    Intent intent = new Intent(this, PaymentActivity.class);
    
    intent.putExtra(PaymentActivity.EXTRA_PAYPAL_ENVIRONMENT, PaymentActivity.ENVIRONMENT_PRODUCTION);
    intent.putExtra(PaymentActivity.EXTRA_CLIENT_ID, getString(R.string.paypal_clientid));
    intent.putExtra(PaymentActivity.EXTRA_PAYER_ID, userEmail);
    intent.putExtra(PaymentActivity.EXTRA_RECEIVER_EMAIL, getString(R.string.paypal_email));
    intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);
    
    startActivityForResult(intent, 0);
    

    I use the Client ID from "Live Credentials" section in the application information. I do not use "Secret" anywhere.

    I have also disabled card.io card scanning if that makes any difference.

    When I try to make the payment, I can see the PayPal order screen. I click on "Pay with PayPal". I enter my personal PayPal email address and password (it is a separate PayPal account, not associated with the application) and click "Log in". But then I get a dialog saying "Login Failed. System error. Please try again later". I see the following messages in the log:

    02-04 10:37:07.827: E/RequestError(24963): 500 http response received.  Response not parsable.
    02-04 10:37:07.832: E/PayPalService(24963): INTERNAL_SERVER_ERROR
    02-04 10:37:07.927: E/LoginActivity(24963): login error: INTERNAL_SERVER_ERROR
    

    The PayPal account I am using (where the application is created) has credit card added and it is verified.

    opened by mah01 29
  • App freezes when calling startService on PayPalConfiguration

    App freezes when calling startService on PayPalConfiguration

    When we call startService on a PayPalConfiguration object, our app freezes and gives the message "Application not responding". We started seeing this after moving to SDK Version 2.2.1 and we've been able to consistently reproduce the issue on BLU phone running Android 2.4.1.

    Can you please look into this issue for us? Thanks!

    opened by kelvin95 26
  • Invalid User

    Invalid User

    SandBox payment is not working

    E/paypal.sdk: request failure with http statusCode:401,exception:Unauthorized E/paypal.sdk: request failed with server response:{"error":"invalid_user","error_description":"Invalid user credentials"} E/paypal.sdk: invalid_user

    Getting these response while trying to login. I have also tried after changing the password and also tried creating new buyer account.

    private static final String CONFIG_ENVIRONMENT = PayPalConfiguration.ENVIRONMENT_SANDBOX;
    private static final String CONFIG_CLIENT_ID = "my_client_id_for_sandbox";
    private static final int REQUEST_CODE_PAYMENT = 1;
    private static PayPalConfiguration config = new PayPalConfiguration()
                .environment(CONFIG_ENVIRONMENT)
                .clientId(CONFIG_CLIENT_ID).merchantName("Test");
    
    //Inside onCreate
    Intent intent = new Intent(this, PayPalService.class);
    intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);
    startService(intent);
    
    //In button click
    PayPalPayment thingToBuy = getThingToBuy(PayPalPayment.PAYMENT_INTENT_SALE);
    Intent intent = new Intent(this, PaymentActivity.class);
    intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);
    intent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingToBuy);
    startActivityForResult(intent, REQUEST_CODE_PAYMENT);
    
    private PayPalPayment getThingToBuy(String paymentIntent) {
    return new PayPalPayment(new BigDecimal("0.1"), "USD", "buy",
                    paymentIntent);
    }
    
    //OnActivityResult
    if (requestCode == REQUEST_CODE_PAYMENT) {
                if (resultCode == Activity.RESULT_OK) {
                    PaymentConfirmation confirm =
                            data.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);
                    if (confirm != null) {
                        try {
                            Log.i(TAG, confirm.toJSONObject().toString(4));
                            Log.i(TAG, confirm.getPayment().toJSONObject().toString(4));
                            /**
                             *   send 'confirm' (and possibly confirm.getPayment() to your server for verification
                             * or consent completion.
                             * See https://developer.paypal.com/webapps/developer/docs/integration/mobile/verify-mobile-payment/
                             * for more details.
                             *
                             * For sample mobile backend interactions, see
                             * https://github.com/paypal/rest-api-sdk-python/tree/master/samples/mobile_backend
                             */
                            /*Toast.makeText(
                                    getApplicationContext(),
                                    "You have donated successfully", Toast.LENGTH_LONG)
                                    .show();*/
    
                        } catch (JSONException e) {
                            Log.e(TAG, "an extremely unlikely failure occurred: ", e);
                        }
                    }
                } else if (resultCode == Activity.RESULT_CANCELED) {
                    Log.i(TAG, "The user canceled.");
                } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {
                    Log.i(
                            TAG,
                            "An invalid Payment or PayPalConfiguration was submitted. Please see the docs.");
                }
            }
    
    

    Gradle dependency

    compile('com.paypal.sdk:paypal-android-sdk:2.15.1') {
        exclude group: 'io.card'
     }
    
    question 
    opened by Kaushik1502 23
  • PaymentActivity gets stuck with infinite spinner and

    PaymentActivity gets stuck with infinite spinner and "Checking this device..." message

    I'm having troubles implementing PayPal integration in Android application using the PayPal Android SDK. If i use sandbox environment when the PaymentActivity is called it just gets stuck showing infinite spinner and "Checking this device" text. However with PayPalConfiguration.ENVIRONMENT_NO_NETWORK it works fine, the problem occurs with the PayPalConfiguration.ENVIRONMENT_SANDBOX. I have a correct Client ID - i tried to copy it into the sample app that is provided with the PayPal SDK and it shows the payment screen with no problems, but my app with the same ID gets stuck on "checking this device". Can you please advice what to do with this problem? What exactly operations are performed while "Checking this device" message is being shown? The LOgCat output from the moment PayPalService is launched to the moment PaymentActivity is launched is the following:

    11-07 12:12:42.688  24090-24960/com.bodybuilding.debug I/global﹕ In close() at SocketHttpClientConnection
    11-07 12:12:42.708  24090-24090/com.bodybuilding.debug I/Adreno200-EGLSUB﹕ <ConfigWindowMatch:1991>: Format RGBA_8888.
    11-07 12:12:42.708  24090-24090/com.bodybuilding.debug D/memalloc﹕ ion: Mapped buffer base:0x56ff4000 size:3768320 offset:0 fd:87
    11-07 12:12:42.728  24090-24968/com.bodybuilding.debug I/global﹕ In close() at SocketHttpClientConnection
    11-07 12:12:42.748  24090-24090/com.bodybuilding.debug D/memalloc﹕ ion: Mapped buffer base:0x5757f000 size:3768320 offset:0 fd:107
    11-07 12:12:42.748  24090-24969/com.bodybuilding.debug I/global﹕ In close() at SocketHttpClientConnection
    11-07 12:12:42.748  24090-24090/com.bodybuilding.debug D/OpenGLRenderer﹕ Flushing caches (mode 0)
    11-07 12:12:42.748  24090-24090/com.bodybuilding.debug D/memalloc﹕ ion: Unmapping buffer  base:0x566ea000 size:3768320
    11-07 12:12:42.748  24090-24090/com.bodybuilding.debug D/memalloc﹕ ion: Unmapping buffer  base:0x56a82000 size:3768320
    11-07 12:12:42.748  24090-24090/com.bodybuilding.debug D/memalloc﹕ ion: Unmapping buffer  base:0x55464000 size:3768320
    11-07 12:12:42.768  24090-24090/com.bodybuilding.debug W/FlurryAgent﹕ Trying to end session
    11-07 12:12:42.858  24090-24092/com.bodybuilding.debug D/dalvikvm﹕ GC_CONCURRENT freed 3265K, 75% free 10985K/42339K, paused 3ms+4ms
    11-07 12:12:42.868  24090-24971/com.bodybuilding.debug I/global﹕ In close() at SocketHttpClientConnection
    11-07 12:12:42.878  24090-24972/com.bodybuilding.debug I/global﹕ In close() at SocketHttpClientConnection
    11-07 12:12:42.888  24090-24973/com.bodybuilding.debug I/global﹕ In close() at SocketHttpClientConnection
    11-07 12:12:42.898  24090-24974/com.bodybuilding.debug I/global﹕ In close() at SocketHttpClientConnection
    11-07 12:12:44.449  24090-24960/com.bodybuilding.debug I/global﹕ In close() at SocketHttpClientConnection
    11-07 12:12:44.449  24090-24960/com.bodybuilding.debug I/global﹕ call socket close in SocketHttpClientConnection, socket=SSL socket over Socket[address=/192.168.1.71,port=8889,localPort=33974]
    11-07 12:12:44.459  24090-24960/com.bodybuilding.debug I/global﹕ In close() at SocketHttpClientConnection
    11-07 12:12:44.580  24090-24974/com.bodybuilding.debug I/global﹕ call socket shutdown in SocketHttpClientConnection, catch exception.
    11-07 12:12:44.580  24090-24974/com.bodybuilding.debug I/global﹕ call socket shutdown, tmpsocket=SSL socket over Socket[address=/192.168.1.71,port=8889,localPort=37320], tmpsocket.getSoLinger()=-1
    11-07 12:12:45.000  24090-24968/com.bodybuilding.debug I/global﹕ call socket shutdown in SocketHttpClientConnection, catch exception.
    11-07 12:12:45.000  24090-24968/com.bodybuilding.debug I/global﹕ call socket shutdown, tmpsocket=SSL socket over Socket[address=/192.168.1.71,port=8889,localPort=60986], tmpsocket.getSoLinger()=-1
    11-07 12:12:45.400  24090-24090/com.bodybuilding.debug D/memalloc﹕ ion: Mapped buffer base:0x568c9000 size:3768320 offset:0 fd:114
    11-07 12:12:45.440  24090-24973/com.bodybuilding.debug I/global﹕ call socket shutdown in SocketHttpClientConnection, catch exception.
    11-07 12:12:45.440  24090-24973/com.bodybuilding.debug I/global﹕ call socket shutdown, tmpsocket=SSL socket over Socket[address=/192.168.1.71,port=8889,localPort=58395], tmpsocket.getSoLinger()=-1
    11-07 12:12:45.581  24090-24090/com.bodybuilding.debug I/Adreno200-EGLSUB﹕ <ConfigWindowMatch:1991>: Format RGBA_8888.
    11-07 12:12:45.581  24090-24090/com.bodybuilding.debug D/memalloc﹕ ion: Mapped buffer base:0x57917000 size:3768320 offset:0 fd:106
    11-07 12:12:45.611  24090-24090/com.bodybuilding.debug D/memalloc﹕ ion: Mapped buffer base:0x57caf000 size:3768320 offset:0 fd:120
    11-07 12:12:45.621  24090-24090/com.bodybuilding.debug D/OpenGLRenderer﹕ Flushing caches (mode 0)
    11-07 12:12:45.621  24090-24090/com.bodybuilding.debug D/memalloc﹕ ion: Unmapping buffer  base:0x56ff4000 size:3768320
    11-07 12:12:45.621  24090-24090/com.bodybuilding.debug D/memalloc﹕ ion: Unmapping buffer  base:0x5757f000 size:3768320
    11-07 12:12:45.621  24090-24090/com.bodybuilding.debug D/memalloc﹕ ion: Unmapping buffer  base:0x568c9000 size:3768320
    11-07 12:12:45.651  24090-24090/com.bodybuilding.debug D/memalloc﹕ ion: Mapped buffer base:0x567ea000 size:3768320 offset:0 fd:104
    11-07 12:12:46.281  24090-24960/com.bodybuilding.debug I/global﹕ call socket shutdown in SocketHttpClientConnection, catch exception.
    11-07 12:12:46.281  24090-24960/com.bodybuilding.debug I/global﹕ call socket shutdown, tmpsocket=SSL socket over Socket[address=/192.168.1.71,port=8889,localPort=40842], tmpsocket.getSoLinger()=-1
    11-07 12:12:46.902  24090-24972/com.bodybuilding.debug I/global﹕ call socket shutdown in SocketHttpClientConnection, catch exception.
    11-07 12:12:46.902  24090-24972/com.bodybuilding.debug I/global﹕ call socket shutdown, tmpsocket=SSL socket over Socket[address=/192.168.1.71,port=8889,localPort=42125], tmpsocket.getSoLinger()=-1
    11-07 12:12:47.002  24090-24969/com.bodybuilding.debug I/global﹕ call socket shutdown in SocketHttpClientConnection, catch exception.
    11-07 12:12:47.002  24090-24969/com.bodybuilding.debug I/global﹕ call socket shutdown, tmpsocket=SSL socket over Socket[address=/192.168.1.71,port=8889,localPort=54744], tmpsocket.getSoLinger()=-1
    
    opened by dzmitryl 22
  • PayPal for Android won't switch to Production environment

    PayPal for Android won't switch to Production environment

    So I'have integrated paypal-android-sdk:2.15.3 in my app and it works as expected in Sandbox. Now I want to move to production.

    I switched the environment to PayPalConfiguration.ENVIRONMENT_PRODUCTION And the client id to the production client id. What happens is that first I can't login using my real PayPal account, second I see the blue Sandbox button as below screenshot:

    Screenshot

    My Code:

    PayPalConfiguration config = new PayPalConfiguration()
                    .environment(CustomBuildConfig.PAY_PAL_CONFIG_ENVIRONMENT)
                    .clientId(CustomBuildConfig.PAY_PAL_CONFIG_CLIENT_ID);
    
            PayPalPayment thingToBuy = new PayPalPayment(new BigDecimal(value), currency, item,
                    PayPalPayment.PAYMENT_INTENT_SALE);
            Intent intent = new Intent(getContext(), PaymentActivity.class);
            intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);
            intent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingToBuy);
            startActivityForResult(intent, REQUEST_CODE_PAYPAL_PAYMENT);
    

    Where:

    PAY_PAL_CONFIG_ENVIRONMENT = PayPalConfiguration.ENVIRONMENT_PRODUCTION; PAY_PAL_CONFIG_CLIENT_ID = "production client id";

    question 
    opened by mahdihijazi 20
  • Stuck at checking this device

    Stuck at checking this device

    I have integrated Paypal sdk in my android app and want to automatically log out user from Paypal after every transaction. For this I set *PayPalConfiguration().rememberUser(false) * method but Paypal SDK stucked with checking this device spinner. Working fine if I remove this method. Please note I want to automatically log out user from Paypal after every transaction, kindly help me.

    question 
    opened by NadeemClabs 20
  • PayPal SDK doesn't work with the latest version of okhttp3

    PayPal SDK doesn't work with the latest version of okhttp3

    after upgrading okhttp3 from v3.0.1 to v3.1.2 we started to get this crash:

    java.lang.RuntimeException: Unable to start service com.paypal.android.sdk.payments.PayPalService@fe7de67 with Intent { cmp=***/com.paypal.android.sdk.payments.PayPalService (has extras) }: java.lang.IllegalStateException: Unable to extract the trust manager on okhttp3.internal.Platform$Android@689f226, sslSocketFactory is class com.paypal.android.sdk.bn
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3027)
        at android.app.ActivityThread.-wrap17(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1442)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5417)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
     Caused by: java.lang.IllegalStateException: Unable to extract the trust manager on okhttp3.internal.Platform$Android@689f226, sslSocketFactory is class com.paypal.android.sdk.bn
        at okhttp3.OkHttpClient.<init>(SourceFile:187)
        at okhttp3.OkHttpClient.<init>(SourceFile:60)
        at okhttp3.OkHttpClient$Builder.build(SourceFile:718)
        at com.paypal.android.sdk.bt.<init>(Unknown Source)
        at com.paypal.android.sdk.payments.PayPalService.a(Unknown Source)
        at com.paypal.android.sdk.payments.PayPalService.onStartCommand(Unknown Source)
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3010)
        at android.app.ActivityThread.-wrap17(ActivityThread.java) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1442) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:148) 
        at android.app.ActivityThread.main(ActivityThread.java:5417) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
    

    it could be related to square/okhttp#2323

    opened by jbaginski 20
Releases(2.16.0)
Owner
PayPal
PayPal
Donations library for Android. Supports Google Play Store, Flattr, PayPal, and Bitcoin

Android Donations Lib Android Donations Lib supports donations by Google Play Store, Flattr, PayPal, and Bitcoin. It is used in projects, such as Open

Sufficiently Secure 345 Dec 21, 2022
One merchant integration point for all of PayPal's services

android-sdk [WIP] One merchant integration point for all of PayPal's services Static Analysis Tools Detekt This project uses Detekt for Kotlin code an

PayPal 23 Dec 20, 2022
card.io provides fast, easy credit card scanning in mobile apps

card.io SDK for Android card.io provides fast, easy credit card scanning in mobile apps. Stay up to date Please be sure to keep your app up to date wi

card.io 2k Jan 1, 2023
Qiscus provide everything you need to power up your app with chats. And it's now made simple.

Introduction Qiscus Chat SDK (Software Development Kit) is a product provided by Qiscus that enables you to embed an in-app chat/chat feature in your

Qiscus - Multichannel Conversational Platform 197 Dec 27, 2022
Android Weather Library: android weather lib to develop weather based app fast and easily

WeatherLib Android weather lib is an android weather aggregator. The lib helps you getting weather data from the most importat weather provider. It su

Surviving with android (by Francesco Azzola) 641 Dec 23, 2022
A sample project of implementing Liveness Detection and Identity OCR on Android app using Kredibel Vision SDK

Vision Sample (Android) A sample project of implementing Liveness Detection and Identity OCR on Android app using Kredibel Vision SDK. You can checkou

null 10 Nov 27, 2022
Library for Android In-App Billing (Version 3+)

Checkout (Android In-App Billing Library) Description Checkout is an implementation of Android In-App Billing API (v3+). Its main goal is to make inte

Sergey Solovyev 1k Nov 26, 2022
This App is sending Face capture data over network, built around the latest Android Arcore SDK.

AndroidArcoreFacesStreaming From any Android phone ArCore compatible, using this app will send over TCP 5680 bytes messages: The first 5616 bytes is a

Maxime Dupart 30 Nov 16, 2022
How to Integrate SAWO SDK to an Android app

How to Integrate SAWO SDK to an Android app Add following line to root build.gradle repositories block maven { url 'https://jitpack.io' } Add this to

Latiful Mousom 0 Nov 20, 2021
A very simple way to implement In App Purchases on Android.

The Google-developed Android In App Purchases library can seem quite confusing and too much code to do something as simple as making in-app purchases

Maickonn Richard 1 Sep 29, 2021
The client app for Android

handl-service-provider-application “Service Booking Platform ” is an advanced pl

null 0 Dec 20, 2021
Android SDK for eyeson video service incl. demo app

eyeson Android SDK Android SDK for eyeson video service incl. demo app Prerequisites A webservice to host and maintain eyeson meetings is required. Th

eyeson 3 Nov 16, 2022
Free forever Marketing SDK with a dashboard for in-app SplashScreen banners with built-in analytics

AdaptivePlus Android SDK AdaptivePlus is the control center for marketing campaigns in mobile applications Requirements minSdkVersion 16 Examples prov

Adaptive.Plus 16 Dec 14, 2021
Its measurement app made using kotlin with sceneform sdk by google

ARCORE MEASUREMENT This app is build using sceneform sdk for android using kotlin language It helps you measure the distance between multiple points i

Kashif Mehmood 39 Dec 9, 2022
Powerful custom Android Camera with granular control over the video quality and filesize, restricting recordings to landscape only.

LandscapeVideoCamera Highly flexible Android Camera which offers granular control over the video quality and filesize, while restricting recordings to

Jeroen Mols 1.2k Dec 29, 2022
SocialAuth repository which contains socialauth android version and samples

SocialAuth Android is an Android version of popular SocialAuth Java library. Now you do not need to integrate multiple SDKs if you want to integrate y

3Pillar Global Open Source 318 Dec 30, 2022
Air Native Extension (iOS and Android) for the Facebook mobile SDK

Air Native Extension for Facebook (iOS + Android) This is an AIR Native Extension for the Facebook SDK on iOS and Android. It has been developed by Fr

Freshplanet 219 Nov 25, 2022
Powerful custom Android Camera with granular control over the video quality and filesize, restricting recordings to landscape only.

LandscapeVideoCamera Highly flexible Android Camera which offers granular control over the video quality and filesize, while restricting recordings to

Jeroen Mols 1.2k Nov 22, 2022