PHP code example of zgabievi / laravel-bog-console
1. Go to this page and download the library: Download zgabievi/laravel-bog-console 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/ */
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setIdentifier('API_USERNAME') // optional - will be used from env
->setPassword('API_PASSWORD') // optional - will be used from env
->startSession();
}
}
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::finishSession();
// or
$response = BOGConsole::endSession();
// or
$response = BOGConsole::terminateSession();
}
}
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setIdentifier('API_USERNAME') // optional - will be used from env
->setPassword('CURRENT_API_PASSWORD') // optional - will be used from env
->setNewPassword('NEW_PASSWORD') //
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::extendSession();
// or
$response = BOGConsole::keepSessionAlive();
}
}
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setPassword('CURRENT_PASSWORD') // optional - will be used from env
->setNewPassword('NEW_PASSWORD') //
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\TransactionType;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setType(TransactionType::CardToCard) //
use Zorb\BOGConsole\Enums\ChartScale;
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\TransactionType;
use Zorb\BOGConsole\Enums\TransactionStatus;
class FakeController
{
public function __invoke()
{
$amount_response = BOGConsole::setType(TransactionType::CardToCard) // optional
->setScale(ChartScale::Week) // ->setScale(ChartScale::Week) // k) // d
->setStatus(TransactionStatus::Success) // optional
->setFrom(1581282000000) // optional
->setTo(1581886799999) // optional
->setMerchantId('KFH828HSH') // optional
->fullStatistics();
}
}
use Zorb\BOGConsole\Enums\SourceType;
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\TransactionType;
use Zorb\BOGConsole\Enums\TransactionStatus;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setType(TransactionType::CardToCard) // optional
->setStatus(TransactionStatus::Finished) // optional - you can specify multiple comma separated values
->setFrom(1581282000000) // optional
->setTo(1581886799999) // optional
->setRRN('29847529874') // optional
->setSourceType(SourceType::ApplePay) // optional - you can specify multiple comma separated values
->setSource('421653xxxxxx8430') // optional
->setDestination('421653xxxxxx8430') // optional
->setCurrency('GEL') // optional
->setToken('J2L4J5LKHJ2424LK34J234') // optional
->setMerchantId('KFH828HSH') // optional
->setMerchantTrx('LKJ24K5LJ356KJ34KLJ45LKJ345LK3') // optional
->setSourceId('ASLKDJ245KJ4JK345J4') // optional
->setRecurrent() // optional
->setSourceAddedToProfile() // optional
->setRegisteredSource() // optional
->transactionHistoryCount();
}
}
use Zorb\BOGConsole\Enums\SourceType;
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\OrderDirection;
use Zorb\BOGConsole\Enums\TransactionType;
use Zorb\BOGConsole\Enums\TransactionStatus;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setType(TransactionType::CardToCard) // optional
->setStatus(TransactionStatus::Finished) // optional - you can specify multiple comma separated values
->setFrom(1581282000000) // optional
->setTo(1581886799999) // optional
->setRRN('29847529874') // optional
->setSourceType(SourceType::ApplePay) // optional - you can specify multiple comma separated values
->setSource('421653xxxxxx8430') // optional
->setDestination('421653xxxxxx8430') // optional
->setCurrency('GEL') // optional
->setToken('J2L4J5LKHJ2424LK34J234') // optional
->setMerchantId('KFH828HSH') // optional
->setMerchantTrx('LKJ24K5LJ356KJ34KLJ45LKJ345LK3') // optional
->setSourceId('ASLKDJ245KJ4JK345J4') // optional
->setRecurrent() // optional
->setSourceAddedToProfile() // optional
->setRegisteredSource() // optional
->setOffset(5) // optional - 0 by default
->setLimit(30) // optional - 10 by default
->setOrderDirection(OrderDirection::Ascending) // optional - DESC by default
->transactionHistory();
}
}
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setToken('J2L4J5LKHJ2424LK34J234') //
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setToken('J2L4J5LKHJ2424LK34J234') // nse = BOGConsole::setToken('J2L4J5LKHJ2424LK34J234') //
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setToken('J2L4J5LKHJ2424LK34J234') // ->refund();
}
}
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\TransactionStatus;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setStatus(TransactionStatus::Finished) // optional - you can specify multiple comma separated values
->setFrom(1581282000000) // optional
->setTo(1581886799999) // optional
->setPAN('421653xxxxxx8430') // optional
->setToken('J2L4J5LKHJ2424LK34J234') // optional
->setMerchantId('KFH828HSH') // optional
->setMerchantTrx('LKJ24K5LJ356KJ34KLJ45LKJ345LK3') // optional
->setCardId('ASLKDJ245KJ4JK345J4') // optional
->cardVerificationCount();
}
}
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\OrderDirection;
use Zorb\BOGConsole\Enums\TransactionStatus;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setStatus(TransactionStatus::Finished) // optional - you can specify multiple comma separated values
->setFrom(1581282000000) // optional
->setTo(1581886799999) // optional
->setPAN('421653xxxxxx8430') // optional
->setToken('J2L4J5LKHJ2424LK34J234') // optional
->setMerchantId('KFH828HSH') // optional
->setMerchantTrx('LKJ24K5LJ356KJ34KLJ45LKJ345LK3') // optional
->setCardId('ASLKDJ245KJ4JK345J4') // optional
->setOffset(5) // optional - 0 by default
->setLimit(30) // optional - 10 by default
->setOrderDirection(OrderDirection::Ascending) // optional - DESC by default
->cardVerificationHistory();
}
}
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setToken('J2L4J5LKHJ2424LK34J234') //
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\TransactionStatus;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setStatus(TransactionStatus::Finished) // optional - you can specify multiple comma separated values
->setFrom(1581282000000) // optional
->setTo(1581886799999) // optional
->setPAN('421653xxxxxx8430') // optional
->setToken('J2L4J5LKHJ2424LK34J234') // optional
->setMerchantId('KFH828HSH') // optional
->setMerchantTrx('LKJ24K5LJ356KJ34KLJ45LKJ345LK3') // optional
->setCardId('ASLKDJ245KJ4JK345J4') // optional
->cardRegistrationCount();
}
}
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\OrderDirection;
use Zorb\BOGConsole\Enums\TransactionStatus;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setStatus(TransactionStatus::Finished) // optional - you can specify multiple comma separated values
->setFrom(1581282000000) // optional
->setTo(1581886799999) // optional
->setPAN('421653xxxxxx8430') // optional
->setToken('J2L4J5LKHJ2424LK34J234') // optional
->setMerchantId('KFH828HSH') // optional
->setMerchantTrx('LKJ24K5LJ356KJ34KLJ45LKJ345LK3') // optional
->setCardId('ASLKDJ245KJ4JK345J4') // optional
->setOffset(5) // optional - 0 by default
->setLimit(30) // optional - 10 by default
->setOrderDirection(OrderDirection::Ascending) // optional - DESC by default
->cardRegistrationHistory();
}
}
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setToken('J2L4J5LKHJ2424LK34J234') //
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setCardId('34234NNM234234') //
use Zorb\BOGConsole\Enums\CardStatus;
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setStatus(CardStatus::Verified) // optional
->setFrom(1581282000000) // optional
->setTo(1581886799999) // optional
->setPAN('421653xxxxxx8430') // optional
->setToken('J2L4J5LKHJ2424LK34J234') // optional
->setMerchantId('KFH828HSH') // optional
->cardCount();
}
}
use Zorb\BOGConsole\Enums\CardStatus;
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\OrderDirection;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setStatus(CardStatus::Verified) // optional
->setFrom(1581282000000) // optional
->setTo(1581886799999) // optional
->setPAN('421653xxxxxx8430') // optional
->setToken('J2L4J5LKHJ2424LK34J234') // optional
->setMerchantId('KFH828HSH') // optional
->setOffset(5) // optional - 0 by default
->setLimit(30) // optional - 10 by default
->setOrderDirection(OrderDirection::Ascending) // optional - DESC by default
->cardHistory();
}
}
use Zorb\BOGConsole\Facades\BOGConsole;
class FakeController
{
public function __invoke()
{
$response = BOGConsole::setCardId('34234NNM234234') //