Download the PHP package abbotton/alipay-sdk without Composer

On this page you can find all versions of the php package abbotton/alipay-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package alipay-sdk

Alipay SDK for PHP

🐜 支付宝开放平台(又称:蚂蚁金服开放平台)第三方 PHP SDK,基于官方最新版本。

为什么不用官方

官方 SDK 本 SDK 链接
无 Composer 集成,自动加载依赖第三方 PHP 框架 lotusphp 集成 Packagist
代码不严谨,各种 Warning 持续构建,Notice 也不放过
零单元测试 99% 测试覆盖率
代码风格、命名风格鱼龙混杂 PSR1 + PSR2
几乎零 PHPDoc 持续补充中 对比图
异常和错误处理不统一 所有错误都将以异常的形式抛出,确保返回数据可靠 Exceptions
需手动根据接口名拼接请求类名 请求类工厂,根据 API 名直接创建请求类 AlipayRequestFactory
耦合度高,难以升级或替换 几乎完全解耦,任意替换签名 / 密钥 / 响应 甚至 HTTP 客户端 AopClient

主要目的

小试牛刀

如何使用

  1. Composer 安装。

  2. 创建 AlipayKeyPair 实例。

    AlipayKeyPair 用于存储应用私钥、支付宝公钥;两份密钥将分别用于与支付宝服务器通信时,生成请求签名、验证响应签名等。

  3. 创建 AopClient 实例。

    AopClient 通常情况会贯穿整条业务,除非你须要在同一套代码内处理多个商户号/小程序,否则只需在初始化阶段创建一次即可。

  4. 根据业务需要,创建 AlipayRequest 实例。

  5. 发送请求,获得响应数据。

    所有错误(包括但不限于网络通信异常、数据格式异常、支付宝服务器返回的错误)都会被转换为异常,请注意捕捉。

  6. 更多实例,请移步 examples 目录。

    最后,官方 SDK 内 AopClient::pageExecute() 被分离为 pageExecuteUrlpageExecuteFormAopClient::sdkExecute()AopClient::execute() 方法名保持不变,参数和返回值有所改动。

注意事项

实用工具

可执行文件位于 详细说明。

其它资源

已知 Issue

OpenSSL 在 Win32 平台需要配置 openssl.cnf 路径,参见 OpenSSL 安装 - PHP 手册

在本 SDK 内,也可通过自定义 $configargs 参数来自定义此文件路径,而不需要配置环境变量;参见 examples/keys/generate.php。

目前已知以下方法依赖于此配置文件:

感谢


All versions of alipay-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package abbotton/alipay-sdk contains the following files

Loading the files please wait ....