This library provides a client to connect with the PayPro API.
- PHP Version 5.3 or greater
- PHP extension cUrl
- PHP extension json
If you use Composer these dependencies are automatically handled for you. For manual installation make sure these extensions are activated.
To install using composer, you will have to install Composer first.
curl -s https://getcomposer.org/install | php
Create a composer.json file in your project root.
{
"require": {
"paypro/paypro-php-v1": "~1.0"
}
}
Tell Composer to install the required dependencies.
php composer.phar install
If you want to use autoloading provided by Composer, add the following line to your application file.
require 'vendor/autoload.php';
You are now ready to use the PayPro API client.
Just download the latest release and require the files directly in your project. You have to require the init.php
in your application file.
require 'init.php';
Example of creating a payment:
$payproClient = new \PayPro\Client('YOUR_API_KEY');
$payproClient->setCommand('create_payment');
$payproClient->setParams(array('amount' => 500, 'consumer_email' => 'test@paypro.nl', 'pay_method' => 'ideal/INGBNL2A'));
$payproClient->execute();
For guides and code examples you can go to https://paypro.nl/developers/docs.
If you want to contribute to this project you can fork the repository. Create a new branch, add your feature and create a pull request. We will look at your request and determine if we want to add it.