forked from LiveCarta/PayPal-PHP-SDK
Updated version of SDK Core
- Updated version - Fixed Testing Bugs - Updated README - Updated Release note
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,6 +8,7 @@ build
|
|||||||
.project
|
.project
|
||||||
.settings
|
.settings
|
||||||
.buildpath
|
.buildpath
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
*.bak
|
*.bak
|
||||||
|
|
||||||
# Composer
|
# Composer
|
||||||
|
|||||||
@@ -5,9 +5,6 @@ php:
|
|||||||
- 5.5
|
- 5.5
|
||||||
- 5.6
|
- 5.6
|
||||||
- hhvm
|
- hhvm
|
||||||
env:
|
|
||||||
- CONFIGURATION_FILE=phpunit.xml
|
|
||||||
- CONFIGURATION_FILE=phpunit.integration.xml
|
|
||||||
matrix:
|
matrix:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: hhvm
|
- php: hhvm
|
||||||
@@ -18,7 +15,7 @@ before_script:
|
|||||||
script:
|
script:
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- mkdir build/coverage
|
- mkdir build/coverage
|
||||||
- phpunit -c $CONFIGURATION_FILE
|
- phpunit
|
||||||
after_success:
|
after_success:
|
||||||
- php vendor/bin/coveralls -v -c .coveralls.yml
|
- php vendor/bin/coveralls -v -c .coveralls.yml
|
||||||
notifications:
|
notifications:
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -105,9 +105,25 @@ use PayPal\Api\Payment;
|
|||||||
|
|
||||||
The samples in this repo pick the SDK configuration from the `sdk_config.ini` file. If you do not want to use an ini file or want to pick your configuration dynamically, you can use the `$apiContext->setConfig()` method to pass in the configuration as a hashmap. See the `sample/bootstrap.php` file for an example.
|
The samples in this repo pick the SDK configuration from the `sdk_config.ini` file. If you do not want to use an ini file or want to pick your configuration dynamically, you can use the `$apiContext->setConfig()` method to pass in the configuration as a hashmap. See the `sample/bootstrap.php` file for an example.
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
There are two kinds of tests that we include in our sdk package. Unit tests, and Integration Tests.
|
||||||
|
|
||||||
|
* **Unit Tests**
|
||||||
|
* Unit tests can be executed by running this command `phpunit` at Paypal SDK root location.
|
||||||
|
* It executes the tests with configuration stored in `phpunit.xml` file.
|
||||||
|
* **Integration Tests**
|
||||||
|
* Integration tests make curl requests to sandbox environments by default. It would test both unit as well as integration tests. To execute, run this command `phpunit -c phpunit.integration.xml` at Paypal SDK root location.
|
||||||
|
* It executes the tests with configuration stored in `phpunit.integration.xml` file.
|
||||||
|
* The configurations could be changed from `tests\sdk_config.ini` file.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
* If you find solution to an [issue/improvements](https://github.com/paypal/rest-api-sdk-php/issues) in sdk that would be helpful to everyone, feel free to send us a pull request.
|
||||||
|
* The ideal approach to create a fix would be to fork the repository, create a branch in your repository, and make a pull request out of it.
|
||||||
|
* It is desirable if there is enough comments/documentation and Tests included in the pull request.
|
||||||
|
* For general idea of contribution, please follow the guidelines mentioned [here](https://guides.github.com/activities/contributing-to-open-source/).
|
||||||
|
|
||||||
## More help
|
## More help
|
||||||
|
|
||||||
* [API Reference](https://developer.paypal.com/webapps/developer/docs/api/)
|
* [API Reference](https://developer.paypal.com/webapps/developer/docs/api/)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"php": ">=5.3.0",
|
"php": ">=5.3.0",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"paypal/sdk-core-php": "2.4.*"
|
"paypal/sdk-core-php": "2.5.*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "3.7.*"
|
"phpunit/phpunit": "3.7.*"
|
||||||
|
|||||||
@@ -1,6 +1,18 @@
|
|||||||
PayPal PHP SDK release notes
|
PayPal PHP SDK release notes
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
v0.11.0
|
||||||
|
----
|
||||||
|
* Ability for PUT and PATCH requests
|
||||||
|
* Invoice number, custom and soft descriptor
|
||||||
|
* Order API and tests, more Authorization tests
|
||||||
|
* remove references to sdk-packages
|
||||||
|
* patch for retrieving paid invoices
|
||||||
|
* Shipping address docs patch
|
||||||
|
* Remove @array annotation
|
||||||
|
* Validate return cancel url
|
||||||
|
* type hinting, comment cleaning, and getters and setters for Shipping
|
||||||
|
|
||||||
v0.8.0
|
v0.8.0
|
||||||
-----
|
-----
|
||||||
* Invoicing API support added
|
* Invoicing API support added
|
||||||
|
|||||||
@@ -9,6 +9,6 @@
|
|||||||
"php": ">=5.3.0",
|
"php": ">=5.3.0",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"paypal/rest-api-sdk-php" : "0.8.*"
|
"paypal/rest-api-sdk-php" : "0.11.*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,13 +51,17 @@ $payer->setPaymentMethod("credit_card")
|
|||||||
// information
|
// information
|
||||||
$item1 = new Item();
|
$item1 = new Item();
|
||||||
$item1->setName('Ground Coffee 40 oz')
|
$item1->setName('Ground Coffee 40 oz')
|
||||||
|
->setDescription('Ground Coffee 40 oz')
|
||||||
->setCurrency('USD')
|
->setCurrency('USD')
|
||||||
->setQuantity(1)
|
->setQuantity(1)
|
||||||
|
->setTax('0.30')
|
||||||
->setPrice('7.50');
|
->setPrice('7.50');
|
||||||
$item2 = new Item();
|
$item2 = new Item();
|
||||||
$item2->setName('Granola bars')
|
$item2->setName('Granola bars')
|
||||||
|
->setDescription('Granola Bars with Peanuts')
|
||||||
->setCurrency('USD')
|
->setCurrency('USD')
|
||||||
->setQuantity(5)
|
->setQuantity(5)
|
||||||
|
->setTax('0.20')
|
||||||
->setPrice('2.00');
|
->setPrice('2.00');
|
||||||
|
|
||||||
$itemList = new ItemList();
|
$itemList = new ItemList();
|
||||||
|
|||||||
@@ -23,13 +23,13 @@ service.EndPoint="https://api.sandbox.paypal.com"
|
|||||||
|
|
||||||
log.LogEnabled=true
|
log.LogEnabled=true
|
||||||
|
|
||||||
# When using a relative path, the log file is created
|
; When using a relative path, the log file is created
|
||||||
# relative to the .php file that is the entry point
|
; relative to the .php file that is the entry point
|
||||||
# for this request. You can also provide an absolute
|
; for this request. You can also provide an absolute
|
||||||
# path here
|
; path here
|
||||||
log.FileName=PayPal.log
|
log.FileName=PayPal.log
|
||||||
|
|
||||||
# Logging level can be one of FINE, INFO, WARN or ERROR
|
; Logging level can be one of FINE, INFO, WARN or ERROR
|
||||||
# Logging is most verbose in the 'FINE' level and
|
; Logging is most verbose in the 'FINE' level and
|
||||||
# decreases as you proceed towards ERROR
|
; decreases as you proceed towards ERROR
|
||||||
log.LogLevel=FINE
|
log.LogLevel=FINE
|
||||||
|
|||||||
Reference in New Issue
Block a user