1. Go to this page and download the library: Download pagomio/pagomio-sdk-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pagomio / pagomio-sdk-php example snippets
Requests::register_autoloader();
$pagomio = new Pagomio\Pagomio('client_id','secret_id',true);
//Customer information - Not Data();
$userData->names = 'Name User';
$userData->lastNames = 'Last name User';
$userData->identificationType = 'CC'; # Allow: CC, TI, PT, NIT
$userData->identification = '123456789';
$userData->email = '[email protected]';
$userData->phone = '1234567';
// Payment information - Is - Is >userData = $userData;
// Generate the token
$response = $pagomio->getToken($aut);
// Redirect to Pagomio.com
if($response->success) {
header("Location: " . $response->url);
}
// response.php
$pagomio = new Pagomio\Pagomio('client_id','secret_id',true);
$request = $pagomio->getRequestPayment();
switch ($request->status) {
case Pagomio\Pagomio::TRANSACTION_SUCCESS:
// ...
break;
case Pagomio\Pagomio::TRANSACTION_ERROR:
// ...
break;
case Pagomio\Pagomio::TRANSACTION_PENDING:
// ...
break;
}
javascript
{
"agomio-sdk-php" : "dev-master"
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.