Download the PHP package shenstef/wechatpay-guzzle-middleware without Composer

On this page you can find all versions of the php package shenstef/wechatpay-guzzle-middleware. 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 wechatpay-guzzle-middleware

wechatpay-guzzle-middleware

概览

微信支付API v3Guzzle HttpClient中间件Middleware,实现了请求签名的生成和应答签名的验证。

如果你是使用Guzzle的商户开发者,可以在构造GuzzleHttp\Client时将WechatPayGuzzleMiddleware传入,得到的GuzzleHttp\Client实例在执行请求时将自动携带身份认证信息,并检查应答的微信支付签名。

项目状态

当前版本为0.2.0测试版本。请商户的专业技术人员在使用时注意系统和软件的正确性和兼容性,以及带来的风险。

环境要求

我们开发和测试使用的环境如下:

安装

可以使用PHP包管理工具composer引入SDK到项目中:

Composer

方式:在项目目录中,通过composer命令行添加:

开始

首先,通过WechatPayMiddlewareBuilder构建一个WechatPayMiddleware,然后将其加入GuzzleHttp\ClientHandlerStack中。我们提供相应的方法,可以方便的传入商户私钥和微信支付平台证书等信息。

上传媒体文件

敏感信息加/解密

定制

当默认的本地签名和验签方式不适合你的系统时,你可以通过实现Signer或者Verifier来定制签名和验签。比如,你的系统把商户私钥集中存储,业务系统需通过远程调用进行签名,你可以这样做。

常见问题

如何下载平台证书?

使用WechatPayMiddlewareBuilder需要调用withWechatpay设置微信支付平台证书,而平台证书又只能通过调用获取平台证书接口下载。为了解开"死循环",你可以在第一次下载平台证书时,按照下述方法临时"跳过”应答签名的验证。

注意:业务请求请使用标准的初始化流程,务必验证应答签名。

证书和回调解密需要的AesGcm解密在哪里?

请参考AesUtil.php。

联系我们

如果你发现了BUG或者有任何疑问、建议,请通过issue进行反馈。

也欢迎访问我们的开发者社区


All versions of wechatpay-guzzle-middleware with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
ext-openssl Version *
ext-mbstring 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 shenstef/wechatpay-guzzle-middleware contains the following files

Loading the files please wait ....