vladimir-yuldashev / creditpilot
CreditPilot PHP library
Installs: 950
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 4
Open Issues: 1
pkg:composer/vladimir-yuldashev/creditpilot
Requires
- php: >=5.5.9
 - guzzlehttp/guzzle: 6.*
 
Requires (Dev)
- phpunit/phpunit: ^6
 
README
This is a library for CreditPilot service.
How to use (simple example)
require_once 'vendor/autoload.php';
use CreditPilot\ResultCode;
$gateway = new \CreditPilot\Gateway(
    'test_gateway_url',
    'login',
    'password',
    []
);
$response = $gateway->prepare(time(), '712698259', '9631234567', 100);
if($response->canPay()) {
	$response = $gateway->pay(time(), '712698259', '9631234567', 100);
	
	if($response->succeed()) {
	
		$billNumber = $response->billNumber();
		
		$response = $gateway->findPay($billNumber);
		
		echo ResultCode::message($response->resultCode())
	
	}
}
Unit tests (PHPUnit)
Will be provided soon. I promise.
Contribution
Feel free to make pull requests.