Download the PHP package payment-gateways/paypal-sdk without Composer
On this page you can find all versions of the php package payment-gateways/paypal-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package paypal-sdk
PayPal SDK
This is an SDK for PayPal REST APIS. The following APIs are currently supported.
Installation
Use following command to install this library:
Usage
Authentication
Go to PayPal Developer site and get the Client ID and Secret for your app. These credentials can be used in the service authentication as follows:
Catalog Products API
Merchants can use the Catalog Products API to create products, which are goods and services.
List products
To get all products use the getProducts
method.
Get a product
To get a single products use the getProduct
method.
Create a product
To create a product use the createProduct
method.
Update a product
To update a product use the updateProduct
method.
Billing Plans API
You can use billing plans and billing agreements to create an agreement for a recurring PayPal or debit card payment for goods or services.
List plans
To get all plans use the getPlans
method.
Get a plan
To get a single plan use the getPlan
method.
Create a plan
To create a product use the createPlan
method.
Update a plan
To update a product use the updatePlan
method.
Subscriptions API
You can use this API to create subscriptions that process recurring PayPal payments for physical or digital goods, or services.
Get a subscription
To get a single subscription use the getSubscription
method.
Create a subscription
To create a subscription use the createSubscription
method.
Error Handling
In general, You can use the toArray
method in all responses to get the service response data (except for patch operations),
otherwise you'll get an array with errors if something fails. You can check for a successful response using the isSuccessful
method.
.
Mocking
You can create your own PayPal API Mock for use with PayPalService
like this
The handler must be a callable
type. If you prefer, you can use the PayPal API Mock
adding the following to your project
After, you could use the class PayPalApiMock
as a handler