, (*1)
Prerequisites
- PHP 5.6 and above
- curl extension with support for OpenSSL
- PHPUnit 4.2.0 for running test suite (Optional)
- Composer (Optional)
Composer
You can install the library via Composer.
1. Method #1
- Run, (*2)
composer require payu/card-storage-client-php
- Method #2
- Add this to your composer.json
{
"require": {
"payu/card-storage-client-php": "^0.1.0"
}
}
composer install
To use the library, include Composer's autoload:, (*3)
require_once('vendor/autoload.php');
To use the examples, add the following to the example script:, (*4)
require_once('/path/to/vendor/autoload.php');
Manual Installation
Obtain the latest version of the PayU Card Storage Client Library with:, (*5)
git clone https://github.com/PayU/card-storage-client-php.git
To use the Library, add the following to your PHP script:, (*6)
require_once __DIR__ . '/path/to/card-storage-client-php/src/init.php';
To use the examples, add the following to the example script:, (*7)
require_once __DIR__ . '/../src/init.php';
Getting Started
You can find usage examples in the examples directory:, (*8)
- cardStorageExample.php - Minimal requirements for getting card info based on a card number