Download the PHP package ethenoscar2011/pt-wechatpay-php without Composer

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

微信支付 WeChatPay OpenAPI SDK (PHP 5.6+ 兼容版)

[A]Sync Chainable WeChatPay v2&v3's OpenAPI SDK for PHP - 兼容 PHP 5.6+

Packagist Stars Packagist Downloads Packagist Version Packagist PHP Version Support Packagist License

概览

基于 Guzzle HTTP Client 的微信支付 PHP 开发库,兼容 PHP 5.6+ 版本。

功能介绍

  1. 微信支付 APIv2 和 APIv3 的 Guzzle HTTP 客户端,支持 异步 发送请求,并自动进行请求签名和应答验签

  2. 链式实现的 URI Template

  3. 敏感信息加解密

  4. 回调通知的验签和解密

项目状态

当前版本为 1.4.12 版,基于官方 wechatpay-php 重构,兼容 PHP 5.6+ 版本。 项目版本遵循 语义化版本号

环境要求

项目支持的环境如下:

我们推荐使用目前处于 Active Support 阶段的 PHP 8 和 Guzzle 7。

安装

推荐使用 PHP 包管理工具 Composer 安装 SDK:

开始

:information_source: 以下是 微信支付 API v3 的指引。如果你是 API v2 的使用者,请看 README_APIv2。

概念

初始化一个APIv3客户端

示例,第一个请求:查询「微信支付平台证书」

与官方版本的主要差异

本版本基于官方 wechatpay-php 重构,主要变化包括:

  1. 移除严格类型声明:去除了 declare(strict_types=1) 和所有类型声明,兼容 PHP 5.6
  2. 移除 PHP 7+ 特性:去除了 #[\SensitiveParameter] 属性、变长参数等
  3. 调整依赖版本:确保 Guzzle 版本兼容 PHP 5.6
  4. 保持功能完整性:所有核心功能保持不变,API 接口完全兼容

兼容性测试

本版本已在以下 PHP 版本中测试通过:

常见问题

如何下载平台证书?

使用内置的微信支付平台证书下载器。

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

请参考AesGcm.php,例如内置的平台证书下载工具解密代码如下:

如何加载公/私钥和证书

v1.2提供了统一的加载函数 Rsa::from($thing, $type)

联系我们

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

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

链接

License

Apache-2.0 License


All versions of pt-wechatpay-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-curl Version *
ext-libxml Version *
ext-openssl Version *
ext-simplexml Version *
guzzlehttp/guzzle Version ^6.0
spomky-labs/php-aes-gcm 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 ethenoscar2011/pt-wechatpay-php contains the following files

Loading the files please wait ...