Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mfrouh/arjbank
Package Payment Gateway With Alrajhi Bank with laravel
https://github.com/mfrouh/arjbank
Last synced: about 1 month ago
JSON representation
Package Payment Gateway With Alrajhi Bank with laravel
- Host: GitHub
- URL: https://github.com/mfrouh/arjbank
- Owner: mfrouh
- Created: 2022-08-14T20:10:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-02T06:35:09.000Z (about 1 year ago)
- Last Synced: 2024-08-09T02:35:58.733Z (5 months ago)
- Language: PHP
- Size: 29.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# arjbank Package
#### Package Payment Gateway With Alrajhi Bank with laravel
#
```bash
composer require mfrouh/arjbank
```## Package have 2 method payment
1- Bank Hosted
2- Merchant
#
1- Bank Hosted
```php
use MFrouh\ArjBank\Facades\ArjBank;
$optional_data = [
"udf1" => null,
"udf2" => null,
"udf3" => null,
"udf4" => null,
"udf5" => null,
];ArjBank::bankHostedPayment($amount, 'response-url', 'error-url' , $optional_data);
```
## In Bank Hosted Response Will be
> Success : ["status" => '1', "url" => $url];
#
### Using Url In
```html
```
#
> Fail : ["status" => '2', "message" => $errorMessage];
#
2- Merchant
```php
use MFrouh\ArjBank\Facades\ArjBank;
$card_details = [
"expYear" => (string) '20'.request('expiry_year'),
"expMonth" => (string) request('expiry_month'),
"member" => (string) request('card_holder'),
"cvv2" => (string) request('cvv'),
"cardNo" => (string) request('card_number'),
"cardType" => "C",
];$optional_data = [
"udf1" => null,
"udf2" => null,
"udf3" => null,
"udf4" => null,
"udf5" => null,
];ArjBank::merchantPayment($card_details , $amount, 'response-url', 'error-url', $optional_data);
```
#
## In Merchant Response Will be
#
> Success : ["status" => '1', "url" => $url];
### Using Url In Redirect To Alrajhi Bank Page For Otp
#
> Fail : ["status" => '2', "message" => $errorMessage];
#
## Get Result From trandata from Response Url
```php
use MFrouh\ArjBank\Facades\ArjBank;
ArjBank::result($trandata);
```
## Response In result method Will Be
#
> Success : ["status" => '1', 'data' => $data];
#
> Fail : ["status" => '2', 'data' => $data];
#
## .env File
```env
ARJ_MODE="live" // or "test"
ARJ_TRANPORTAL_ID=""
ARJ_TRANPORTAL_PASSWORD=""
ARJ_RESOURCE_KEY=""
ARJ_CURRENCY_CODE="682"
```