Giter Club home page Giter Club logo

paypal-android-sdk's Introduction

Important: This PayPal Android SDK is 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 the PayPal Android Checkout SDK. Reference the Developer Documentation for getting started.

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.

paypal-android-sdk's People

Contributors

avidas avatar bluk avatar braebot avatar burnto avatar josharian avatar mattjacunski avatar sankarbhavanib avatar tdchow avatar tomwhipple avatar vegax87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paypal-android-sdk's Issues

On SandBox Environment always reciving pending state.

On SandBox Environment always receiving pending state after setting all correctly when I tried to pay with card by clicking keyboard. I am sure about payment options, I didn't try yet. Sample response:
"proof_of_payment": {
"rest_api": {
"state": "pending",
"payment_id": "PAY-BBBBBBBBBBBBBBBBBBBB"
}
}

Thanks in advance.

Any news!!??

Hi, is there any further news on when the Android SDK is going to be release for non USA developers (in particular the UK)?

Thanks

The string resources conflict.

Few days ago I run into a problem with PayPal SDK for Android. During the implementation of own solution (with correct client id and receiver email) I was always getting message "Unauthorized device" in sandbox mode. But in provided source code that comes with SDK everything was working fine, which made me confused and suspicious about the source of the problem.

After a long investigation (almost took me 2 days to find out) I've found that the problem was (!) in the "string.xml" file, where in one text line I've used the "& amp ;" (sorry with spaces, the github otherwise converts it into &) code since it's totally legit to use in string resources. As soon as I've removed it I've been able to launch the PayPal activity successfully in sandbox mode.

Hope this could help to someone who faced similar problem and maybe to find a fix for that problem.

Confirmed Shipping Address

Hi,
I have integrated mobile PayPal payments as explained here: https://devblog.paypal.com/phonegap-android-sdk-plugin/

My question is not about programming, because it works well.
Someone from my backoffice told me to verify that our payments are shipped to a confirmed shipping address given by the PayPal API.
Now, what I did was to allow PayPal payments trough logging into your account or simply by inserting your credit card's number then verify those payments (following this section: https://developer.paypal.com/docs/integration/mobile/verify-mobile-payment/).

What I think is that my colleague is referring to the Mobile Express Checkout that we didn't use. (I read that using this you have to verify the shipping informations)

Can you confirm this?

Thank you

Pass information to IPN?

It seems like a huge oversight, but is there really no way to pass any information to the IPN through the mobile SDK? Any ETA on this feature?

Even the pay_keys and ID's don't match up with the IPN. This makes it impossible to do any sort of licensing storing on a mobile device.

item_name missing from IPN

Hi,

I've tried setting up the payment using the sample code and setup my IPN handler in sandbox.
However the item_name received in the IPN is missing.
any suggestions?

Here's my sample IPN response values:
cmd ==> _notify-validate
transaction_subject ==>
payment_date ==> 02:34:37 Dec 05, 2013 PST
txn_type ==> web_accept
residence_country ==> US
item_name ==>
payment_gross ==> 1.75
mc_currency ==> USD
payment_type ==> instant
protection_eligibility ==> Ineligible
verify_sign ==> AFcWxV21C7fd0v3bYYYRCpSSRl31A1i1dyXfSr2MggrbzhihZnyxhFN9
payer_status ==> verified
test_ipn ==> 1
tax ==> 0.00
txn_id ==> 1SG76294UT1713155
quantity ==> 0

Put Extra Invoice

Hi, I would like to know how can pass a extra parameter Invoice (That uses in old PayPal sdk "payment.setInvoiceData(invoice);") with PayPal Android SDK, now only pass the amount, currency and text that identifies the concept of the pay. Also there are the Extra_Client_id, Extra_Payer_id,.... but i don't know if the Extra_payer_id uses to pass the parameter Invoice.

Thanx

card.io in the Android SDK (using Android Studio)

Hi there!

Maybe i am missing something, but how do you use this feature of the SDK?

