Download the PHP package yijin/easysdk without Composer

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

Latest Stable Version FOSSA Status

基于 Alipay Easy SDK for PHP 魔改的版本,主要是去除单例,防止swoole协程环境下数据混淆。

Alipay Esay SDK for PHP让您不用复杂编程即可访支付宝开放平台开放的各项常用能力,SDK可以自动帮您满足能力调用过程中所需的证书校验、加签、验签、发送HTTP请求等非功能性要求。

下面向您介绍Alipay Easy SDK for PHP 的基本设计理念和使用方法。

设计理念

不同于原有的Alipay SDK通用而全面的设计理念,Alipay Easy SDK对开放能力的API进行了更加贴近高频场景的精心设计与裁剪,简化了服务端调用方式,让调用API像使用语言内置的函数一样简便。

Alipay Easy SDK提供了与能力地图相对应的代码组织结构,让开发者可以快速找到不同能力对应的API。

Alipay Easy SDK主要目标是提升开发者在服务端集成支付宝开放平台开放的各类核心能力的效率。

环境要求

  1. Alipay Easy SDK for PHP 需要配合PHP 7.0或其以上版本。

  2. 使用 Alipay Easy SDK for PHP 之前 ,您需要先前往支付宝开发平台-开发者中心完成开发者接入的一些准备工作,包括创建应用、为应用添加功能包、设置应用的接口加签方式等。

  3. 准备工作完成后,注意保存如下信息,后续将作为使用SDK的输入。

AppId应用的私钥应用公钥证书文件支付宝公钥证书文件支付宝根证书文件

AppId应用的私钥支付宝公钥

安装依赖

通过Composer在线安装依赖(推荐)

composer require alipaysdk/easysdk:^2.2

本地手动集成依赖(适用于自己修改源码后的本地重新打包安装)

  1. 本机安装配置Composer工具。
  2. 在本README.md所在目录下,执行composer install,下载SDK依赖。
  3. 依赖文件会下载到vendor目录下。

快速使用

以下这段代码示例向您展示了使用Alipay Easy SDK for PHP调用一个API的3个主要步骤:

  1. 设置参数(全局只需设置一次)。
  2. 发起API调用。
  3. 处理响应或异常。

扩展调用

ISV代调用

设置独立的异步通知地址

设置可选业务参数

多种扩展灵活组合

API组织规范

在Alipay Easy SDK中,API的引用路径与能力地图的组织层次一致,遵循如下规范

Factory::能力名称()->场景名称()->接口方法名称( ... )

比如,如果您想要使用能力地图营销能力下的模板消息场景中的小程序发送模板消息,只需按如下形式编写调用代码即可(不同编程语言的连接符号可能不同)。

Factory::marketing()->templateMessage()->send( ... )

其中,接口方法名称通常是对其依赖的OpenAPI功能的一个最简概况,接口方法的出入参与OpenAPI中同名参数含义一致,可参照OpenAPI相关参数的使用说明。

Alipay Easy SDK将致力于保持良好的API命名,以符合开发者的编程直觉。

已支持的API列表

能力类别 场景类别 接口方法名称 调用的OpenAPI名称
Base OAuth getToken alipay.system.oauth.token
Base OAuth refreshToken alipay.system.oauth.token
Base Qrcode create alipay.open.app.qrcode.create
Base Image upload alipay.offline.material.image.upload
Base Video upload alipay.offline.material.image.upload
Member Identification init alipay.user.certify.open.initialize
Member Identification certify alipay.user.certify.open.certify
Member Identification query alipay.user.certify.open.query
Payment Common create alipay.trade.create
Payment Common query alipay.trade.query
Payment Common refund alipay.trade.refund
Payment Common close alipay.trade.close
Payment Common cancel alipay.trade.cancel
Payment Common queryRefund alipay.trade.fastpay.refund.query
Payment Common downloadBill alipay.data.dataservice.bill.downloadurl.query
Payment Common verifyNotify -
Payment Huabei create alipay.trade.create
Payment FaceToFace pay alipay.trade.pay
Payment FaceToFace precreate alipay.trade.precreate
Payment App pay alipay.trade.app.pay
Payment Page pay alipay.trade.page.pay
Payment Wap pay alipay.trade.wap.pay
Security TextRisk detect alipay.security.risk.content.detect
Marketing Pass createTemplate alipay.pass.template.add
Marketing Pass updateTemplate alipay.pass.template.update
Marketing Pass addInstance alipay.pass.instance.add
Marketing Pass updateInstance alipay.pass.instance.update
Marketing TemplateMessage send alipay.open.app.mini.templatemessage.send
Marketing OpenLife createImageTextContent alipay.open.public.message.content.create
Marketing OpenLife modifyImageTextContent alipay.open.public.message.content.modify
Marketing OpenLife sendText alipay.open.public.message.total.send
Marketing OpenLife sendImageText alipay.open.public.message.total.send
Marketing OpenLife sendSingleMessage alipay.open.public.message.single.send
Marketing OpenLife recallMessage alipay.open.public.life.msg.recall
Marketing OpenLife setIndustry alipay.open.public.template.message.industry.modify
Marketing OpenLife getIndustry alipay.open.public.setting.category.query
Util AES decrypt -
Util AES encrypt -
Util Generic execute -
Util Generic sdkExecute -
Util Generic fileExecute -

注:更多高频场景的API持续更新中,敬请期待。

文档

API Doc

Alipay Easy SDK


All versions of easysdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-curl Version *
ext-ctype Version *
ext-dom Version *
ext-fileinfo Version *
ext-json Version *
ext-libxml Version *
ext-simplexml Version *
ext-mbstring Version *
ext-openssl Version *
pimple/pimple Version ^3.0
xin/container Version ^2.0.1
guzzlehttp/guzzle Version >=6.3
psr/log Version ^1.1
ext-xmlwriter Version *
songshenzong/support Version ^2.0
danielstjules/stringy Version ^3.1
mtdowling/jmespath.php Version ^2.4
adbario/php-dot-notation Version ^2.2
alibabacloud/tea Version ^3.1
alibabacloud/tea-fileform Version ^0.3.2
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 yijin/easysdk contains the following files

Loading the files please wait ....