PHPackages                             lamtd/vnpt-epay - 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. lamtd/vnpt-epay

ActiveLibrary

lamtd/vnpt-epay
===============

Dùng tích hợp cổng thanh toán VNPT EPAY

065PHP

Since Nov 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/lamtd/vnpt-epay)[ Packagist](https://packagist.org/packages/lamtd/vnpt-epay)[ RSS](/packages/lamtd-vnpt-epay/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

 [ ![](https://avatars0.githubusercontent.com/u/958072) ](https://github.com/laravel)

VNPT EPay
=========

[](#vnpt-epay)

 [![Latest version](https://camo.githubusercontent.com/359539f1772a1af7b5764e38602832b93f6e778df6ac3fe327aed1199f589eba/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c616d74642f766e70742d65706179)](https://github.com/lamtd/vnpt-epay/) [![Latest version](https://camo.githubusercontent.com/99ddd7cfa26c4542b6ffe168d7565ec8df1c42aedb03b86b3a50fd633a6a7707/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c616d74642f766e70742d65706179)](https://github.com/lamtd/vnpt-epay/)

Miêu tả
=======

[](#miêu--tả)

Tạo cổng thanh toán VNPT. Thư viện dùng để bổ sung cổng thanh toán VNPT Epay từ bộ thanh toán Omnipay

Cài đặt
-------

[](#cài-đặt)

Cài đặt VNPT Epay thông qua [Composer](https://getcomposer.org):

```
composer require lamtd/vnpt-epay
```

Sau khi cài đặt xong bạn cần phải publish config file để thiết lập thông số cho cổng thanh toán bạn cần tích hợp, publish thông qua câu lệnh:

```
php artisan vendor:publish --provider="PHPViet\Laravel\Omnipay\OmnipayServiceProvider" --tag="config"
php artisan vendor:publish --provider="Lamtd\VNPTEpay\VNPTEpayServiceProvider"
```

Thêm vào cuối file config/laravel-omnipay.php

```
'VnptEpay' => [
            'driver' => 'VnptEpay',
            'options' => [
                'merId' => '',
                'EncodeKey' => '',
                'VNPTDomain' => 'https://sandbox.megapay.vn:2810', //Domain test
                'CANCEL_PASSWORD' => '',
                'KEY3DES_ENCRYPT' => '',
                'KEY3DES_DECRYPT' => '',
            ],
        ],
```

Sử dụng
=======

[](#sử-dụng)

Load class:

```
use Lamtd\VNPTEpay\Facade\Gateway as VNPTEpay;
```

Gọi ở function:

```
return VNPTEpay::purchase([
            'amount' => $request -> input('goodsAmount'),
            'userFee' => $request -> input('userFee'),
            'userId' => $request -> input('userId'),
            'callBackUrl' => route('vnpt-epay-success'),
            'notiUrl' => '' //khi test local không dùng link ipn được
        ]) -> send();;
```

Listen từ vnpt:

```
$response = VNPTEpay::notification()->send();
```

Bạn có thể xem demo ở

```
vendor/lamtd/vnpt-epay/src/laravel/TestVNPTEpaytController.php
```

Khi chạy thực tế, vì vnpt sử dụng POST JSON nên cần thay đổi listener:

```
$response = VNPTEpay::notificationJSON()->send();
```

Demo:
=====

[](#demo)

```
truy cập theo path /vnpt-epay-demo
```

Dành cho nhà phát triển
-----------------------

[](#dành-cho-nhà-phát-triển)

Đây là version mình đã test trên phần thanh toán VNPT Epay. Nếu có lỗi hoặc muốn mở rộng chức năng, Hãy tạo các `issue` để mình cập nhật cho hoàn chỉnh. Nếu bạn muốn liên hệ trực tiếp hãy gửi mail về  . Cảm ơn!

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

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://avatars.githubusercontent.com/u/18284317?v=4)[lamtd](/maintainers/lamtd)[@lamtd](https://github.com/lamtd)

---

Top Contributors

[![lamtd](https://avatars.githubusercontent.com/u/18284317?v=4)](https://github.com/lamtd "lamtd (16 commits)")

---

Tags

laravelmomophpvnptepay

### Embed Badge

![Health badge](/badges/lamtd-vnpt-epay/health.svg)

```
[![Health](https://phpackages.com/badges/lamtd-vnpt-epay/health.svg)](https://phpackages.com/packages/lamtd-vnpt-epay)
```

PHPackages © 2026

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