I have a Galaxy S phone (i9000) and it is an ARMv7 device, but i can't find the feature.

Shouldn't there be a button on the page, where you're entering your credit card data to use the camera?

Thanks for your attention! ^^

multiple items payment with android paypal sdk

Hi,

i need to know is paypal android sdk support multiple item payment like in any shopping cart app?
I have been searching and didn't come up with the solution.
Please, let me know quickly, i will be grateful to you. i am working on a client project.

Payments informations advised to be stored

Hi,
I am finalizing the integration of Paypal in my Mobile App through the PhoneGap Plugin.
What i need is to store in my DB informations about the payments to track and log everything that happens.
I use both Adaptive and REST payments so i got two different JSON responses:

{
  "proof_of_payment": {
    "adaptive_payment": {
      "pay_key": "AP-70M68096ML426802W",
      "payment_exec_status": "COMPLETED",
      "timestamp": "2013-02-20T00:26:25Z",
      "app_id": "APP-91B933855X481767M"
    }
  },
  "payment": {
    "short_description": "Hipster t-shirt",
    "amount": "9.95",
    "currency_code": "USD"
  },
  "client": {
    "platform": "iOS",
    "paypal_sdk_version": "1.0.0",
    "environment": "live",
    "product_name": "PayPal iOS SDK"
  }
}
{
  "proof_of_payment": {
    "rest_api": {
      "state": "approved",
      "payment_id": "API-PAYMENT-ID-1843"
    }
  } ....similar to above

I would save pay_key, app_id, amount, currency_code and maybe platform for some statistics. For the REST i would save the same parameters except for the pay_key replaced by payment_id.
Together with these I track the email of the payer and maybe the description that i get from my JS.

Any suggestions about this?
Thank you

Add options to support kiosk mode

It would be extremely useful (in fact in our use case, the difference between implementing this SDK and having to try and kludge our way around it via the REST API) if it was possible to hide the "forgo password" and "pin" links on the Login screen.

The former opens a browser which we can't have happen in our Sandbox environment and the latter is just confusing as this is not something any of our customers will have.

If you agree that this level of control would be useful to expose to the end user, could you please provide an estimate of how long it will be before we see this feature included in the released SDK?

Thanks in advance,
YS

INTERNAL_SERVICE_ERROR and payment state "created"

I use sandbox. Often when I made payment with credit card, appears error dialog:

Payment Failed.
System error. Please try again later

with logcat message:

E/RequestError﹕ An internal service error has occurred, field:, issue:
E/PayPalService﹕ INTERNAL_SERVICE_ERROR
E/ViewRootImpl﹕ sendUserActionEvent() mView == null

The next time I press the button "Charge credit card", the message changes to:

E/RequestError﹕ The requested resource ID was not found, field:, issue:
E/PayPalService﹕ INVALID_RESOURCE_ID
E/ViewRootImpl﹕ sendUserActionEvent() mView == null

Or the same, but with DUPLICATE_REQUEST_ID code.
Or it can return PaymentConfirmation to 'onActivityResult' function, but the state of payment will be 'created', not 'approved':

{
    "payment": {
    "short_description": "I bet I do: both ",
    "amount": "15",
    "currency_code": "USD"
    },
    "client": {
    "platform": "Android",
    "paypal_sdk_version": "1.2.6",
    "product_name": "PayPal Android SDK; ",
    "environment": "sandbox"
    },
    "proof_of_payment": {
    "rest_api": {
    "state": "created",
    "payment_id": "PAY-0GK76363G8959271TKMC67JY"
}
}
}

permission usage "CAMERA" and "VIBRATE"

Can I use this SDK without permission "android.permission.CAMERA" and "android.permission.VIBRATE" in manifest file? Those two permission are used for card.io only right?

It's quite confuse when final use see those two permission.

Paypal Android SDK Subscription

Paypal Android SDK have some way to do a subscription?
I want offer Paypal how method payment in my app, but would be a subscription and not a simple payment.

If I can use subscription through Paypal, is per month? Have per year too? (Like Google Play)

If not, have some way to us (developers) use subscription Paypal? (Some API).
Thanks.

Donation feature

Is it possible to provide donate feature via this Android SDK?
I'd like to have simple onClick which would start (intent, broadcast) to SDK which would lead user through login/card setup/donation amount select/etc...

Integrating PayPal Android SDK into kiosk

Hi,
I am trying to develop an application for a Kiosk for a non-profit organization where donors can come and donate using their credit cards and once payment has been successful, my application can update the back end system (running on a hosted server) for the donor info etc for book keeping.
I have 2 choices
1- Use paypal newly released android SDK which can scan the card using card.io SDK and process the payment
2- Use paypal here card reader, and using the sideloader API , start the HERE application and take payment .

My question is, since it is a kiosk , users will not have paypal credentials and in paypal here application we need to enter username/passwd all the time . Is it true for the Android SDK solution too ?
Also, does the card.io based SDK works with front facing cameras (Nexus 7) ?

Please provide expert advice .

failed to login into paypal account even if email and password are correct

I have tested the android-sdk-example of paypal, it works well in the sandbox environment, but only for payment with credit card
and I see the transations in my dashboard all is perfect

but when I try to test payment with paypal account, I don't arrive to login, even if I login with another account other than the one which the payment is send

the only thing in the account is it is not linked to a credit card

how can I fix this issue

thank you in advance

Choose funding source

Hi, I am using the latest PayPal SDK in my Android app.

I have one test user in the PayPal sandbox with two different funding sources (Bank account and Credit Card). I did not see any options in the activity flow to choose which funding source to use, every payment is always defaulted to IBT.

After digging in the SDK reference I don't think this is supported yet, is that correct? If so, is there any plan to support this functionality?

Thanks

Long payment description causing amount and currency to dissapear

How short should be the description expected for the PayPalPayment? User can't see the amount and the currency code when it's not short enough.

I don't think that 'Should fit on one line' is a nice suggestion btw. Can't you just at least use ellipsize on the text when it's long enough?

Cooperation with official Android PayPal Application

Does this SDK cooperate with official Android PayPal Application anyhow?
I'd like to just create simple payment request (without callback possibly), and I'd like to use PayPal if and only if user has application installed on his phone.

If I could just use Intent/Broadcast to invoke the PP application with details of payment, it would be great to have feature.

Thanks

Force clear user email

Hi
I`m developing a multiuser application with paypal integration.
Multiuser means that login/logout with server backend is supported.

Now I`m trying to implement next workflow:

  1. User1 logged-in to app.
  2. User1 tries to donate and goes to PayPal activity
  3. User1 enters PayPal credentials and leaves flag "stay logged in" turned on
  4. After donation User1 returns to app, and proceeds to logout from application
  5. User2 logged-in to application
  6. User2 tries to donate. PayPal activity launched

At this step obviously User2 should not see credentials of User1. But PayPal SDK remembers User1, because he left "stay logged in" flat turned on.

How can I force PayPal activity or service to proceed without credentials?

I found EXTRA_DEFAULT_USER_EMAIL in API docs. But it have effect just once - during first PayPal login. After that, if I start PayPal activity with different EXTRA_DEFAULT_USER_EMAIL, SDK still launches with remembered credentials

Is there Maven distribution possible?

Could you please add AAR distribution package on Maven repository (or Maven repository within branch in this github repo) ?

Javadocs and all the resources could be distributed in such way.
AAR is preferred because of Gradle integration and possibility to distribute not only Java CLASS files within signed archives.

Unauthorized device

Payments from this device are not allowed even i have right client_id for sandbox.

is France supported by paypal rest-api for live transactions

after setting CONFIG_ENVIRONMENT to PaymentActivity.ENVIRONMENT_PRODUCTION and setting live credentials, all my payments with valid credit card and verified account are failed

I have this error UNAUTHORIZED_PAYMENT when I pay with credit card

then, I am wondering if france is supported by the rest api of paypal or not

because even if I use a france account I have this :

capture

how to resolve this issue

This currency is not presently supported

I am using the android paypal sdk with repo bbe7068.

Both receiver and buyer's paypal account's country is Hong Kong in sandbox.

The payment is in HKD and is very simple, only one product item and no shipping or tax fee. Everything works fine if buyer pays the bill via paypal account, but the payment fail if buyer pay via the credit card. An dialog popup with title "Payment Fail" and message "This currency is not presently supported."

I checked the android log but no helpful message found. For your reference, my device is Note2 with android version 4.1.2.

Thanks.
billy

"Live" SDK differing from "Testing" SDK?

Hello team,

We recently switched from sandbox to prod with the Android PayPal SDK after being approved for live API credentials.

However, in our switch, the card.io UI and ability to save CCs has disappeared. See screenshots: (mock data) http://cl.ly/image/2D3H0F0n1e3v (prod) http://cl.ly/image/0k031Q2u002t

Are those features only available in the debug version or should they be available in prod too? Any idea what may have happened? I will forward this to our developer in case a code sample is requested.

Thanks, and super shoutout to @ppalavilli who greatly assisted us in receiving live credentials in the first place.

Credit card payment error

I am using the latest Android SDK and cannot successfully complete a credit card payment. Payment using the paypal account works fine. The crash happens after payment is submitted and before the onActivityResult method is called. See a screenshot of the logcat below.

screen shot 2014-01-13 at 6 56 55 pm

Unauthorized device

When i am pressing buy now button.. it prompting checking device and then throwing error
Unauthorized device.. payments from this device are not allowed
this is occurring sometime only when i restart application it is working fine.
but my many users complain this error
Check below image of error.
payment error

E/PaymentConfirmActivity(2285): NumberFormatException probably the BigDecimalInvalid long: "3,00"

Dear people:

In the last part of the workflow for paying something, a dialog keeps saying "Proceso en curso" as title and "Un momento..." as message. The workflow keeps locked there. This happens when the language of the device is Spanish, but not when it is English. From LogCat appears the next exception:

E/PaymentConfirmActivity(2285): NumberFormatException probably the BigDecimalInvalid long: "3,00"

It seems that there is a problem with the treatment of the decimal separator configured in the device, or something like that. This has been tested in a Kindle fire emulator and in a generic emulator well-known as BlueStacks App Player.

Regards,

NumberFormatException

Hi,
I'm developing a mobile app through the PhoneGap Plugin, but when i call this:

PayPalPayment payment = new PayPalPayment(new BigDecimal("1.75"), "USD", "hipster jeans");

I always get a NumberFormatException

Any suggestions about this?
Thank you

java.lang.NullPointerException (com.paypal.android.sdk.payments.PaymentMethodActivity.onBackPressed(Unknown Source))

01-09 18:07:27.740: D/dalvikvm(32104): Trying to load lib /data/data/com.packagename/lib/libcardioDecider.so 0x427c6758
01-09 18:07:27.740: D/dalvikvm(32104): Added shared lib /data/data/com.packagename/lib/libcardioDecider.so 0x427c6758
01-09 18:07:27.740: D/dalvikvm(32104): Trying to load lib /data/data/com.packagename/lib/libopencv_core.so 0x427c6758
01-09 18:07:27.775: D/dalvikvm(32104): Added shared lib /data/data/com.packagename/lib/libopencv_core.so 0x427c6758
01-09 18:07:27.775: D/dalvikvm(32104): No JNI_OnLoad found in /data/data/com.packagename/lib/libopencv_core.so 0x427c6758, skipping init
01-09 18:07:27.775: D/dalvikvm(32104): Trying to load lib /data/data/com.packagename/lib/libopencv_imgproc.so 0x427c6758
01-09 18:07:27.795: D/dalvikvm(32104): Added shared lib /data/data/com.packagename/lib/libopencv_imgproc.so 0x427c6758
01-09 18:07:27.795: D/dalvikvm(32104): No JNI_OnLoad found in /data/data/com.packagename/lib/libopencv_imgproc.so 0x427c6758, skipping init
01-09 18:07:27.795: D/dalvikvm(32104): Trying to load lib /data/data/com.packagename/lib/libcardioRecognizer.so 0x427c6758
01-09 18:07:27.815: D/dalvikvm(32104): Added shared lib /data/data/com.packagename/lib/libcardioRecognizer.so 0x427c6758
01-09 18:07:28.360: I/Choreographer(32104): Skipped 48 frames! The application may be doing too much work on its main thread.
01-09 18:07:28.475: E/InputEventReceiver(32104): Exception dispatching input event.
01-09 18:07:28.480: E/MessageQueue-JNI(32104): Exception in MessageQueue callback: handleReceiveCallback
01-09 18:07:28.495: E/MessageQueue-JNI(32104): java.lang.NullPointerException
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at com.paypal.android.sdk.payments.PaymentMethodActivity.onBackPressed(Unknown Source)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.app.Activity.onKeyUp(Activity.java:2192)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.view.KeyEvent.dispatch(KeyEvent.java:2729)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.app.Activity.dispatchKeyEvent(Activity.java:2431)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2009)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.view.ViewRootImpl.deliverKeyEventPostIme(ViewRootImpl.java:3813)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.view.ViewRootImpl.deliverKeyEvent(ViewRootImpl.java:3747)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3304)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4402)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4380)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4484)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.os.MessageQueue.nativePollOnce(Native Method)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.os.MessageQueue.next(MessageQueue.java:125)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.os.Looper.loop(Looper.java:124)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at android.app.ActivityThread.main(ActivityThread.java:4898)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at java.lang.reflect.Method.invokeNative(Native Method)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at java.lang.reflect.Method.invoke(Method.java:511)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
01-09 18:07:28.495: E/MessageQueue-JNI(32104): at dalvik.system.NativeStart.main(Native Method)
01-09 18:07:28.500: D/AndroidRuntime(32104): Shutting down VM
01-09 18:07:28.500: W/dalvikvm(32104): threadid=1: thread exiting with uncaught exception (group=0x41b5f2a0)
01-09 18:07:28.505: W/System.err(32104): java.lang.NullPointerException
01-09 18:07:28.505: W/System.err(32104): at com.paypal.android.sdk.payments.PaymentMethodActivity.onBackPressed(Unknown Source)
01-09 18:07:28.505: W/System.err(32104): at android.app.Activity.onKeyUp(Activity.java:2192)
01-09 18:07:28.505: W/System.err(32104): at android.view.KeyEvent.dispatch(KeyEvent.java:2729)
01-09 18:07:28.505: W/System.err(32104): at android.app.Activity.dispatchKeyEvent(Activity.java:2431)
01-09 18:07:28.505: W/System.err(32104): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2009)
01-09 18:07:28.505: W/System.err(32104): at android.view.ViewRootImpl.deliverKeyEventPostIme(ViewRootImpl.java:3813)
01-09 18:07:28.510: W/System.err(32104): at android.view.ViewRootImpl.deliverKeyEvent(ViewRootImpl.java:3747)
01-09 18:07:28.510: W/System.err(32104): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3304)
01-09 18:07:28.510: W/System.err(32104): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4402)
01-09 18:07:28.510: W/System.err(32104): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4380)
01-09 18:07:28.510: W/System.err(32104): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4484)
01-09 18:07:28.510: W/System.err(32104): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171)
01-09 18:07:28.510: W/System.err(32104): at android.os.MessageQueue.nativePollOnce(Native Method)
01-09 18:07:28.510: W/System.err(32104): at android.os.MessageQueue.next(MessageQueue.java:125)
01-09 18:07:28.510: W/System.err(32104): at android.os.Looper.loop(Looper.java:124)
01-09 18:07:28.510: W/System.err(32104): at android.app.ActivityThread.main(ActivityThread.java:4898)
01-09 18:07:28.510: W/System.err(32104): at java.lang.reflect.Method.invokeNative(Native Method)
01-09 18:07:28.510: W/System.err(32104): at java.lang.reflect.Method.invoke(Method.java:511)
01-09 18:07:28.510: W/System.err(32104): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
01-09 18:07:28.510: W/System.err(32104): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
01-09 18:07:28.510: W/System.err(32104): at dalvik.system.NativeStart.main(Native Method)
01-09 18:07:28.530: E/AndroidRuntime(32104): FATAL EXCEPTION: main
01-09 18:07:28.530: E/AndroidRuntime(32104): java.lang.NullPointerException
01-09 18:07:28.530: E/AndroidRuntime(32104): at com.paypal.android.sdk.payments.PaymentMethodActivity.onBackPressed(Unknown Source)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.app.Activity.onKeyUp(Activity.java:2192)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.view.KeyEvent.dispatch(KeyEvent.java:2729)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.app.Activity.dispatchKeyEvent(Activity.java:2431)
01-09 18:07:28.530: E/AndroidRuntime(32104): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2009)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.view.ViewRootImpl.deliverKeyEventPostIme(ViewRootImpl.java:3813)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.view.ViewRootImpl.deliverKeyEvent(ViewRootImpl.java:3747)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3304)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4402)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4380)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4484)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.os.MessageQueue.nativePollOnce(Native Method)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.os.MessageQueue.next(MessageQueue.java:125)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.os.Looper.loop(Looper.java:124)
01-09 18:07:28.530: E/AndroidRuntime(32104): at android.app.ActivityThread.main(ActivityThread.java:4898)
01-09 18:07:28.530: E/AndroidRuntime(32104): at java.lang.reflect.Method.invokeNative(Native Method)
01-09 18:07:28.530: E/AndroidRuntime(32104): at java.lang.reflect.Method.invoke(Method.java:511)
01-09 18:07:28.530: E/AndroidRuntime(32104): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
01-09 18:07:28.530: E/AndroidRuntime(32104): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
01-09 18:07:28.530: E/AndroidRuntime(32104): at dalvik.system.NativeStart.main(Native Method)

