4

Running the Paypal Sample app, on Nexus4 - 4.3, Using PayPal SDK for Android. The sample works perfect with when the below code is added:

CONFIG_ENVIRONMENT = PaymentActivity.ENVIRONMENT_NO_NETWORK;

When switching to real money:

CONFIG_ENVIRONMENT = PaymentActivity.ENVIRONMENT_PRODUCTION;
CONFIG_CLIENT_ID = "Afa................c";
CONFIG_RECEIVER_EMAIL = "david@gmail.com";

I'm getting next error: "Payment from this device are not allowed", And the log shows next line:

W/DefaultRequestDirector﹕ Authentication error: Unable to respond to any of these challenges: {}

what is the problem?

enter image description here

CoderDecoder
  • 445
  • 4
  • 18
David
  • 37,109
  • 32
  • 120
  • 141
  • 1
    Have you tried `CONFIG_ENVIRONMENT = PaymentActivity.ENVIRONMENT_SANDBOX`? Note that there are two credentials in developer.paypal.com. One is for sandbox, the other is for production. Also, did you see any messages in logcat? – tomwhipple Nov 11 '13 at 17:14
  • @tomwhipple SandBox mode working fine. So I guess I'm using the clientId for sandbox, but that is the only one I see in the app properties within developer.paypal.com, how can I fetch the production one? – David Nov 11 '13 at 19:09

3 Answers3

1

Jeff here from PayPal. Please double check that you're using the correct clientId. When you signed up at developer.paypal.com, generally the sandbox credentials are immediately provided. Only after vetting, will your app be given a production clientId. Please see a similar issue in GitHub for more thorough information.

Also, if you can, please investigate the Android logs for more information. If you see a 401, then you're definitely providing an invalid clientId / environment combination.

Jeff Brateman
  • 3,229
  • 2
  • 20
  • 26
  • Can't see any 401 error. (I updated the question for the log I'm getting). And in the developer console I can see just one clientId. What is that vetting process, and how can I interact with it? – David Nov 11 '13 at 18:54
  • Update here - we've provided a more helpful error message and logs that should help debugging. Now you'll see a message that specifically mentions the invalid clientId. – Jeff Brateman May 20 '14 at 15:43
0

Me too faced similar issue, but I solved it by changing my ENVIRONMENT_PRODUCTION to ENVIRONMENT_SANDBOX (Because I am using it only for testing purpose)and added my CONFIG_CLIENT_ID by login in paypall

  • Please double check that you're using the correct environment extra (EXTRA_PAYPAL_ENVIRONMENT). Note that there are separate client_id values for ENVIRONMENT_PRODUCTION and ENVIRONMENT_SANDBOX.
Shailendra Madda
  • 20,649
  • 15
  • 100
  • 138
0

In my case, It was just a Wifi - network problem. First, try to change the network or use mobile data and then go for other solutions.

  • It was throwing the same error in Android-studio logs as well on a computer browser.

Logs:

<HTML><HEAD>
    <TITLE>Access Denied</TITLE>
    </HEAD><BODY>
    <H1>Access Denied</H1>

    You don't have permission to access "http&#58;&#47;&#47;api&#45;m&#46;sandbox&#46;paypal&#46;com&#47;v1&#47;oauth2&#47;token" on this server.<P>
    Reference&#32;&#35;18&#46;15367c68&#46;1564405918&#46;472e4813
    </BODY>
    </HTML>

On a computer browser:

enter image description here

Rumit Patel
  • 8,830
  • 18
  • 51
  • 70