Reputation: 27
I am new to paypal and use sanbox.
I'm trying to implement the paypal payment platform on an online sales page and I get an error; When creating an app in developer paypal (generates my client id and its normal secret) and use it on the page I get the following error;
PayPalConnectionException in PayPalHttpConnection.php line 154:
Got Http response code 401 when accessing https://api.sandbox.paypal.com/v1/oauth2/token.
But if I use a public credentials (taken from the internet) if it works and I redirect to paypal correctly ..
What am I doing wrong? I need something to check
Thanks in advance
Upvotes: 1
Views: 195
Reputation: 27
yes friends, I understand that I had to create a Sandbox account and so I did and still does not work when creating my app.
I am creating an application in laravel and I need the cliend id and the secret of a sandbox api that is why I am trying to implement this method. I hope to see if anyone can come up with a way to solve this problem.
Why does not my account generate a valid client id? Why does any other internet work?
Upvotes: 0
Reputation: 21
You need to create sandbox account, your regular account not work on sandbox, search on google for sandbox account for test, you can even create buyers with money on the account to simplify your tests.
Upvotes: 0
Reputation: 3220
Use a package like anouar/paypalpayment or omnipay/paypal and it will be much easier for you to implement it.
Upvotes: 1