PHPackages                             szwtdl/laravel-asiabill - 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. szwtdl/laravel-asiabill

ActiveLibrary[Payment Processing](/categories/payments)

szwtdl/laravel-asiabill
=======================

Asiabill payment sdk, asiabill安信易

v1.0.0(3y ago)0291Apache-2.0PHP

Since Aug 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/szwtdl/laravel-asiabill)[ Packagist](https://packagist.org/packages/szwtdl/laravel-asiabill)[ RSS](/packages/szwtdl-laravel-asiabill/feed)WikiDiscussions master Synced 2d ago

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

asiabill
========

[](#asiabill)

### 初始sdk

[](#初始sdk)

```
use Asiabill\asiabill;
$asiabill = new asiabill('12246001', '12H4567r','test'); # test or live
```

### laravel 集成 `config/services.php`

[](#laravel-集成-configservicesphp)

```
'asiabill' => [
    'gateway_no' => '12246001',
    'sign_key' => '12H4567r',
    'model' => 'test',
]
$result = app('asiabill')->sessionToken(); # $asiabill = app('asiabill');
```

### 生成token

[](#生成token)

```
$asiabill->sessionToken();
```

### 创建用户

[](#创建用户)

```
$asiabill->customers([
    'email' => '123456@gmail.com',
    'firstName' => 'zhang',
    'lastName' => 'san',
    'phone' => '13800013866',
    'description' => '年会员',
]);
```

### 用户列表

[](#用户列表)

```
$result = $asiabill->customersList(1,20);
```

### 发起支付

[](#发起支付)

```
$result = $asiabill->pay([
    'billingAddress' => [
        'address' => 'address',
        'city' => 'BR',
        'country' => 'country',
        'email' => '123451234@email.com',
        'firstName' => 'firstName',
        'lastName' => 'lastName',
        'phone' => '13800138000',
        'state' => 'CE',
        'zip' => '666666'
    ],
    'callbackUrl' => 'http://'.$_SERVER['HTTP_HOST'].'/Asiabill/return.php',
    'customerId' => '', #asiabill创建的客户id，非网站用户id
    'deliveryAddress' => [
        'shipAddress' => 'mfdgohmqkpocemkqwtks',
        'shipCity' => 'MQOHUPOX',
        'shipCountry' => 'BR',
        'shipFirstName' =>  'SFDMPG',
        'shipLastName' =>  'USJAXT',
        'shipPhone' => '62519594707',
        'shipState' => 'WEWBZ',
        'shipZip' => '512008'
    ],
    'goodsDetails' => [
        [
            'goodsCount' => '1',
            'goodsPrice' => '6.00',
            'goodsTitle' => 'goods_1'
        ]
    ],
    'isMobile' => $asiabill->isMobile(), #// 0:web, 1:h5, 2:app_SDK
    'orderAmount' => '7.00',
    'orderCurrency' => 'USD',
    'orderNo' => date('YmdHis').mt_rand(1000,9999),
    'paymentMethod' => 'Credit Card', # 其它支付方式请参考文档说明
    'platform' => 'php_SDK', # 平台标识，用户自定义
    'remark' => '', # 订单备注信息
    'returnUrl' => 'http://'.$_SERVER['HTTP_HOST'].'/Asiabill/return.php',
    'webSite' => $_SERVER['HTTP_HOST']
]);
```

### 确认扣款

[](#确认扣款)

```
$result = $asiabill->confirm([
    'callbackUrl' => 'http://'.$_SERVER['HTTP_HOST'].'/Asiabill/return.php',
    'customerId' => 'cus_1547102564926713856',
    'customerPaymentMethodId' => 'pm_1547102612104245248',
    'tokenType' => 'InitRecurring',
    'goodsDetails' => [
        array(
            'goodsCount' => '1',
            'goodsPrice' => 100.00,
            'goodsTitle' => '超级会员年费'
        )
    ],
    'isMobile' => "0",
    'customerIp' => '170.106.2.846', //控制台必须填写IP
    'orderAmount' => 600,
    'orderCurrency' => 'USD',
    'orderNo' => date('YmdHis').mt_rand(1000,9999),
    'platform' => "php",
    'remark' => 'Renewal',
    'returnUrl' => 'http://'.$_SERVER['HTTP_HOST'].'/Asiabill/return.php',
    'webSite' => $_SERVER['HTTP_HOST']
]);
```

### 循环扣款

[](#循环扣款)

```
$result = $asiabill->confirm([
    'callbackUrl' => 'http://'.$_SERVER['HTTP_HOST'].'/Asiabill/return.php',
    'customerId' => 'cus_1547102564926713856',
    'customerPaymentMethodId' => 'pm_1547102612104245248',
    'tokenType' => 'Recurring', # 二次循环扣费，的参数
    'goodsDetails' => [
        array(
            'goodsCount' => '1',
            'goodsPrice' => 100.00,
            'goodsTitle' => '超级会员年费'
        )
    ],
    'isMobile' => "0",
    'customerIp' => '170.106.2.846', //控制台必须填写IP
    'orderAmount' => 600,
    'orderCurrency' => 'USD',
    'orderNo' => date('YmdHis').mt_rand(1000,9999),
    'platform' => "php",
    'remark' => 'Renewal',
    'returnUrl' => 'http://'.$_SERVER['HTTP_HOST'].'/Asiabill/return.php',
    'webSite' => $_SERVER['HTTP_HOST']
]);
```

### 验证

[](#验证)

```
$result = $asiabill->verify();
```

### 退款

[](#退款)

```
$result = $asiabill->refund([
    'merTrackNo' => '454515154',
    'refundAmount' => '10.22',
    'refundReason' => '退款',
    'refundType' => '1',
    'remark' => '',
    'tradeNo' => '2021092810011380477264'
]);
```

### 查询订单

[](#查询订单)

```
$result = $asiabill->queryTradeNumber('2022082620385662370185');
```

### 按时间查询订单

[](#按时间查询订单)

```
$result = $asiabill->queryTradeTime('2022-03-26T00:00:00','2022-03-24T00:00:00');
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

1405d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f32de7c4cbc21d8a95efcdcaec3e2cbffeffd80c9de0232c6a3a3dcd3aa3f55b?d=identicon)[szwtdl](/maintainers/szwtdl)

---

Top Contributors

[![szwtdl](https://avatars.githubusercontent.com/u/13212946?v=4)](https://github.com/szwtdl "szwtdl (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/szwtdl-laravel-asiabill/health.svg)

```
[![Health](https://phpackages.com/badges/szwtdl-laravel-asiabill/health.svg)](https://phpackages.com/packages/szwtdl-laravel-asiabill)
```

###  Alternatives

[kubawerlos/php-cs-fixer-custom-fixers

A set of custom fixers for PHP CS Fixer

24013.1M202](/packages/kubawerlos-php-cs-fixer-custom-fixers)[ergebnis/php-cs-fixer-config

Provides a configuration factory and rule set factories for friendsofphp/php-cs-fixer.

703.0M206](/packages/ergebnis-php-cs-fixer-config)[redaxo/php-cs-fixer-config

php-cs-fixer config for REDAXO

10105.6k17](/packages/redaxo-php-cs-fixer-config)

PHPackages © 2026

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