Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Stuck at checking this device #264

Closed
NadeemClabs opened this issue Feb 25, 2016 · 20 comments
Closed

Stuck at checking this device #264

NadeemClabs opened this issue Feb 25, 2016 · 20 comments
Labels

Comments

@NadeemClabs
Copy link

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.

@braebot
Copy link
Contributor

braebot commented Feb 25, 2016

Two issues here:

  1. rememberUser does not ensure the user logs out. Rather, if you look at the docs for this method, it just saves the user name for subsequent transactions if the user is not already logged in.
  2. I looked at the code, and can see a case where something may execute out of order, resulting in the spinner waiting for something that will never come. This is rare, and I have never been able to reproduce that on my device.

Please confirm that this is truly an issue for you. Logging out after every transaction is not a good usability experience, and I would suggest setting that flag to true.

@NadeemClabs
Copy link
Author

Hi,

This issue occur every time for me.
In my app we have take payment from customer by using driver app thats why I want logging out after every transaction.
For this Paypal provide rememberUser method but it not works for me when I pass false in this method.

@braebot
Copy link
Contributor

braebot commented Feb 25, 2016

Can you please clarify your comment:

we have take payment from customer by using driver app

This SDK is meant for a consumer device. If the driver's app is taking payment, then you should be using PayPal Here.

@NadeemClabs
Copy link
Author

@braebot we did not wanted to integrate any device with the Driver App, but just need to use the OCR ability of the paypal SDK to scan the card and thus collect the payment.

In short term, if clearing the user data is not possible, is it possible to just simply restrict the user to only be able to pay via credit cards only ?

@ppmtscory
Copy link

@NadeemClabs there is no way to restrict to CC only with this SDK. If you want the card scanning option only, you can look into integrating card.io directly. Keep in mind that this would only scan the card data and you would still need to implement a way to process the data. Also, as @braebot stated, you could also use the PayPal Here SDK to integrate a card processing solution for your Driver App.

@NadeemClabs
Copy link
Author

We do not want to integrate any Device with the App, so can't use Paypal Here. Can you share some API docs where we can use the credit card data scanned via card.io and use it to make a payment via paypal ?

@NadeemClabs
Copy link
Author

Otherwise if you can help me figure out the issue with the rememberUser function, then all the problem is fixed.

@ppmtscory
Copy link

The way you are trying to use the rememberUser function is not the way the SDK intended it to work so, unfortunately, I don't believe there's going to be much that we can do for that. With the payment info, if you were able to SECURELY send the card data to your server, you could populate it into the REST API to process the payment. Keep in mind that direct credit card processing via REST API are not available in all countries and also you'd most likely have to go through PCI compliance since you are dealing directly with the card data.

@NadeemClabs
Copy link
Author

Hi Guys,

The Problem statement is like this:

We are collecting payment from the Agent/Driver Application, where the Driver will be asking for the Customer for his card and/or paypal account, and then process the payment. Once the payment is processed, the Paypal SDK will send the control back to our application.

Now, we do not want to SAVE any consumer information like his paypal account, credit card information etc in the Paypal SDK, so that the Agent can go on and collect payment from some other customer for some other service that he will work on next.

Now, we just need information/help on the rememberUser(false) method, so that if we can disable this remember/caching functionality, our flow will start working exactly as we need it to be.

Please let me know if you need any other clarification on the above issue. Also we want to go live with the application next week, so if you can reply as soon as possible, it would be great, so that we have enough time to test the process.

Regards
Nadeem

@ppmtscory
Copy link

@NadeemClabs this mSDK is definitely not intended to be used in this way due to the security implications. This SDK is intended to be used on a consumer device where they control their input and, subsequently, the rememberUser function is extremely helpful so they don't have to enter information multiple times within a short timeframe. This SDK is NOT intended to be used on a "merchant" application where the device would be passed to the customer to enter PayPal information or a card handed to the driver to input card details on their device. Therefore, for this application/use case, there won't be any functionality that we can change with the rememberUser function.

For your particular use case, I'd strongly recommend the PayPal Here SDK. Yes, you'll need to also utilize either the triangle dongle or the EMV Bluetooth reader, but that connection is done within the SDK by implementing different listeners so it's very straightforward. Also, your customers would get the added benefits of being able to pay via Chip cards and NFC (contactless).

@NadeemClabs
Copy link
Author

@ppmtscory Have you check your SDK by sending false as a param in rememberUser method.
If this is not working with false parameter then what is the use of this method.
My problem will solve if rememberUser is start working with false as a argument.

@ppmtscory
Copy link

@NadeemClabs yes, I have, and I'm unable to reproduce your issue. I've just completed 3 payments in a row without getting stuck on the checking device spinner. Each time, the user information was cleared, so I had to re-enter the login and/or card info.

private static PayPalConfiguration config = new PayPalConfiguration()
            .environment(CONFIG_ENVIRONMENT)
            .clientId(CONFIG_CLIENT_ID)
            .rememberUser(false)
            // The following are only used in PayPalFuturePaymentActivity.
            .merchantName("Example Merchant")
            .merchantPrivacyPolicyUri(Uri.parse("https://www.example.com/privacy"))
            .merchantUserAgreementUri(Uri.parse("https://www.example.com/legal"));

@NadeemClabs
Copy link
Author

@ppmtscory I have checked in several other devices, sometimes it works fine but most of time I got stuck at checking this device screen please see the attach screenshot.
device-2016-02-27-150344

@NadeemClabs
Copy link
Author

@ppmtscory Any updated on this?

@NadeemClabs
Copy link
Author

I have also noticed that paypal SDK works fine after 2 or 3 attempts.

@ppmtscory
Copy link

What is showing in Logcat when you get stuck on this screen?

@NadeemClabs
Copy link
Author

Got this in my logcat

W/paypal.sdk: PayPalService created. API:23 PayPalSDK/PayPal-Android-SDK 2.13.3 (An
W/paypal.sdk: clearing user data
W/paypal.sdk: active service user data cleared
W/paypal.sdk: fv SN:20 PayPal Debug-ID: 107ac19eb979f [live, 2.13.3;release]
W/paypal.sdk: fv SN:23 PayPal Debug-ID: d66d44debb661 [live, 2.13.3;release]

@braebot
Copy link
Contributor

braebot commented Feb 29, 2016

Yep, setting rememberUser to false is definitely causing an issue here. We'll keep this issue open until that bug is fixed. Oddly, it only affects some devices.

@NadeemClabs
Copy link
Author

Please fix it ASAP, we want to go live, also notify me as soon as you fixed this issue.

@jaypatel512
Copy link
Contributor

Hey @NadeemClabs !

I currently tested our sample app using rememberUser to false in sandbox, and was able to successfully disable remembering the user for multiple transactions. This issue has been fixed. Please re-open if you are still facing this issue.

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

No branches or pull requests

4 participants