PHP code example of thejano / areeba-payment-laravel
1. Go to this page and download the library: Download thejano/areeba-payment-laravel 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 TheJano\AreebaPayment\Facades\AreebaPayment;
$checkResponse = AreebaPayment::checkPaymentStatus('TXN123456');
use TheJano\AreebaPayment\Services\AreebaMpgsPayment;
$paymentData = AreebaMpgsPayment::make()->initiatePayment('ORDER-123', '100.00', 'John Doe');
// $paymentData->purchaseId → MPGS session id (use it with checkout.js)
// $paymentData->redirectUrl → hosted-checkout URL (use it for a plain redirect flow)
return redirect($paymentData->redirectUrl);
use TheJano\AreebaPayment\Facades\AreebaMpgsPayment;
$paymentData = AreebaMpgsPayment::initiatePayment('ORDER-123', '100.00', 'John Doe');