Reputation: 37596
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 = "[email protected]";
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?
Upvotes: 4
Views: 3093
Reputation: 12579
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.
Logs:
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
You don't have permission to access "http://api-m.sandbox.paypal.com/v1/oauth2/token" on this server.<P>
Reference #18.15367c68.1564405918.472e4813
</BODY>
</HTML>
On a computer browser:
Upvotes: 0
Reputation: 21551
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
ENVIRONMENT_PRODUCTION
and ENVIRONMENT_SANDBOX
.Upvotes: 0
Reputation: 3277
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.
Upvotes: 1