PHPackages                             cuonghuynh/easypay2-laravel-5 - 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. cuonghuynh/easypay2-laravel-5

ActiveLibrary[Payment Processing](/categories/payments)

cuonghuynh/easypay2-laravel-5
=============================

Easypay2 Gateway

v1.0.0(9y ago)338MITPHP &gt;=5.4.0

Since Jul 3Compare

[ Source](https://github.com/cuonghuynh/easypay2-laravel-5)[ Packagist](https://packagist.org/packages/cuonghuynh/easypay2-laravel-5)[ RSS](/packages/cuonghuynh-easypay2-laravel-5/feed)WikiDiscussions Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

EasyPay V.2 Payment for Laravel 5
=================================

[](#easypay-v2-payment-for-laravel-5)

Laravel
-------

[](#laravel)

After updating composer, add the PackageServiceProvider to the providers array in `config/app.php`

```
CuongHuynh\EasyPay2\PackageServiceProvider::class,

```

You can optionally use the facade for shorter code. Add this to your facades:

```
'EasyPay2' => CuongHuynh\EasyPay2\Facades\EasyPay2Facade::class

```

Publish the config-file.

```
php artisan vendor:publish

```

You will have `easypay2.php` in config folder

Usage
-----

[](#usage)

### EasyPay Flow

[](#easypay-flow)

[![workshop image](https://camo.githubusercontent.com/88e9a1ebe1fa4705260ba13e63b88457b8d6662b6611081e88dadac26816f764/68747470733a2f2f6c68342e676f6f676c6575736572636f6e74656e742e636f6d2f2d4d47587858487a596252512f56336b6342344a50666b492f414141414141414161556f2f70643565356575394a6155346e524c4a2d36427a4b435a62425457334b76786177434c30422f773738382d683534382d6e6f2f4561737950617932466c6f772e706e67)](https://camo.githubusercontent.com/88e9a1ebe1fa4705260ba13e63b88457b8d6662b6611081e88dadac26816f764/68747470733a2f2f6c68342e676f6f676c6575736572636f6e74656e742e636f6d2f2d4d47587858487a596252512f56336b6342344a50666b492f414141414141414161556f2f70643565356575394a6155346e524c4a2d36427a4b435a62425457334b76786177434c30422f773738382d683534382d6e6f2f4561737950617932466c6f772e706e67)

### Settings

[](#settings)

Switch to `sandbox` mode by set to `true` in `config/easypay2.php`

```
return [
    'sandbox_flag' => true,

    'sandbox' => [
        'endpoint' => 'https://test.wirecard.com.sg/easypay2/paymentpage.do?',
        'mid' => 'xxx',
        'security_key' => 'xxx',
        'security_seq' => 'xxx',
    ],

    'live' => [
        'endpoint' => 'url',
        'mid' => 'xxx',
        'security_key' => 'xxx',
        'security_seq' => 'xxx',
    ]
];

```

- *endpoint*: The URL to receive transaction requests.
- *mid*: Merchant ID generated by WireCard.
- *security\_key*: Security parameters.
- *security\_seq*: Order to make hashed string, for example: `amt,ref,cur,mid,transtype`

### Make a Transaction

[](#make-a-transaction)

Set URL to receive payment status and return after customer make payment.

```
EasyPay2::set('statusurl', URL);
EasyPay2::set('returnurl', URL);

```

Set other payment parameters

- *Transaction type*, use EPTransactionType class contains types

    ```
     EasyPay2::set('transtype', EPTransactionType::SALE);

    ```
- *Skip status page*, that mean EasyPay will don't return status to Merchant website. Don't recommended.

    ```
     EasyPay2::set('skipstatuspage', 'N');

    ```
- *Reference ID* is unique value on a transaction. You can use helper in this package to create RefId.

    ```
     EasyPay2::set('ref', EPHelper::uniqueStringRandom());

    ```
- *Total amount* to pay

    ```
     EasyPay2::set('amt', #.##);

    ```
- Finally, call the method to make request URL with number of munites for validity period

    ```
     EasyPay2::makeTransaction(15);
     $requestUrl = EasyPay2::requestUrl();

    ```

### Send Transaction

[](#send-transaction)

Use a Laravel helper to redirect customer to Payment page

```
return redirect($requestUrl);

```

### Receive Payment status

[](#receive-payment-status)

This process totally in backend, customer can't see Status response. After customer do payment, EasyPay will send a **POST** request to *statusurl* with parameters ([see workflow image](#workflow-image)).

In your controller, get all inputs

```
public function postEasyPayStatusResponse(Request $request)
{
     $response = $request->all();

    //...

```

- Check `TM_Signature` value in response is valid, formula is `hashed string from security sequence + status + error + security key`

*For example, now security seq is `amt,ref,cur,mid,transtype` so full formula is*

```
$mdHashed : hash512($amt, $ref, $cur, $mid, $transtype) . $status . $error . $security_key
$epSignature : get('TM_Signature')

```

Implement, cause Easypay make a new request so we need regenerate values for EasyPay instance. Upon security seq you will set parameters needed for the instance. In the case:

```
$status = $this->request->get('TM_Status');
$error = $this->request->get('TM_Error');
$security_key = EasyPay2::get('security_key');

EasyPay2::set('amt', $amtOfOldRefId);
EasyPay2::set('ref', $oldRefId);
EasyPay2::set('cur', $currencyOfOldRefId);
EasyPay2::set('transtype', $transtypeOfOldRefId);

$data = EasyPay2::getHashDataFromSecuritySeq() . $status . $error . $security_key;

$mdHashed = EPHelper::hashSha512($data);
$signature = $this->request->get('TM_Signature');

```

Check if `$mdHashed` is same `$signature`, the request is valid and make other steps.

### Send Acknowledge Response

[](#send-acknowledge-response)

After check signature in status response, Merchant must to send ACK to EasyPay to confirm receiving request.

```
EasyPay2::set('ack', 'YES');
$requestUrl = EasyPay2::requestUrl();

```

### Send REVERSAL / VOID request if don't receive status response

[](#send-reversal--void-request-if-dont-receive-status-response)

> Content updating ...

License
-------

[](#license)

This EasyPay2 for Laravel 5 is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3649d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3349033?v=4)[Cuong Huynh](/maintainers/cuonghuynh)[@cuonghuynh](https://github.com/cuonghuynh)

---

Tags

paymenteasypay

### Embed Badge

![Health badge](/badges/cuonghuynh-easypay2-laravel-5/health.svg)

```
[![Health](https://phpackages.com/badges/cuonghuynh-easypay2-laravel-5/health.svg)](https://phpackages.com/packages/cuonghuynh-easypay2-laravel-5)
```

###  Alternatives

[shetabit/payment

Laravel Payment Gateway Integration Package

944336.8k5](/packages/shetabit-payment)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4849.3k](/packages/sebdesign-laravel-viva-payments)[021/laravel-wallet

Reliable and flexible wallet system for Laravel

2775.8k](/packages/021-laravel-wallet)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)[first-iraqi-bank/fib-laravel-payment-sdk

Laravel SDK for integrating with the FIB payment system, enabling user authentication and payment transactions.

102.4k](/packages/first-iraqi-bank-fib-laravel-payment-sdk)

PHPackages © 2026

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