PHP code example of arielmejiadev / pagalogt
1. Go to this page and download the library: Download arielmejiadev/pagalogt 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/ */
arielmejiadev / pagalogt example snippets
php artisan vendor:publish --tag=pagalogt-config
$payment = new PagaloGT();
return $payment->add(1, 'Test transaction', 100.00)
->setClient('John', 'Doe', '[email protected] ')
->withTestCard('John Doe')
->withTestCredentials()
->pay();
return PagaloGT::add(1, 'Test transaction', 100.00)
->setClient('John', 'Doe', '[email protected] ')
->withTestCard('John Doe')
->withTestCredentials()
->pay();
return PagaloGT->add(1, 'Test transaction', 100.00)
->setClient('John', 'Doe', '[email protected] ')
->setCard('JOHN JOSEPH DOE DULLIE', 'XXXX XXXX XXXX XXXX', 12, 2022, 742)
->pay();
$response['decision'] === 'ACCEPT';
$response['reasonCode'] === 100;
use \ArielMejiaDev\PagaloGT\PagaloGT;
// ...
$response = PagaloGT::add(1, 'Test transaction from Laravel 5.5', 100.00)
->setClient('John', 'Doe', '[email protected] ')
->withTestCard('John Doe')
->withTestCredentials()
->pay();
if($response['decision'] === PagaloGT::APPROVE_DECISION &&
$response['reasonCode'] === PagaloGT::APPROVE_REASON_CODE ) {
// do something
}
$response = PagaloGT::add(1, 'product', 100.00)->withTestCard()->withTestCredentials()->pay();
if($response->successful()) {
// do something
}
$response->fail();
$response->successful();
$response->ok()
$response->header('single header');
$response->headers();