I'am new to the paypal (rest) api but got a simple example to work in the sandbox. Now today it suddenly stopped working, throwing a
401 when accessing https://api.sandbox.paypal.com/v1/oauth2/token
And at least I am not aware (neither is git!) of ANY code changes.
Now I'm logged into the paypal developer dashboard and in the section "My Apps & Credentials" scrolled down to "REST API apps" where I have one app called "test". When I click on it to see the details it says:
Something went wrong. Your sandbox app details could not be fetched.
You can try again or you can fetch your live app details.
I can create new apps but with their credentials it also ends up in the 401. I tried to delete the test app but it says
Application test could not be deleted
Can anybody explain this to me an then maybe lead me to a understandable tutorial on how to go live? The resources provided by paypal really confuse me.
Can you create a new sandbox business US account and retry again?
In the developer portal, can you check if the sandbox account is successfully created or is it showing an error "Something when wrong..."?
You may check this by clicking Profile tab under the sandbox email in developer portal.
Related
I have integrated PayPal on my website. I'm using paypal sandbox for processing payments and that works fine on my local machine. But when I uploaded it on my live server it didn't work.
I'm using sandbox mode on live server too and when someone clicks on 'Pay' button he gets an error message. Instead of that he should be redirected to PayPal checkout page.
This line of code returns false for some reason, and I'm passing API credentials (ApiContext class with client id and secret)
$pay = $this->payment->create(parent::getAuth());
I don't understand what went wrong, I don't get an exception or any other error message, so I can't figure it out what's going on. Everything seems all right (payer, item, details, amount classes etc), the only different thing between the site on my local machine and this one on the live server is that I have created new paypal app for my live website and I passed right api credentials for that app.
Some other info:
I'm using my person paypal account in developer paypal to create paypal app and my real account isn't business account but I don't know if that matters for sandbox testing, because it works in localhost.
You can check my website HERE
Note: I created this site just to improve my developer skills! I or anyone else will not
use this for production.
I want to create app_id for paypal integration into my android app.I have created account in paypal and login at https://developer.paypal.com/.but i am unable to see applications tab and also when i click on dashbord it is showing an error "This Web Page Not Availabe".Please help me.
We are currently facing issues with Sandbox Environment. It is under a high priority to get it fixed, and should be resolved soon.
I am attempting PayPal's express checkout this week for an online system I am building. I am running a LAMP server hosted on Koding.com(A virtual machine service) and they have no "web admin" panel. When I attempted the sandbox integration using the appropriate API URLs and API Username, Password, and Signature, it worked fine. No problems. However, when I decided to go live, using the appropriate URLs and API Username, Password, and Signature, I get the following error on the PayPal page:
We are unable to complete your request at this time. Please try again later. We apologize for the inconvenience.
To answer common questions, I have:
Switched API Urls to paypal.com vs sandbox.paypal.com
Tried deleting old API info and replacing it with new Username, Password, and Signature
Contacted PayPal support, and created a ticket.
Switched between selling "Physical" and "Digital" goods, to no avail
My account is a PayPal "business" account.
Any help would be appreciated!
Found the answer. When going live with PayPal, you have to go into the PayPal developer portal and create a new application and get it approved because you're working with real money. Silly me.
I've been crawling the internet all morning trying to figure this out. I'm trying to get access to a Adwords test account through the API but I keep receiving "An error has occurred: { "error" : "invalid_grant" }". I've seen this is quite a common problem so perhaps if I outline what I've done step by step someone can correct me. Hopefully!
Created a Google adwords account and set up a campaign.
Created a MCC account. Added Google adwords account and applied for API access (pending). Noted API key, client id for auth.ini.
Created a test MCC account and added Google adwords account. Noted client id for auth.ini.
Using the Google account of both MCC accounts went into the API console and created a new installed application app. Noted all keys/tokens.
Downloaded the PHP code examples and libs. Ran get GetRefreshToken.php, granted accesses to app(s) and noted refresh token for auth.ini
Set up auth.ini populating developerToken, userAgent, clientCustomerId, client_id, client_secret and refresh_token.
Now I've tried using BOTH sets of tokens and ids from the test MCC account API console and the live MCC account API console. Both give me the same error. I've tried regenerating all tokens several times.
Gave up and came crawling to StackOverFlow.
Is the invalid_grant message related to Auth or my developerToken token not being activated yet (sure it said I could use my test account though) or because I haven't set up any of the billing?
In my case the problem was at step 5 in your list; I had copied the authorization code from my browser after granting access, rather than the refresh token generated by GetRefreshToken.php after I pasted the authorization code there.
I had the same situation for a long time.
But solution was very simple.
The code getting after authorizing the Google is not your refresh token.Its is only an access token(I guess.)
You have to add this code to GetAccessToken's $code variable function in getrefreshtoken.php file and it will return the actual Refresh token.
This solved my issue.
It is very important to note that the SDK is designed to be used through PHP-Cli. So please don't use it via browser. If you still run it by commenting out return line you'll get into further problems to comment that on each file :)
I try to make a validation of purchases on the server, but it can't to make a request to Google Play Android Developer API. After a request it shows this one:
Error calling GET https://www.googleapis.com/androidpublisher/v1.1/applications/my.app.id/inapp/my_in_app_purchase/purchases/purchase_token: (403) Forbidden
If I make a validation of this purchase by the test form in Developers Console, everything is OK and Google API would send a response.
Requests to other API (for example Books API) works fine.
To work with API I use Google APIs Client Library for PHP. Authorization goes by Service Account. In Developers Console access to Google Play Android Developer API is on.
Ok I found the solution!
You must to connect your API with your app. You must go to your Google Play publish page (https://play.google.com/apps/publish) and invite a user with the service account email in Settings->User account & rights->Invite new user and give it the privileges of "View financial reports".
Thanks works for me, good luck!