problem trying to install the SDK for PHP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I am following the guide to use PayPal REST API
https://developer.paypal.com/docs/checkout/reference/server-integration/setup-sdk/
but I have a problem installing the SDK for PHP, with this part :
//Create a PHP project in your directory, then run the following command to install the PayPal JavaScript SDK.
composer require paypal/paypal-checkout-sdk 1.0.1
This is not PHP. What is it ? Where am I supposed to execute it ?
I want to install on both my local PHP (EasyPHP) for tests, and of course on my website (hosted on Hostinger).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
composer is an additional programm to run on server. Please ask your provider Hostinger. Many Providers do not support it.
I'am on all-inkl.com in Germany. Here I have the same problem. It is not alowed to execute composer for customers.
You can try to install the sdk manually and get it to run with your own autoloader.
I tried it but without success. Some files are missing in the sdk. See my question here:
There are many questions here without any answer. So I think this is not moderated by paypal here. I will changed to stripe, its looks easyer to implement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"You can try to install the sdk manually and get it to run with your own autoloader."
I am not sure what you mean. I did not even know what Composer was before I tried to install this. I entered the command in Putty, it said it installed successfully, but I do not see any file anywhere, and the button does not display.
My hosting provider support says that the problem comes from Paypal, and Paypal support says that the problem comes from my hosting provider. Hell!
The guide is incredibly poorly explained. By the way, there is a php file we have to create on this page
https://developer.paypal.com/docs/checkout/reference/server-integration/setup-sdk/
but we don't call it anywhere in the next php file so I do not understand what to do with it...
https://developer.paypal.com/docs/checkout/reference/server-integration/set-up-transaction/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You will get more information here:
https://github.com/paypal/Checkout-PHP-SDK
You also need the paypal-library "paypalhttp".
unfortunately this is not provided with the checkout-php-sdk at this github place.
but you will get it if you run composer on your local machine. copy it to your server.
And ... you need php-skills 😉
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Getting errors when integrating standard checkout with my web site. Probably a beginner problem. in SDKs
- IPN works in sandbox but not live in Sandbox Environment
- Problems with accent characters when calling Paypal API (v2/invoicing/invoices). in REST APIs
- Issue with Rendering Trustly Payment Button via PayPal JavaScript SDK in SDKs
- The current address of the company in REST APIs