PHPackages                             rak/simplify - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rak/simplify

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rak/simplify
============

Rak Simplify Laravel Package

17.6k↑60.7%[2 issues](https://github.com/ioticsme/rak-simplify/issues)PHP

Since May 10Pushed 5y ago3 watchersCompare

[ Source](https://github.com/ioticsme/rak-simplify)[ Packagist](https://packagist.org/packages/rak/simplify)[ RSS](/packages/rak-simplify/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

RAK - Simplify
==============

[](#rak---simplify)

Simplify payment gateway - Laravel Package
------------------------------------------

[](#simplify-payment-gateway---laravel-package)

And of course Dillinger itself is open source with a \[public repository\]\[dill\] on GitHub.

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

[](#installation)

```
composer require rak/simplify
```

Usage
-----

[](#usage)

#### Payment Auth/Capture

[](#payment-authcapture)

An authorization is very similar to a payment, except that instead of immediately exchanging money between you and your customer, you place a temporary hold on the customer's account and can then later capture an amount of less than or equal to the amount authorized, releasing the difference back to the customer. It may be important to create an authorization if a customer makes a purchase but there is a delay between acceptance of the customer's payment information and shipping of the item(s) purchased.

##### Authorizing a Payment

[](#authorizing-a-payment)

Here we will show how to authorize a card payment using a card token similar to the one you generated if you have been following the tutorial so far. Otherwise, [click here ](https://rakbank.simplify.com/commerce/docs/tutorial/index#payments-form) to learn about generating card tokens. To authorize a payment, you need to use a card token with the RAKBANK Simplify Authorization SDK to create the authorization.

Use the namespace of your installed package on your class:

```
use Rak\Simplify\Simplify;
```

After getting the card token create auth using below code:

```
Simplify::$publicKey = 'Your Public Key';
Simplify::$privateKey = 'Your Private Key';

try {
    $rakAuthCheck = Simplify::authorization(array(
        'reference' => 'IO-4521458', // Order reference
        'amount' => 1000, // 10 AED multiplied by 100
        'description' => 'payment description',
        'currency' => 'AED',
        'token' => 'cXsdf', // Card token you received
        'order' => [
            'source' => 'WEB',
            'customerEmail' => 'ebrahim@email.com',
            'customerName' => 'Ebrahim Nayakkan',
        ]
    ));

    if($rakAuthCheck){
        //Success call
        Log::info(print_r($rakAuthCheck, true)); // Printing reponse to your log file.
        return $rakAuthCheck;
    }
} catch(Exception $e) {
    // Failed call
    return [
        'auth_message' => $e->getMessage()
    ];
}
```

If you print the success reponse, it will be look like this:

```
(
    [card] => stdClass Object
        (
            [id] => XxR8XEz6z
            [name] => Ebrahim
            [type] => MASTERCARD
            [last4] => 8877
            [addressLine1] =>
            [addressCity] =>
            [addressState] =>
            [addressZip] =>
            [addressCountry] => AE
            [expMonth] => 5
            [expYear] => 21
            [dateCreated] => 1620273359426
            [cardEntryMode] => E_COMMERCE
            [indicator] => UNKNOWN
            [indicatorSource] => UNKNOWN
        )

    [amount] => 1000
    [amountRemaining] => 1000
    [currency] => AED
    [description] => payment description
    [captured] =>
    [reversed] =>
    [avsZipMatch] => 1
    [avsCvcMatch] => 1
    [avsAddressMatch] => 1
    [transactionData] => stdClass Object
        (
            [amount] => 1000
            [currency] => AED
            [description] => payment description
            [date] => 2021-05-06T03:56:04Z
            [order] => stdClass Object
                (
                    [reference] =>
                    [commodityCode] =>
                    [customer] => stdClass Object
                        (
                            [reference] =>
                        )
                )
        )
    [reference] => IO-4521458
    [authCode] => psBbAT
    [paymentStatus] => APPROVED
    [dateCreated] => 1620273364428
    [paymentDate] => 1620273364382
    [id] => a7R8aboL8
    [source] => HOSTED_PAYMENTS
    [expirationDate] => 1620878164237
    [expired] =>
    [capturedAmount] => 0
    [reversedAmount] => 0
)
```

##### Capturing an Authorization

[](#capturing-an-authorization)

Most of the time, creating an authorization will eventually be followed by capturing a payment. To capture a payment, use the same command as you normally would to create a payment, but instead of specifying a card token or card information, you will reference an authorization ID. Make sure that the capture currency is the same as the authorization currency and that the amount captured is equal to or less than the authorization amount.

```
Simplify::$publicKey = 'Your Public Key';
Simplify::$privateKey = 'Your Private Key';

try {
    $payment = Simplify::createPayment(array(
        'authorization' => 'a7R8aboL8', //Authorization ID you received in Authorizing
        'reference' => 'IO-4521458',
        'amount' => 1000, // 10 AED multiplied by 100
        'description' => 'payment description',
        'currency' => 'AED',
        'order' => [
            'source' => 'WEB',
            'status' => 'INCOMPLETE',
            'customerEmail' => 'ebrahim@email.com',
            'customerName' => 'Ebrahim Nayakkan',
        ]
    ));
    if ($payment->paymentStatus == 'APPROVED') {
        Log::info(print_r($payment, true)); // Printing reponse to your log file.
        return $payment;
    }
} catch (Exception $e) {
    return [
        'auth_message' => $e->getMessage(), // Capture Failed
    ];
}
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity32

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/23882a2488da72045a3f6d4891b22cd4681039889fa4bd34538ab5b15cc448f7?d=identicon)[ioticsme](/maintainers/ioticsme)

---

Top Contributors

[![ebrunkn](https://avatars.githubusercontent.com/u/5591960?v=4)](https://github.com/ebrunkn "ebrunkn (13 commits)")

### Embed Badge

![Health badge](/badges/rak-simplify/health.svg)

```
[![Health](https://phpackages.com/badges/rak-simplify/health.svg)](https://phpackages.com/packages/rak-simplify)
```

PHPackages © 2026

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