forked from LiveCarta/PayPal-PHP-SDK
Merge pull request #3 from prannamalai/master
Travis Config, MD Syntax Highlights
This commit is contained in:
10
.travis.yml
Normal file
10
.travis.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
language: php
|
||||||
|
php:
|
||||||
|
- 5.4
|
||||||
|
- 5.3
|
||||||
|
before_script:
|
||||||
|
- composer install
|
||||||
|
notifications:
|
||||||
|
recipients:
|
||||||
|
- DL-PP-Platform-PHP-SDK@ebay.com
|
||||||
|
on_success: change
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
REST API SDK for PHP (V0.5.0)
|
REST API SDK for PHP (V0.5.0) [](https://travis-ci.org/paypal/rest-api-sdk-php)
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
PayPal's PHP SDK for the RESTful APIs
|
This repository contains PayPal's PHP SDK and samples for REST API.
|
||||||
|
|
||||||
|
|
||||||
Prerequisites
|
Prerequisites
|
||||||
@@ -30,11 +30,14 @@ To write an app that uses the SDK
|
|||||||
dependencies
|
dependencies
|
||||||
* Copy the sample configuration file sdk_config.ini to a location of your choice and let the SDK know your config path using the following define directive
|
* Copy the sample configuration file sdk_config.ini to a location of your choice and let the SDK know your config path using the following define directive
|
||||||
|
|
||||||
|
```php
|
||||||
define('PP_SDK_CONFIG_PATH', /path/to/your/sdk_config.ini);
|
define('PP_SDK_CONFIG_PATH', /path/to/your/sdk_config.ini);
|
||||||
|
```
|
||||||
|
|
||||||
* Obtain your clientId and client secret from the developer portal and add them to your config file
|
* Obtain your clientId and client secret from the developer portal and add them to your config file
|
||||||
* Now you are all set to make your first API call. Create a resource object as per your need and call the relevant operation or invoke one of the static methods on your resource class.
|
* Now you are all set to make your first API call. Create a resource object as per your need and call the relevant operation or invoke one of the static methods on your resource class.
|
||||||
|
|
||||||
|
```php
|
||||||
$payment = new Payment();
|
$payment = new Payment();
|
||||||
|
|
||||||
$payment->setIntent("Sale");
|
$payment->setIntent("Sale");
|
||||||
@@ -46,6 +49,7 @@ dependencies
|
|||||||
*OR*
|
*OR*
|
||||||
|
|
||||||
$payment = Payment::get('payment_id');
|
$payment = Payment::get('payment_id');
|
||||||
|
```
|
||||||
|
|
||||||
These examples pick the client id / secret automatically from your config file. You can also set API credentials dynamically. See the sample code for how you can do this.
|
These examples pick the client id / secret automatically from your config file. You can also set API credentials dynamically. See the sample code for how you can do this.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user