Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/md-aamroni/aamarpay
AamarPay API Payment in Laravel
https://github.com/md-aamroni/aamarpay
aamarpay aamarpay-payment-gateway payment-gateway
Last synced: 9 days ago
JSON representation
AamarPay API Payment in Laravel
- Host: GitHub
- URL: https://github.com/md-aamroni/aamarpay
- Owner: md-aamroni
- License: mit
- Created: 2024-04-01T20:24:42.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-04-02T04:15:03.000Z (8 months ago)
- Last Synced: 2024-04-03T05:17:41.495Z (8 months ago)
- Topics: aamarpay, aamarpay-payment-gateway, payment-gateway
- Language: PHP
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
### Composer Install
```shell
composer require aamroni/aamarpay
```### Publish Config
```shell
php artisan vendor:publish --tag=aamroni-aamarpay
```### Usage Example
```php
use Aamroni\Aamarpay\AamarpayPaymentManager;
use Aamroni\Aamarpay\Entities\CustomerPayload;
use Aamroni\Aamarpay\Entities\PurchasePayload;
use Aamroni\Aamarpay\Facades\Aamarpay;// @step01: Create a customer instance
$customer = CustomerPayload::instance(
name: 'Kabir Khan',
email: '[email protected]',
phone: '+8801645770422',
street1: 'House B-158 Road 22',
street2: 'Baridhara DOHS',
city: 'Dhaka',
state: 'Dhaka',
country: 'Bangladesh'
);// @step02: Create a products instance
$purchase = PurchasePayload::instance(
invoice: 'INV-00001',
amount: 10.0,
detail: 'Something about service or product'
);// @step03: Process the checkout
$response = Aamarpay::checkout(purchase: $purchase, customer: $customer);
// or using facade
$response = AamarpayPaymentManager::instance()->checkout(purchase: $purchase, customer: $customer);dd($response);
```