Unauthorized Device

I launch the PayPalSDKSample and pressed "Buy a thing" button.
The SDK pop up a dialog showing following message:

Unauthorized Device
Payments from this device are not allowed.

And I found there is one line error message on LogCat console:
Authentication error: Unable to respond to any of these challenges: {}

Don't know what's going on.

Tested with Nexus 7 & Galaxy Nexus

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

Create PayPal account from activity

Hi, I am using the latest PayPal SDK in my Android app.

I tested a few payments and I noticed a user needs to have an existing PayPal account in order to submit a payment through the SDK activity. I didn't see any options to create a new PayPal account or links to the PayPal website's appropriate page.

Is there a plan to support this functionality if not already available?

Thanks

Support for non-US transactions

"US developers should upgrade now for more features and a better mobile experience. Non-US developers can continue to use MPL for the time being. "

I am not a US developer, I want to know it can support other country, Look forward to your reply.

Currency Code EUR

i've created an application with android, but i have a problem with the currency code, the line code is
PayPalPayment payment = new PayPalPayment(new BigDecimal("10"), "EUR", "EXAMPLE");

this returns a error message:paymentExample_INVALID(3518): An invalid payment was submitted. Please see the docs.

I don't understand why

somebody can help me?

thnx

Login Failed PayPal-Android-SDK ( Live credentials )

