PHPackages                             maree/alrajhibank-payments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. maree/alrajhibank-payments

ActiveLibrary

maree/alrajhibank-payments
==========================

package to integrate with alrajhai bank payment api باكدج للربط مع خدمات الدفع الالكتروني مع بنك الرجحي السعودي

218PHP

Since Apr 20Pushed 4y ago2 watchersCompare

[ Source](https://github.com/mohamedmaree/alrajhibank-payments)[ Packagist](https://packagist.org/packages/maree/alrajhibank-payments)[ RSS](/packages/maree-alrajhibank-payments/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

AlrajhiBank
===========

[](#alrajhibank)

Installation
------------

[](#installation)

You can install the package via [Composer](https://getcomposer.org).

```
composer require maree/alrajhibank-payments
```

Publish your alrajhibank config file with

```
php artisan vendor:publish --provider="maree\alrajhibankPayments\AlrajhibankServiceProvider" --tag="alrajhiBank"
```

then change your AlrajhiBank config from config/alrajhiBank.php file

```
    "id"             => "" ,
    "password"       => "" ,
    "currencyCode"   => "682",//SAR => 682
    "encryption_key" =>  "",
```

Usage
-----

[](#usage)

first step
----------

[](#first-step)

```
use maree\alrajhibankPayments\AlrajhiBank;
$response = AlrajhiBank::checkout($amount = 0.0,$responseURL='',$errorURL='');
```

note
----

[](#note)

- this function return \['key' =&gt; 'success' ,'checkoutId' =&gt; $payment\_id , 'responseData' =&gt; $responseData\] //key = success or fail
- use checkoutId to save transaction in database
- use checkoutId in view page in next step

second step
-----------

[](#second-step)

- return view page with $checkoutId to show payment proccess

```

```

note
----

[](#note-1)

- create route for response url 'show-response-route' EX: Route::get('show-response-route', 'PaymentsController@paymentresponse')-&gt;name('show-response-route');
- create route for error response url 'show-response-error' EX: Route::get('show-response-error', 'PaymentsController@paymentresponseError')-&gt;name('show-response-error');
- create function for checkout response 'paymentresponse' and error 'paymentresponseError'
- use that function to check if payment failed or success

inside 'paymentresponse' and 'paymentresponseError' functions use:
------------------------------------------------------------------

[](#inside-paymentresponse-and-paymentresponseerror-functions-use)

```
use maree\alrajhibankPayments\AlrajhiBank;

//trandata = $request->trandata
$response = AlrajhiBank::checkoutResponseStatus($trandata);
```

return response like:

```
['key' => 'success' , 'responseData' => $responseData];
```

or

```
 ['key' => 'fail', 'responseData' => $responseData];
```

note: you can use response from data to save transactions in database

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e88e6da55b1e4b359544c3e94fab80c6f73b3ce7ac82afd1d872a41aeb349fa?d=identicon)[mohamedmaree](/maintainers/mohamedmaree)

---

Top Contributors

[![mohamedmaree](https://avatars.githubusercontent.com/u/12659069?v=4)](https://github.com/mohamedmaree "mohamedmaree (6 commits)")

### Embed Badge

![Health badge](/badges/maree-alrajhibank-payments/health.svg)

```
[![Health](https://phpackages.com/badges/maree-alrajhibank-payments/health.svg)](https://phpackages.com/packages/maree-alrajhibank-payments)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
