include('Pos.php') // For Pure PHP (You have to download the files first)
Candy::plugin('EmreRed/POS-PHP-Client'); // For Candy PHP (No processing needed, you can use it directly. 😉)
🍭 Check out CandyPHP!
$akbank = Pos::bank('akbank');
$akbank->config(['clientid' => "100000000",
'name' => "username",
'password' => "password",
'key' => "key"]);
$akbank->test(); // Turns on test mode
$akbank->test(false); // Turns off test mode
$order = [
'id' => 1,
'amount' => 100,
'url' => [
'ok' => 'https://www.example.com/success',
'fail' => 'https://www.example.com/fail',
],
'card' => [
'number' => 5000000000000000,
'cvv' => 123,
'year' => '2022',
'month' => '04'
]
];
$akbank->pay3d($order); // Returns form data
$akbank->form($order); // Prints the payment form