PHP code example of fitnesshouse / payment-manager
1. Go to this page and download the library: Download fitnesshouse/payment-manager 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 \Fh\PaymentManager\Facades\Payment;
// Платежная система по умолчанию
$system = Payment::system();
// Платежная система не установленная по умолчанию
$system = Payment::system('pscb');
// Создать запрос и перенаправить клиента в платежную систему для оплаты
$query = $system->createQuery(function (QueryBuilder $builder) {
$builder->orderId('TEST_123');
$builder->amount(100.00);
// ... Другие параметры запроса
});
redirect($query->getPayUrl())
// Запросить параметры платежа
$request = $system->requestHandler()->create('checkPayment', ['orderId' => 'TEST_123'])
$response = $request->send();