PHPackages                             vnpost/postpay-php - 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. [API Development](/categories/api)
4. /
5. vnpost/postpay-php

ActiveLibrary[API Development](/categories/api)

vnpost/postpay-php
==================

Postpay API PHP client for multiple frameworks including Laravel

1.0.0.4(1y ago)0521Apache-2.0PHPPHP ^8.0

Since Aug 30Pushed 1y agoCompare

[ Source](https://github.com/Vietnam-Post/PostPayQR-PHP)[ Packagist](https://packagist.org/packages/vnpost/postpay-php)[ RSS](/packages/vnpost-postpay-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

Postpay API PHP Client
======================

[](#postpay-api-php-client)

Postpay API PHP Client là một thư viện PHP dùng để tích hợp với Postpay API, cho phép bạn quản lý tài khoản chuyên thu và thực hiện các thao tác liên quan như tạo tài khoản, đóng tài khoản, truy vấn giao dịch, và xử lý callback. Thư viện này có thể sử dụng với nhiều framework PHP khác nhau, bao gồm Laravel và này nọ.

Tính năng
---------

[](#tính-năng)

- Tạo tài khoản chuyên thu
- Đóng tài khoản không sử dụng
- Xem chi tiết thông tin tài khoản
- Truy vấn giao dịch tài khoản chuyên thu
- Xử lý callback từ Postpay API
- Hỗ trợ mã lỗi và mô tả lỗi chi tiết

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

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

```
composer require vnpost/postpay-php
```

Cấu hình
--------

[](#cấu-hình)

Trước khi sử dụng, bạn cần cấu hình một số thông tin cần thiết như chế độ hoạt động (dev/prod), đường dẫn đến file chứng chỉ API (.cer), và mã đối tác.

### Laravel

[](#laravel)

Nếu bạn sử dụng Laravel, bạn có thể thêm các biến cấu hình vào file .env:

```
POSTPAY_API_URL=postpay_api_url # https://postpay.vn/url
POSTPAY_API_KEY_PATH=/path/to/key.cer
POSTPAY_PARTNER_CODE=your_partner_code
POSTPAY_PARTNER_PRIVATE_KEY_PATH=/path/to/partner_private_key_path.pem
POSTPAY_PROXY_URL= # optional
```

### Framework php khác

[](#framework-php-khác)

```
[POSTPAY]
API_URL=postpay_api_url # https://postpay.vn/url
API_KEY_PATH=/path/to/key.cer
PARTNER_CODE=your_partner_code
PARTNER_PRIVATE_KEY_PATH=/path/to/partner_private_key_path.pem
PROXY_URL= # optional
```

Sau đó, trong mã của bạn, khởi tạo client như sau (dùng chung cả Laravel và Framework khác):

```
use Postpay\PostpayClient;

class PostpayController extends Controller
{
    public function createAccount(PostpayClient $postpayClient)
    {
        $data = input('post.'); // Thay chỗ này phù hợp với từng Framework
        $response = $postpayClient->createAccount($data);

        if ($response->getErrorCode()) {
            return json(['error' => $response->getErrorMessage()], 400);
        }

        return json($response->getData());
    }
}
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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 ~15 days

Total

5

Last Release

612d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3dbf47b879684e141e3b81a02cbed9cebdbfb8b32bdcfbb86ebab83954d71946?d=identicon)[tkien](/maintainers/tkien)

---

Top Contributors

[![tkien](https://avatars.githubusercontent.com/u/2233345?v=4)](https://github.com/tkien "tkien (37 commits)")

### Embed Badge

![Health badge](/badges/vnpost-postpay-php/health.svg)

```
[![Health](https://phpackages.com/badges/vnpost-postpay-php/health.svg)](https://phpackages.com/packages/vnpost-postpay-php)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M987](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M45](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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