1. Go to this page and download the library: Download vlsv/sberbank-api 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/ */
vlsv / sberbank-api example snippets
use Vlsv\SberBankApi\CallbackNotification;
ый от платежного шлюза
$payload = $_GET;
try {
$order = new CallbackNotification($payload);
} catch (\UnexpectedValueException $e) {
exit($e->getMessage());
}
if ($order->isDeposited()) {
echo 'Проведена полная авторизация суммы заказа ' . $order->getOrderNumber();
}
if ($order->isRefunded()) {
echo 'По заказу ' . $order->getOrderNumber() . ' была проведена операция возврата ';
}
$symmetric_private_key = 'symmetric private key';
if ($order->isSymmetricKeyValidationSuccessful($symmetric_private_key)) {
echo 'Подлинность данных подтверждена';
}
$asymmetric_public_key = 'asymmetric public key';
if ($order->isAsymmetricKeyValidationSuccessful($asymmetric_public_key)) {
echo 'Подлинность данных подтверждена';
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.