Download the PHP package vrobin/alipay-sdk without Composer

On this page you can find all versions of the php package vrobin/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

原项目部更新了,fork过来

更新官方SDK,支持公钥证书加密,支持AES加密,支持PHP7.2

原项目

主要目的

目前,开源圈内已有不少质量不错的支付宝「支付」相关扩展包;而支付宝「小程序」推出不久,目前仍处于公测阶段。此项目的初衷并不是 Yet another,而是填补小程序 API 的空缺,文档和示例也将会有所侧重。

小试牛刀

如何使用

  1. Composer 安装。

  2. 创建 AlipayKeyPair 实例。

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

  3. 创建 AopClient 实例。

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

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

    另外,你也可以不使用请求类工厂,就像官方文档那样,手动创建请求类。

    例如:

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

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

  6. 使用AES加密 ( 某些接口默认强制开启AES加密,无需额外设置 )

    单独解密 ( 如小程序获取用户手机号 )

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

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

注意事项

实用工具

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

其它资源

已知 Issue

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

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

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

感谢

感想

最后,一点感想。

作为一个名不见经传的小白,不敢妄言阿里的工程师技术欠佳;但可以确定的是,官方提供的 PHP SDK 绝对不是用心之作。

做开放平台,对待第三方开发者是这样的态度,怎能做到与微信比肩?

硬广,欢迎关注我们的产品:


All versions of alipay-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-openssl Version *
ext-mcrypt Version *
ext-json Version *
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 vrobin/alipay-sdk contains the following files

Loading the files please wait ....