Download the PHP package hanwenbo/pay without Composer

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

支付宝

支付方法

支付宝支付目前支持 7 种支付方法,对应的支付 method 如下:

method 说明 参数 返回值
web 电脑支付 Request Response
wap 手机网站支付 Request Response
app APP 支付 Request Response
pos 刷卡支付 Request Response
scan 扫码支付 Request Response
transfer 账户转账 Request Response
mini 小程序支付 Request Response

电脑支付

统一收单下单并支付页面接口

订单配置参数

所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,product_code 等参数。

所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请参考这里,查看「请求参数」一栏。

参数查询:https://docs.open.alipay.com/api_1/alipay.trade.page.pay

生成支付的跳转html示例

手机网站支付接口2.0

订单配置参数

所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,product_code 等参数。

所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请参考这里,查看「请求参数」一栏。

参数查询:https://docs.open.alipay.com/api_1/alipay.trade.wap.pay

APP支付接口2.0

订单配置参数

所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如, product_code 等参数。

所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请参考这里,查看「请求参数」一栏。

参数查询:https://docs.open.alipay.com/api_1/alipay.trade.app.pay

刷卡支付

订单配置参数

所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,product_code 等参数。

所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请参考这里,查看「请求参数」一栏。

参数查询:https://docs.open.alipay.com/api_1/alipay.trade.page.pay

扫码支付

订单配置参数

所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,product_code 等参数。

所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请参考这里,查看「请求参数」一栏。

参考参数:https://docs.open.alipay.com/api_1/alipay.trade.precreate

单笔转账到支付宝账户接口

订单配置参数

所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,product_code 等参数。

所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请参考这里,查看「请求参数」一栏。

参数查询:https://docs.open.alipay.com/api_28/alipay.fund.trans.toaccount.transfer

小程序支付

订单配置参数

所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,product_code 等参数。

所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请参考这里,查看「请求参数」一栏。

小程序支付接入文档:https://docs.alipay.com/mini/introduce/pay

参数查询:

订单查询

官方参数查询:https://docs.open.alipay.com/api_1/alipay.trade.fastpay.refund.query

退款查询

官方参数查询:https://docs.open.alipay.com/api_1/alipay.trade.refund

查询转账订单接口

官方参数查询:https://docs.open.alipay.com/api_28/alipay.fund.trans.order.query

交易撤销接口

官方参数查询:https://docs.open.alipay.com/api_1/alipay.trade.cancel

交易关闭接口

官方参数查询:https://docs.open.alipay.com/api_1/alipay.trade.close

查询对账单下载地址

官方参数查询:https://docs.open.alipay.com/api_15/alipay.data.dataservice.bill.downloadurl.query

验证服务器数据

服务器确认收到异步通知字符串获取

微信支付

微信支付目前支持 3 种支付方法,对应的支付 method 如下:

method 说明 参数 返回值
wap 手机网站支付 Request Response
officialAccount 公众号支付 Request Response
scan 扫码支付 Request Response
miniProgram 小程序支付 Request Response

微信参数配置

由于小程序拥有独立的APPID,只需要在配置里同时配置上AppId和MiniAppId两个配置项,在支付的时候会自动选择对应的APPID来发起支付

公众号支付

可以参考demo/wechat/index.php

H5支付

小程序支付

扫码支付

模式一

生成扫码链接 然后生成二维码 具体请查看demo/wechat/index.php

扫码回调地址(ps:公众号平台设置)

模式二

订单查询

申请退款

退款查询

关闭订单

下载对账单

下载资金对账单

验证签名

服务器确认收到异步通知字符串获取


All versions of pay with dependencies

PHP Build Version
Package Version
Requires easyswoole/spl Version ^1.1
easyswoole/http-client Version ^1.2.5
ext-openssl Version >=1.0
ext-json Version >=1.0
easyswoole/utility Version ^1.0
easyswoole/http Version ^1.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 hanwenbo/pay contains the following files

Loading the files please wait ....