yahrdy/aamarpay

Laravel package for aamarpay payment gateway
2,187
Install
composer require yahrdy/aamarpay
PHP:^8.1
License:MIT
Last Updated:Oct 9, 2023
Links: GitHub  ·  Packagist
Maintainer: hridoy

Laravel package for aamarpay payment gateway

Laravel aamarpay is a laravel package for aamarpay payment gateway.

Installation

You can install the package via composer:

composer require yahrdy/aamarpay

You can publish the config file with:

php artisan vendor:publish --tag="aamarpay-config"

This is the contents of the published config file:

return [
    'url' => env('AAMARPAY_SERVER_URL', 'https://sandbox.aamarpay.com/request.php'),
    'verify_url' => env('AAMARPAY_VERIFY_URL', 'https://sandbox.aamarpay.com/api/v1/trxcheck/request.php'),
    'store_id' => env('AAMARPAY_STORE_ID', 'aamarpaytest'),
    'signature_key' => env('AAMARPAY_SIGNATURE_KEY', 'dbb74894e82415a2f7ff0ec3a97e4183'),
    'success_url' => env('AAMARPAY_SUCCESS_URL', 'http://localhost:8000/api/verify'),
    'cancel_url' => env('AAMARPAY_CANCEL_URL', 'http://localhost:8000/api/verify'),
    'fail_url' => env('AAMARPAY_FAIL_URL', 'http://localhost:8000/api/verify'),
];

Usage

// Use the facade to initiate a payment, it will return a redirect url
public function checkout(){
        return Aamarpay::checkout($amount, $name, $address, $phone, $value1 = null, $value2 = null, $value3 = null, $value4 = null);
    }

// To verify the payment, keep the redirect post parameter in the request
// This will return a json response with the payment information
public function verify(Request $request){
        return Aamarpay::verify($request);
    }

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

shipu/php-aamarpay-payment

PHP client for Aamarpay Payment Gateway API

16,014 32
yahrdy/shurjopay

ShurjoPay payment gateway for laravel

2,189 0
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441