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

ActiveLibrary[Payment Processing](/categories/payments)

yjc/alipay-sdk
==============

alipay SDK

1.0(7y ago)111MITPHPPHP &gt;=5.4.0

Since Oct 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/52fhy/alipay-sdk)[ Packagist](https://packagist.org/packages/yjc/alipay-sdk)[ Docs](http://github.com/52fhy/alipay-sdk)[ RSS](/packages/yjc-alipay-sdk/feed)WikiDiscussions master Synced today

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

alipay-sdk-php 命名空间版
====================

[](#alipay-sdk-php-命名空间版)

[![build=passing](https://camo.githubusercontent.com/73bef9848a696b986c8abc91c53dfef66d82b9f468c0366f0d93ffa1020024b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c642d70617373696e672d627269676874677265656e2e7376673f6d61784167653d32353932303030)](https://camo.githubusercontent.com/73bef9848a696b986c8abc91c53dfef66d82b9f468c0366f0d93ffa1020024b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c642d70617373696e672d627269676874677265656e2e7376673f6d61784167653d32353932303030)[![Latest Version on Packagist](https://camo.githubusercontent.com/44903de6dcb153600e00299e464cf69f23716cbe9d844179ec806d957d9b124f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f796a632f616c697061792d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yjc/alipay-sdk)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![composer](https://camo.githubusercontent.com/5ca77c9823e0852e81f84cfb7bbb5fd265ef3ebfdf2d2741abd4b03c1a4392b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d706f7365722d796a632f616c697061792d73646b2e7376673f6d61784167653d32353932303030)](https://packagist.org/packages/yjc/alipay-sdk)[![Total Downloads](https://camo.githubusercontent.com/c56df60374b7d5fdd65badf55dcccf612e0df1ddb9e362fbd1de65b26646572b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f796a632f616c697061792d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yjc/alipay-sdk)

alipay-sdk-PHP 由于没有使用PSR-4规范，默认需要引入AopSdk.php，这样默认是初始就加载了的。 另外默认带了lotusphp框架，这个就有点臃肿了。

本SDK在官网的基础上进行精简封装：

- 增加了命名空间
- 使用PSR-2代码规范格式化
- 去除lotusphp框架
- 去除无用代码

目前Request仅保留了`AlipayTrade`系列。

官方SDK获取：

-
-

安装
--

[](#安装)

推荐使用`composer`安装：

```
composer require yjc/alipay-sdk

```

或者在composer.json里追加：

```
"require": {
	"yjc/alipay-sdk": "1.0"
},

```

使用示例
----

[](#使用示例)

首先需要注册支付宝商家版。然后进行配置。

支付宝APP支付：

```
