PHPackages                             jasonccs/zhifubao - 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. jasonccs/zhifubao

ActiveLibrary[Payment Processing](/categories/payments)

jasonccs/zhifubao
=================

支付宝组件

011PHP

Since May 16Pushed 7y ago1 watchersCompare

[ Source](https://github.com/jasonccs/alipay)[ Packagist](https://packagist.org/packages/jasonccs/zhifubao)[ RSS](/packages/jasonccs-zhifubao/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Omnipay: Alipay
===============

[](#omnipay-alipay)

\[!\[travis\]\[ico-travis\]\]\[link-travis\] \[!\[Latest Version on Packagist\]\[ico-version\]\]\[link-packagist\] \[!\[Total Downloads\]\[ico-downloads\]\]\[link-downloads\] \[!\[Code Coverage\]\[ico-code-coverage\]\]\[link-code-coverage\] [!\[Software License\]\[ico-license\]](LICENSE)\[!\[Donate\]\[ico-donate-paypal\]\]\[link-donate-paypal\] \[!\[Donate\]\[ico-donate\]\]\[link-donate\]

**Alipay driver for the Omnipay PHP payment processing library**

[Omnipay](https://github.com/omnipay/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Alipay support for Omnipay.

> Cross-border Alipay payment please use [`lokielse/omnipay-global-alipay`](https://github.com/lokielse/omnipay-global-alipay)

> Legacy Version please use [`"lokielse/omnipay-alipay": "dev-legacy"`](https://github.com/lokielse/omnipay-alipay/tree/legacy)

Installation
------------

[](#installation)

Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```
"lokielse/omnipay-alipay": "^2.0",

```

And run composer to update your dependencies:

```
$ composer update -vvv

```

Basic Usage
-----------

[](#basic-usage)

The following gateways are provided by this package:

GatewayDescription说明 LinksAlipay\_AopPageAlipay Page Gateway电脑网站支付 - new\[Usage\]\[link-wiki-aop-page\] \[Doc\]\[link-doc-aop-page\]Alipay\_AopAppAlipay APP GatewayAPP支付 - new\[Usage\]\[link-wiki-aop-app\] \[Doc\]\[link-doc-aop-app\]Alipay\_AopF2FAlipay Face To Face Gateway当面付 - new\[Usage\]\[link-wiki-aop-f2f\] \[Doc\]\[link-doc-aop-f2f\]Alipay\_AopWapAlipay WAP Gateway手机网站支付 - new\[Usage\]\[link-wiki-aop-wap\] \[Doc\]\[link-doc-aop-wap\]Alipay\_AopJsAlipay Js GatewayJSAPI - new\[Usage\]\[link-wiki-aop-js\] \[Doc\]\[link-doc-aop-js\]Alipay\_LegacyAppAlipay Legacy APP GatewayAPP支付\[Usage\]\[link-wiki-legacy-app\] \[Doc\]\[link-doc-legacy-app\]Alipay\_LegacyExpressAlipay Legacy Express Gateway即时到账\[Usage\]\[link-wiki-legacy-express\] \[Doc\]\[link-doc-legacy-express\]Alipay\_LegacyWapAlipay Legacy WAP Gateway手机网站支付\[Usage\]\[link-wiki-legacy-wap\] \[Doc\]\[link-doc-legacy-wap\]Usage
-----

[](#usage)

### Purchase (购买)

[](#purchase-购买)

```
/**
 * @var AopAppGateway $gateway
 */
$gateway = Omnipay::create('Alipay_AopPage');
$gateway->setSignType('RSA2'); // RSA/RSA2/MD5
$gateway->setAppId('the_app_id');
$gateway->setPrivateKey('the_app_private_key');
$gateway->setAlipayPublicKey('the_alipay_public_key');
$gateway->setReturnUrl('https://www.example.com/return');
$gateway->setNotifyUrl('https://www.example.com/notify');

/**
 * @var AopTradePagePayResponse $response
 */
$response = $gateway->purchase()->setBizContent([
    'subject'      => 'test',
    'out_trade_no' => date('YmdHis') . mt_rand(1000, 9999),
    'total_amount' => '0.01',
    'product_code' => 'FAST_INSTANT_TRADE_PAY',
])->send();

$url = $response->getRedirectUrl();
```

For general usage instructions, please see the main [Omnipay](https://github.com/omnipay/omnipay)repository.

Related
-------

[](#related)

- [Laravel-Omnipay](https://github.com/ignited/laravel-omnipay)
- [Omnipay-GlobalAlipay](https://github.com/lokielse/omnipay-global-alipay)
- [Omnipay-WechatPay](https://github.com/lokielse/omnipay-wechatpay)
- [Omnipay-UnionPay](https://github.com/lokielse/omnipay-unionpay)

Support
-------

[](#support)

If you are having general issues with Omnipay, we suggest posting on [Stack Overflow](http://stackoverflow.com/). Be sure to add the [omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which you can subscribe to.

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/lokielse/omnipay-alipay/issues), or better yet, fork the library and submit a pull request.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

[![jasonccs](https://avatars.githubusercontent.com/u/17975766?v=4)](https://github.com/jasonccs "jasonccs (7 commits)")

### Embed Badge

![Health badge](/badges/jasonccs-zhifubao/health.svg)

```
[![Health](https://phpackages.com/badges/jasonccs-zhifubao/health.svg)](https://phpackages.com/packages/jasonccs-zhifubao)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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