Hello
i build andriod app with paypal Android SDK in test account every is ok
but when i change to Live credentials , i change EXTRA_RECEIVER_EMAIL and EXTRA_CLIENT_ID to real account and i comment ENVIRONMENT_SANDBOX and run my app

when i log in with my real account paypal error "Login Failed Syetem error. Please try again later"

  • i am non-US Developer (my account in Thailand)
    can u help me please
    Thank u
    daisyfoto

my screen shot
login mobile screen

Permissions requirement

I personally have a problem with implementing this SDK, because of number of permissions required.

I don't want Card.IO features, and still I'm forced to use CAMERA/VIBRATE
I cannot provide WIFI/NETWORK _STATE permissions, but SDK cannot work without them

Could the SDK be configurable, to enlist permissions we can provide and SDK should count on them?

PaymentActivity.EXTRA_DEFAULT_USER_EMAIL not used in login window

Hi, I'm attempting to provide a default user email to be used when paypal displays the login view. However, I can't seem to get the email address to display.

My code to invoke the PaymentActivity is this:

UserModel user = UserModel.loadSavedModel();
quote = (QuoteResponseModel)resultData.getSerializable(SaveQuoteService.QUOTE_RESPONSE);

PayPalPayment payment = new PayPalPayment(quote.getTotalPrice(), quote.getIsoCurrencySymbol(), quote.getQuoteDescription());

