API Reference

🚧

Invalid Store ID

This error occurs when the values of the store_id and signature_key fields are correct, but the URL used for the transaction is incorrect.

For sandbox mode, you must use this base URL https://sandbox.aamarpay.com along with the provided test credentials.

On the other hand, for live transactions, you need to use this base URL https://secure.aamarpay.com along with the correct live credentials.

🚧

Session Log Out Error in Laravel

The error is related to the 'same_site' and 'secure' options in the 'session.php' configuration file.

file path = "app\Http\Config\session.php"

  1. Change 'secure' => env('SESSION_SECURE_COOKIE'), to 'secure' => true;
  2. Change 'same_site' => 'lax', to 'same_site' => 'none';

🚧

CSRF Token Error / 419

In Laravel, you can handle CSRF Token Errors (status code 419) by customizing the "VerifyCsrfToken middleware", which is located in the ''app/Http/Middleware/VerifyCsrfToken.php" file. To address this error, you need to declare the success, fail, and cancel URLs in the middleware.

use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;

class VerifyCsrfToken extends Middleware
{
    protected $except_urls = [
        'your/success_url',
        'your/fail_url',
        'your/cancel_url',
    ];
   
}

📘

If you encounter any issues during the integration process, please reach out to Integration support team for assistance.