1. Go to this page and download the library: Download integrify/azericard 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/ */
integrify / azericard example snippets
use Integrify\Azericard\AzericardClient;
use Integrify\Azericard\AzericardConfig;
$client = new AzericardClient(AzericardConfig::fromEnvironment());
// Açarı fayldan deyil, birbaşa mətndən vermək də olar:
$config = new AzericardConfig(
merchantId: 'TERM0001',
privateKey: AzericardConfig::parsePrivateKey($pem),
transferKey: $sharedKey,
merchantName: 'MyShop',
merchantUrl: 'https://shop.az',
callbackUrl: 'https://shop.az/callback',
);
$form = $client->authorize(
amount: 10.5,
currency: '944', // AZN
order: '123456', // 6–32 rəqəm, gün ərzində unikal
description: 'Sifariş #123456',
);
echo $form->toHtml(); // özünü göndərən forma