Intent intent = new Intent(this, PaymentActivity.class);

// comment this line out for live or set to PaymentActivity.ENVIRONMENT_SANDBOX for sandbox
intent.putExtra(PaymentActivity.EXTRA_PAYPAL_ENVIRONMENT, Config.getString(Config.PayPalEnvironment_Key));

intent.putExtra(PaymentActivity.EXTRA_CLIENT_ID, "<my-client-id>");
intent.putExtra(PaymentActivity.EXTRA_RECEIVER_EMAIL, "<receiver-email>");
intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);
intent.putExtra(PaymentActivity.EXTRA_PAYER_ID, user.getUserId());
intent.putExtra(PaymentActivity.EXTRA_DEFAULT_USER_EMAIL, user.getPayPalEmail());
intent.putExtra(PaymentActivity.EXTRA_SKIP_CREDIT_CARD, true);

startActivityForResult(intent, PAYPAL_PAYMENT_REQUEST_CODE);

It loads the order screen and when I select the Pay with PayPal button the login window opens up without the email address filled in.

Any suggestions on how I may be able to resolve this?

card.io and devices flash

Hello again!

Well, now when the card scanning is working there is another problem. Since i am using Samsung Galaxy S (i9000) this device does not have a flash.

But on the scanning interface, there is a button to turn the flash on. When you press that button, the app crashes with a NullPointerException.

