1. Go to this page and download the library: Download sportakal/garantipos 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/ */
sportakal / garantipos example snippets
use Sportakal\Garantipos\Models\Options;
$options = new Options();
$options->setMode($_ENV['MODE']);
$options->setApiVersion($_ENV['API_VERSION']);
$options->setTerminalId($_ENV['TERMINAL_ID']);
$options->setTerminalProvUserId($_ENV['TERMINAL_PROV_USER_ID_PAY']);
$options->setTerminalProvUserPassword($_ENV['TERMINAL_PROV_USER_PASSWORD']);
$options->setTerminalUserId($_ENV['TERMINAL_USER_ID']);
$options->setTerminalMerchantId($_ENV['TERMINAL_MERCHANT_ID']);
$options->setStoreKey($_ENV['STORE_KEY']);
$card = new Card();
$card->setNumber('5549608789641500');
$card->setExpireDate('0323');
$card->setCVV2('712');
$customer = new Customer();
$customer->setIpAddress('159.146.45.34');
$customer->setEmailAddress('[email protected]');
$order = new Order();
$order->setOrderID('sportakal_garantipos_' . time());
$address = new Address();
$address->setType('B'); // B for 'billing' or S for 'shipping'
$address->setName('Sinan');
$address->setLastName('Portakal');
$address->setPhoneNumber('+90 532 345 67 89');
$address->setText('Kınıklı Mah.');
$address->setDistrict('Pamukkale');
$address->setCity('Denizli');
$address->setCountry('Turkey');