PHPackages                             jpaypp/gbas-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. jpaypp/gbas-php

ActiveLibrary[API Development](/categories/api)

jpaypp/gbas-php
===============

gbas php Library

1.0(6y ago)16PHPPHP &gt;=5.6.0

Since Oct 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jpaypp/gbas-php)[ Packagist](https://packagist.org/packages/jpaypp/gbas-php)[ Docs](https://www.gba.one/)[ RSS](/packages/jpaypp-gbas-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

GBasJPay PHP bindings
=====================

[](#gbasjpay-php-bindings)

You can sign up for a GBasJPay account at .

Requirements
------------

[](#requirements)

PHP 5.6.0 and later.

Composer
--------

[](#composer)

You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:

```
composer require jpaypp/gbas-php
```

To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

```
require_once('vendor/autoload.php');
```

Manual Installation
-------------------

[](#manual-installation)

If you do not wish to use Composer, you can download the [latest release](https://github.com/chuangxiangjpay/jpay-php/releases). Then, to use the bindings, include the `init.php` file.

```
require_once('/path/to/jpay-php/init.php');
```

Dependencies
------------

[](#dependencies)

The bindings require the following extensions in order to work properly:

- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer
- [`json`](https://secure.php.net/manual/en/book.json.php)
- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String)

If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.

Getting Started
---------------

[](#getting-started)

Simple usage looks like:

```
\GBasJPay\GBasJPay::setDebug(true); //调试模式   true /false
\GBasJPay\GBasJPay::setApiMode('sandbox'); //环境  live 线上，sandbox 沙盒
\GBasJPay\GBasJPay::setClientId('10000000');   // 设置 CLIENT ID
\GBasJPay\GBasJPay::setApiKey('BQokikJOvBiI2HlWgH4olfQ2');    // 设置 API Key
try {
    $ch = \GBasJPay\Charge::create([
        'channel'   => '901',                // 支付使用的第三方支付渠道取值
        'out_order_no' => time(),  //外部订单号 ，为空时由系统生成
        'product' =>[  //商品信息
            'subject'      => '测试商品',   //商品名称
            'body'      => '测试商品',   //商品描述
            'amount'    => '1',   // 订单总金额
            'quantity'  => '1'  //商品数量
        ],
        'extra'    =>[     //扩展信息
            'mode'      => 'mweb',  //微信渠道901 ，支付模式，jsapi 微信公众号、native 扫码支付、mweb H5 支付 ,link 返回支付链接跳转
            'format'    => 'json', //返回方式 from 表单直接提交/ json 返回
        ],
        'metadata'  => '自定义数据',
        'client_ip' => '1.1.1.1',   //客户端发起支付请求的IP
        'description' => '测试数据', //订单备注说明
        'notify'=> 'http://localhost/notify.html',   //异步通知地址
        'return'=>'http://localhost/callback.html',  //同步地址
     ]);
    echo $ch;                                       // 输出 返回的支付凭据 Charge
} catch (\GBasJPay\Error\Base $e) {
    // 捕获报错信息
    if ($e->getHttpStatus() != null) {
        header('Status: ' . $e->getHttpStatus());
        echo $e->getHttpBody();
    } else {
        echo $e->getMessage();
    }
}
```

Documentation
-------------

[](#documentation)

Please see  for up-to-date documentation.

Development
-----------

[](#development)

Get \[Composer\]\[composer\]. For example, on Mac OS:

```
brew install composer
```

Install dependencies:

```
composer install
```

Install dependencies as mentioned above (which will resolve [PHPUnit](http://packagist.org/packages/phpunit/phpunit)), then you can run the test suite:

```
./vendor/bin/phpunit
```

Or to run an individual test file:

```
./vendor/bin/phpunit tests/UtilTest.php
```

The method should be called once, before any request is sent to the API. The second and third parameters are optional.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

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

2406d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/26770e94f05009392a676f99e6e83a1739de89b48bf39082c376b9fe9ea97182?d=identicon)[jpaypp](/maintainers/jpaypp)

---

Tags

apipayment processingpayMasPayvmart

### Embed Badge

![Health badge](/badges/jpaypp-gbas-php/health.svg)

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

###  Alternatives

[payjp/payjp-php

Payjp PHP Library

542.8M4](/packages/payjp-payjp-php)[ebanx/ebanx

EBANX PHP library

24648.5k](/packages/ebanx-ebanx)[pay-now/paynow-php-sdk

PHP client library for accessing Paynow API

18193.9k2](/packages/pay-now-paynow-php-sdk)[everypay/everypay-php

1742.0k](/packages/everypay-everypay-php)[iatspayments/php

iATS Payments API PHP wrapper library.

1021.9k](/packages/iatspayments-php)

PHPackages © 2026

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