The SDK is composed of API Services and user profiles that define characteristics of the users of those services. This section includes the following topics:This chapter details the software and hardware supported and required by the PayPal SDK and its installation.
l
l
3.
– Insert the following lines into your Apache httpd.conf (which is usually located in C:\Program Files\Apache Group\Apache2\conf)
– Go to your PHP installation directory and edit the php.ini file. Find extensions section, and uncomment (remove the semicolons at the beginning) the following two lines:php –info
Table D.1 PHP with PHP Extension and Application Repository (PEAR) Be sure you have configured PHP and your web server as detailed in “Configuring PHP and Apache for the SDK”.
2. Extract the distribution to your installation directory (indicated in these steps as install_dir) with one of the following commands:
4. When you are prompted for your target web directory, enter the name of your PHP web directory. The target directory must be under the document root of the PHP server.You can install the SDK to a remote computer that runs an FTP server.You need to know the following information to complete the remote installation:
2. Extract the distribution to your installation directory (indicated in these steps as install_dir) with one of the following commands:This installer will overwrite any existing files in the target directory. To cancel, press Control-C and then Y.Please enter the path (relative to your FTP root) for the paypal-php-sdk directory: yourRemoteInstallDirectoryPlease enter the path (relative to your FTP root) for the paypal-sdk-samples directory: yourRemoteInstallDirectoryInThePHPDocumentRoot
SDK documentation: examples, sample XML, and API documentation
Table D.3 APIProfile and EWPProfile implementations and the ProfileHandler definitions, with two deafult profile handlers: ProfileHandler_File and ProfileHandler_Array. Auto-generated data type files from which the PayPal type classes inherit, and two parent classes: XSDType and XSDSimpleType. The PayPal SDK is distributed with the configuration properties file SDK_root/lib/PayPal/conf/paypal-sdk.php.dist.
Table D.4 Default log level. Date/time of API operation, operation name, elapsed time, success or failure indication. Because SOAP requests and responses are asynchronous, the recording of requests and responses might appear out of sequence in the log file.Because DEBUG logging can degrade the performance of the SDK, be careful about using it for day-to-day operation.
Table D.5 Same as DEBUG Full text of SOAP requests and responses and other debugging messages. Because DEBUG logging can degrade the performance of the SDK, be careful about using it for day-to-day operation.
Note: Because SOAP requests and responses are asynchronous, the recording of requests and responses might appear out of sequence in the log file.Integrated access to the PayPal Web Services APIs is one of the main features of the PayPal SDK. As shown in Figure D.1, “PayPal SDK API Services: High-Level View”, the PayPal SDK uses the underlying platform’s SOAP toolkit to communicate with the PayPal API endpoint. Stub classes representing the requests, the responses, and their data are provided to set request parameters and read response values. These classes are auto-generated from the PayPal WSDL file.
Figure D.1 Before the SDK can be used, it must know the profile of the user accessing its services. A profile is a collection of information about a merchant or developer who uses the PayPal SDK. An API profile is associated with API Services and includes:
l If you are using API Certificates, The path to the API certificate in PEM format as downloaded from PayPal
l The optional name of a third-party who authorizes the caller to invoke PayPal APIs on his behalf. This third-party is called a subject.
l
This class defines the basic information that PayPal needs to know about a user of the PayPal Web Service APIs. Developers must create an instance of APIProfile for each account that accesses the APIs. For single-merchant developers, only a single APIProfile instance is needed. PayPal provides a default implementation suitable for the needs of most SDK developers. However, you are free to write a custom implementation if you need additional functionality the default class does not offer. The ProfileHandler class manages the storage and retrieval of APIProfile and EWPProfile objects. PayPal provides two basic implementations: ProfileHandler_Array and ProfileHandler_File to serialize and deserialize the data in profiles to and from a file on the disk.For security, the ProfileHandler_File implementation does not store an API user’s API password.The PayPal SDK includes sample applications in the SDK_root/samples. The sample applications are divided into two groups:
1. Website Payments Pro: Using the Direct Payment API for credit card charges and the Express Checkout APIs
2. The samples come with an API Signature for use with the SDK and the PayPal Sandbox. This API Signature belongs to the following user:
Table D.7 A‑IzJhZZjhg29XQ2qnhapuwxIDzyAZQ92FRP5dqBzVesOkzbdUONzmOUThe samples come with a PayPal Web Services API digital certificate for use with the SDK and the PayPal Sandbox. This certificate belongs to the following user:
webDir will vary depending on the target PHP Web directory you specified to install.php when you installed the SDK.