1. Go to this page and download the library: Download yogigr/payment-gateway 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/ */
yogigr / payment-gateway example snippets
use yogigr\PaymentGateway\Facades\PaymentGateway;
$methods = PaymentGateway::getPaymentMethodOptions();
use yogigr\PaymentGateway\Facades\PaymentGateway;
use Illuminate\Http\Request;
class CallbackController extends Controller
{
public function callback(Request $request)
{
$result = PaymentGateway::callback($request);
if ($result['resultCode'] === '00') { // success
// actions if success
}
}
}
use yogigr\PaymentGateway\Facades\PaymentGateway;
$transaction = PaymentGateway::checkTransaction($merchantOrderId);
dd($transaction);