PHPackages                             laraditz/payex - 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. [Payment Processing](/categories/payments)
4. /
5. laraditz/payex

ActiveLibrary[Payment Processing](/categories/payments)

laraditz/payex
==============

Simple laravel package for Payex Payment Gateway.

1.1.0(2y ago)1382MITPHPPHP ^8.0

Since May 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/laraditz/payex)[ Packagist](https://packagist.org/packages/laraditz/payex)[ Docs](https://github.com/laraditz/payex)[ RSS](/packages/laraditz-payex/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (5)Used By (0)

Laravel Payex
=============

[](#laravel-payex)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0c76fdfbc726fa4eb98b4b6affdd6b0d6b54b39d0d37ed586918cef1d7bac8fa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6172616469747a2f70617965782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laraditz/payex)[![Total Downloads](https://camo.githubusercontent.com/b24a6f4e3289bf593ccfbf13eaf7224432d9367c01ab9c53f4500b92809f9b11/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6172616469747a2f70617965782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laraditz/payex)[![GitHub Actions](https://github.com/laraditz/payex/actions/workflows/main.yml/badge.svg)](https://github.com/laraditz/payex/actions/workflows/main.yml/badge.svg)

A simple laravel package for Payex Payment Gateway.

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

[](#installation)

You can install the package via composer:

```
composer require laraditz/payex
```

Before Start
------------

[](#before-start)

Configure your variables in your `.env` (recommended) or you can publish the config file and change it there.

```
PAYEX_EMAIL=
PAYEX_KEY=
PAYEX_SECRET=
PAYEX_SANDBOX_MODE=true # true or false for sandbox mode

```

(Optional) You can publish the config file via this command:

```
php artisan vendor:publish --provider="Laraditz\Payex\PayexServiceProvider" --tag="config"
```

Run the migration command to create the necessary database table.

```
php artisan migrate
```

Available Methods
-----------------

[](#available-methods)

Below are all methods available under this package.

- `createPayment(array $requestPayload)` - Create payment intent.
- `getTransactions(array $params)` - Get all transactions.
- `getTransaction(string $id)` - Get specific transaction by `txn_id`.

Usage
-----

[](#usage)

### Create Payment

[](#create-payment)

To create payment and get the payment URL to be redirected to. You can use service container or facade.

```
// Create a payment

// Using service container
$payex = app('payex')->createPayment([
            'amount' => '100', //in cents
            'customer_name' => 'Farhan',
            'description' => 'some description here',
            'return_url' => 'https://yourreturn.url'
        ]);

// Using facade
$payment = \Payex::createPayment([
            'amount' => '100', //in cents
            'customer_name' => 'Farhan',
            'description' => 'some description here',
            'return_url' => 'https://yourreturn.url'
        ]);
```

Return example:

```
[
    "status" => true,
    "id" => "991f24s0-5470-41c5-9b3c-9841d72d32e5",
    "ref_no" => "Xvs9k43y",
    "currency_code" => "MYR",
    "key" => "f5e3168fef3b5ed7826c689a37dce58e",
    "payment_url" => "https://api.payex.io/Payment/Form/f5e3168fef3b5ed7826c689a37dce58e"
]
```

Redirect to the `payment_url` to proceed to Payex payment page. Once done, you will be redirected to the `return_url`. Below is the sample response returned.

```
{
  "amount": "1",
  "currency": "MYR",
  "customer_name": "Farhan",
  "description": "some description here",
  "reference_number": "Xvs9k43y",
  "mandate_reference_number": null,
  "payment_intent": "f5e3168fef3b5ed7826c689a37dce58e",
  "collection_id": "zg3RcR5y",
  "invoice_id": null,
  "txn_id": "PX1068201c1315547307",
  "external_txn_id": "20230502211212840110171535215420691",
  "response": "SUCCESS",
  "auth_code": "00",
  "auth_number": null,
  "txn_date": "20230502075957",
  "fpx_mode": null,
  "fpx_buyer_name": null,
  "fpx_buyer_bank_id": null,
  "fpx_buyer_bank_name": null,
  "card_holder_name": null,
  "card_number": null,
  "card_expiry": null,
  "card_brand": "N.A.",
  "card_issuer": null,
  "card_on_file": null,
  "signature": "bcd39079a409751ebb4c64c1f8acc53cd0439896a731a513b6753e9f909d6a08a79a04cd5a9cf8d6d27d93206dfa35074ee607e790e242ee547407fa5af9f05a",
  "txn_type": "Touch 'n Go eWallet",
  "nonce": "eMygaAdk3cryXM5DSLoidNIQrwhW7b0wCmQ6CG0B6z5VNeBbm8yXhLjAPQcXL0WL",
  "metadata": "{}"
}
```

Event
-----

[](#event)

This package also provide some events to allow your application to listen to it. You can create your listener and register it under event below.

EventDescriptionLaraditz\\Payex\\Events\\CallbackReceivedReceived backend response from Payex for a payment. Can use to update your payment status and other details### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Raditz Farhan](https://github.com/laraditz)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~130 days

Total

3

Last Release

844d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1203676?v=4)[Raditz Farhan](/maintainers/raditzfarhan)[@raditzfarhan](https://github.com/raditzfarhan)

---

Top Contributors

[![raditzfarhan](https://avatars.githubusercontent.com/u/1203676?v=4)](https://github.com/raditzfarhan "raditzfarhan (18 commits)")

---

Tags

laraditzpayex

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laraditz-payex/health.svg)

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

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[payum/payum-laravel-package

Rich payment solutions for Laravel framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more

12342.5k](/packages/payum-payum-laravel-package)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[recca0120/laravel-payum

Rich payment solutions for Laravel framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more

741.5k](/packages/recca0120-laravel-payum)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[asciisd/knet

Knet package is provides an expressive, fluent interface to KNet's payment services.

141.1k](/packages/asciisd-knet)

PHPackages © 2026

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