Hesabe Payment Package allows you to use the Payment API to accept payments in Kuwait
Hesabe Payment Package is a PHP package designed to integrate Hesabe Payment Gateway in your application in the easiest way possible.
Get in touch with Hesabe Support to get credentials in order to use this package.
- Minimum PHP 7.0+ required
- Composer installed globally
Run the following command in the root of your PHP project:
composer require hesabe/payment
Paymentclass in the file you want to use this package.
Paymentclass. You need to pass the credentials in the class parameters.
$hesabe = new Payment( __SECRET_KEY__, __IV_KEY__, __ACCESS_CODE__, true );
The last parameter is a boolean which indicates on which environment are you on.
By default, the value will be
Hesabeby passing the request parameters in an array. It will redirect you to the Hesabe Payment Page.
$hesabe->checkout([ "merchantCode" => __MERCHANT_CODE__, "amount" => "1", "paymentType" => "0", "responseUrl" => "http://yourlink.com", "failureUrl" => "http://yourlink.com", "orderReferenceNumber" => "", "variable1" => null, "variable2" => null, "variable3" => null, "variable4" => null, "variable5" => null, "version" => "2.0", ]);
These are the basic parameters which are passed to initiate a transaction, for more information about these parameters you may have a look here.
The MIT License (MIT). See the License File for more information.