From dbb8eb4b1728875c57841d786ab361229a836034 Mon Sep 17 00:00:00 2001 From: Prasanna Annamalai Date: Tue, 19 Mar 2013 16:12:14 +0530 Subject: [PATCH 1/3] Modified README.md and add travis config --- .travis.yml | 10 ++++++++++ README.md | 18 +++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6ce4fee --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: php +jdk: + - 5.4 + - 5.3 +before_script: + - composer install +notifications: + recipients: + - prannamalai.x.com@gmail.com + on_success: always \ No newline at end of file diff --git a/README.md b/README.md index cbb0ff8..38f67ad 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -REST API SDK for PHP (V0.5.0) +REST API SDK for PHP (V0.5.0) [![Build Status](https://travis-ci.org/prannamalai/rest-api-sdk-php.png?branch=master)](https://travis-ci.org/prannamalai/rest-api-sdk-php) ============================== PayPal's PHP SDK for the RESTful APIs @@ -30,23 +30,27 @@ To write an app that uses the SDK 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 - define('PP_SDK_CONFIG_PATH', /path/to/your/sdk_config.ini); + ```php + 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 * 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->setIntent("Sale"); ... - + $payment->create(); - + *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. From 13994ccf2cc50d1115385c70a614917bc4420ae7 Mon Sep 17 00:00:00 2001 From: Prasanna Annamalai Date: Tue, 19 Mar 2013 16:33:51 +0530 Subject: [PATCH 2/3] Modified files for php and README.md --- .travis.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6ce4fee..583d905 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: php -jdk: +php: - 5.4 - 5.3 before_script: diff --git a/README.md b/README.md index 38f67ad..3623540 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ REST API SDK for PHP (V0.5.0) [![Build Status](https://travis-ci.org/prannamalai/rest-api-sdk-php.png?branch=master)](https://travis-ci.org/prannamalai/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 From e357b10fc1ad98531e9ce7723af2f8d5102cfb37 Mon Sep 17 00:00:00 2001 From: Prasanna Annamalai Date: Tue, 19 Mar 2013 17:09:36 +0530 Subject: [PATCH 3/3] Modified the travis config and README.md to reflect the paypal github repo --- .travis.yml | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 583d905..fb3f07e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,5 +6,5 @@ before_script: - composer install notifications: recipients: - - prannamalai.x.com@gmail.com - on_success: always \ No newline at end of file + - DL-PP-Platform-PHP-SDK@ebay.com + on_success: change \ No newline at end of file diff --git a/README.md b/README.md index 3623540..e289f24 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -REST API SDK for PHP (V0.5.0) [![Build Status](https://travis-ci.org/prannamalai/rest-api-sdk-php.png?branch=master)](https://travis-ci.org/prannamalai/rest-api-sdk-php) +REST API SDK for PHP (V0.5.0) [![Build Status](https://travis-ci.org/paypal/rest-api-sdk-php.png?branch=master)](https://travis-ci.org/paypal/rest-api-sdk-php) ============================== This repository contains PayPal's PHP SDK and samples for REST API.