LogIn using the Paypal Mobile SDK (Android)

i followed this guide: https://devblog.paypal.com/phonegap-android-sdk-plugin/
to integrate PayPal in my Phonegap Hybrid App.
If I pay with a credit card (in sandbox env) it works correctly and i can see the notification in my dashboard.
But if i press the login button, whatever user credentials i insert, it always return an error in login.

login mobile screen

So i navigate and i found this:enter image description here

So i want to know if i am doing something wrong or if it's really impossible to use this feature from mobile. In this case i wonder why the Java class allow to show a login button if it is useless.

And last, another question. When i get the proofOfPayment object, i send the payment_id trough AJAX to: https://api.sandbox.paypal.com/v1/payments/payment/ but it responds 401: Unauthorized

When Russian currency (RUB) wil be available?

PayPal is available in Russia and people can have accounts in RUB. Why this SDK doesn't support it? Do you have any plans about RUB?

Now, when I try to create PayPalPayment object with RUB currency, PaymentActivity doesn't start with no errors or logs.

is verified account required to receive payment in paypal android sdk

I want to know if it is required to have a verified paypal account to receive money through paypal android sdk

because even I have set the environment to production and set live credentials

private static final String CONFIG_ENVIRONMENT = PaymentActivity.ENVIRONMENT_PRODUCTION;

I have that in the response knwoing that I have sent payment from a verified account wich contains solde paypal:

"payment_exec_status": "ERROR"

and payment is not performed

this is why I was wondering if the verified account is required to receive money

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.