spiritlabs-api / php-sdk
spirit labs payment system SDK
dev-master
2014-05-18 23:35 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-01-04 17:28:10 UTC
README
spirit labs API PHP SDK
This is the implementation for the spirit labs payment aggregation gateway.
BE CAREFUL: THIS SDK IS CURRENTLY UNDER DEVELOPMENT AND NOT STABLE. IF YOU FIND BUGS PLEASE PATCH VIA PULL REQUEST!
This package is compliant with PSR-0, PSR-1, and PSR-2. If you notice compliance oversights, please send a patch via pull request.
Usage
This SDK is available via composer (https://packagist.org/packages/spiritlabs-api/php-sdk), just add "spiritlabs-api/php-sdk": "dev-master" to your composer.json require list.
For usage details see also examples/ folder.
Get available payment methods
$API = new \SpiritLabs\API\Client(new \SpiritLabs\API\Authentication_HTTPBasicAccessAuth( $ApiKey, $SecretKey )); $PaymentCustomer = new \SpiritLabs\API\Payment_Customer(array('UserId' => $UserId)); $PaymentCustomer->firstname = $firstname; $PaymentCustomer->lastname = $lastname; $PaymentMethods = $API->getPaymentMethods( array( new \SpiritLabs\API\Payment_Price($price, $currency) ), $PaymentCustomer, true ); print_r($PaymentMethods);
Todo
- Add all API methods from https://api.spiritlabs.de
- Add and improve documentation (source code and usage documentation)
License
This library is released under MIT license.