PHPackages                             fraizy1477/alipay - 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. fraizy1477/alipay

ActiveLibrary[Payment Processing](/categories/payments)

fraizy1477/alipay
=================

Alipay gateway payment processing library

1.0(4y ago)07MITPHP

Since Jan 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/frainzy1477/alipay)[ Packagist](https://packagist.org/packages/fraizy1477/alipay)[ Docs](https://github.com/frainzy1477/alipay)[ RSS](/packages/fraizy1477-alipay/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

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

[](#omnipay-alipay)

[![travis](https://camo.githubusercontent.com/cfdfb3141b640099c28a5e0b8e5e86eaceeaf820483902b9f48c0a28a6bf4d1d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f667261696e7a79313437372f616c697061792f6d61737465722e737667)](https://travis-ci.org/frainzy1477/alipay)[![Latest Version on Packagist](https://camo.githubusercontent.com/ead072a5d306bbafd239c1e1c7bb22eafd857f6a69b5663a36e45d52088ff485/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f667261696e7a79313437372f616c697061792e737667)](https://packagist.org/packages/frainzy1477/alipay)[![Total Downloads](https://camo.githubusercontent.com/534e32ccdf16b3ba34a54fdb6b54c95bdce15cb19dd88b7e44fb5a0b5370f766/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f667261696e7a79313437372f616c697061792e737667)](https://packagist.org/packages/frainzy1477/alipay)[![Code Coverage](https://camo.githubusercontent.com/b521959fdd150db2c75077a976c1dcdace3e48bdae0df56141508be4a7039d27/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f667261696e7a79313437372f616c697061792f6d61737465722e737667)](https://codecov.io/github/frainzy1477/alipay?branch=master)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)

**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 [`"frainzy1477/alipay": "dev-legacy"`](https://github.com/frainzy1477/alipay/tree/legacy)

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

[](#installation)

```
composer require frainzy1477/alipay

```

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

[](#basic-usage)

The following gateways are provided by this package:

GatewayDescription说明 LinksAlipay\_AopPageAlipay Page Gateway电脑网站支付 - new[Usage](https://github.com/frainzy1477/alipay/wiki/Aop-Page-Gateway) [Doc](https://doc.open.alipay.com/doc2/detail.htm?treeId=270&articleId=105901&docType=1)Alipay\_AopAppAlipay APP GatewayAPP支付 - new[Usage](https://github.com/frainzy1477/alipay/wiki/Aop-APP-Gateway) [Doc](https://doc.open.alipay.com/docs/doc.htm?treeId=204&articleId=105051&docType=1)Alipay\_AopF2FAlipay Face To Face Gateway当面付 - new[Usage](https://github.com/frainzy1477/alipay/wiki/Aop-Face-To-Face-Gateway) [Doc](https://doc.open.alipay.com/docs/doc.htm?treeId=194&articleId=105072&docType=1)Alipay\_AopWapAlipay WAP Gateway手机网站支付 - new[Usage](https://github.com/frainzy1477/alipay/wiki/Aop-WAP-Gateway) [Doc](https://doc.open.alipay.com/docs/doc.htm?treeId=203&articleId=105288&docType=1)Alipay\_AopJsAlipay Js GatewayJSAPI - new[Usage](https://github.com/frainzy1477/alipay/wiki/Aop-JS-Gateway) [Doc](https://myjsapi.alipay.com/jsapi/native/trade-pay.html)Alipay\_LegacyAppAlipay Legacy APP GatewayAPP支付[Usage](https://github.com/frainzy1477/alipay/wiki/Legacy-APP-Gateway) [Doc](https://doc.open.alipay.com/doc2/detail?treeId=59&articleId=103563&docType=1)Alipay\_LegacyExpressAlipay Legacy Express Gateway即时到账[Usage](https://github.com/frainzy1477/alipay/wiki/Legacy-Express-Gateway) [Doc](https://doc.open.alipay.com/docs/doc.htm?treeId=108&articleId=103950&docType=1)Alipay\_LegacyWapAlipay Legacy WAP Gateway手机网站支付[Usage](https://github.com/frainzy1477/alipay/wiki/Legacy-WAP-Gateway) [Doc](https://doc.open.alipay.com/docs/doc.htm?treeId=60&articleId=103564&docType=1)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

- [Omnipay Basic Documentation](https://github.com/thephpleague/omnipay)
- [Omnipay Alipay Wiki](https://github.com/frainzy1477/alipay/wiki)

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/frainzy1477/alipay/issues), or better yet, fork the library and submit a pull request.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

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

Unknown

Total

1

Last Release

1579d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/41cb7f234962e6cdecb777bb7071a70a3a8c4d2e8b65f97ecf9b0879b844eae5?d=identicon)[frainzy1477](/maintainers/frainzy1477)

---

Top Contributors

[![xcode75](https://avatars.githubusercontent.com/u/87862554?v=4)](https://github.com/xcode75 "xcode75 (1 commits)")

---

Tags

paymentgatewaypaymerchantpurchasealipay

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/fraizy1477-alipay/health.svg)

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

###  Alternatives

[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

587421.0k11](/packages/lokielse-omnipay-alipay)[lokielse/omnipay-global-alipay

Alipay global gateway for Omnipay payment processing library

3048.9k](/packages/lokielse-omnipay-global-alipay)

PHPackages © 2026

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