Download the PHP package ibrand/pay without Composer

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

做成 Laravel 中最傻瓜式的微信、支付宝支付扩展包

Feature

  1. 实现多渠道支付方式,如:原生支付,pingxx支付,银商支付等。
  2. 实现多业务统一支付。
  3. 实现异步通知统一封装。

TODO:

  1. 实现退款

安装

使用

创建支付请求

发起一次支付请求时需要创建一个新的 charge 对象,获取一个可用的支付凭据用于客户端向第三方渠道发起支付请求。

创建 charge 方法定义如下:

支付参数

请求参数 类型 必填 描述
order_no string 商户订单号,适配每个渠道对此参数的要求,必须在商户的系统内唯一。(支付宝全渠道: 1-64 位的数字和字母组合;wx: 2-32 位;wx_pub_scan、cb_wx、cb_wx_pub、cb_wx_pub_qr、cb_wx_pub_scan:1-32 位的数字和字母组合;bfb: 1-20 位;银联全渠道: 8-40 位的数字和字母组合; yeepay_wap: 1-50 位;jdpay_wap: 1-30 位;qpay:1-30 位;isv_qr、isv_scan、isv_wap: 8-32 位,不重复,建议时间戳+随机数(或交易顺序号);paypal:1-32 位的数字和字母组合;ccb_pay、ccb_qr:1-30 位数字和字母组合;cmb_wallet: 6-32 位的数字和字母组合,一天内不能重复,订单日期+订单号唯一定位一笔订单,示例: 20170808test01)。注:推荐使用 8-20 位的数字和字母组合,不允许特殊字符。
channel string 已经支持值:
amount int 订单总金额,必须大于0,单位为分
client_ip string 发起支付的客户端IP地址,Laravel 中 request()->getClientIp()
subject string 商品标题,该参数最长为 32 个 Unicode 字符。银联全渠道限制在 32 个字节;支付宝部分渠道不支持特殊字符。
body string 商品描述信息,该参数最长为 128 个 Unicode 字符。yeepay_wap 对于该参数长度限制为 100 个 Unicode 字符;支付宝部分渠道不支持特殊字符。
extra array 在微信公众号支付,小程序支付,需要传递openid。如:'extra' => ['openid' => \request('openid')]
time_expire timestamp 订单失效时间。时间范围在订单创建后的 1 分钟到 15 天,默认为 1 天,创建时间以 Ping++ 服务器时间为准。微信对该参数的时间范围在订单创建后的 1 分钟到 7 天,默认为 2 小时;upacp、upacp_pc、upacp_wap、cp_b2b、applepay_upacp 渠道对该参数的有效值限制为 1 小时内;upacp_b2b 对该参数的有效值限制为 1 天内;upacp_qr 渠道对该参数的有效期默认为 1 天,最大为 30 天。
metadata array 附属参数,会传递给微信和支付宝
description string 订单附件说明

返回值

发起支付请求后,微信通道会返回 charge 值,如下:

异步通知

本包会统一处理支付异步通知,可以通过配置文件来修改异步通知的 url。本报收到异步通知后,会执行 PayNotify::success($charge->type, $charge); 来通知业务方已经完成支付。

业务方在自己的代码中只需要做以下事情即可:

同步查询

通常的业务流程中支付完成后,会跳转到支付成功页面,此时需要去主动同步查询订单状态,防止异步通信异常导致订单状态未正确变更的问题。

配置项

执行 php artisan vendor:publish 后会发布配置文件 config/ibrand/pay.php

Resources

yansongda/pay

果酱云社区

点击跳转

点击跳转


All versions of pay with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
hidehalo/nanoid-php Version ^1.1
yansongda/pay Version ^2.5
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 ibrand/pay contains the following files

Loading the files please wait ....