Download the PHP package 18y/wechatpay without Composer

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

项目介绍

这是一个根据微信支付官方demo (wxpayapi_php_v3) 所制作的 namespace 版

如果没看过支付文档,建议先看看https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=7_1

官方的支付 sdk 已经很久未更新了,获取共享地址 editAddress 也早已废弃,

但是SDk 里面还有,因此踩了不少坑.. 共享地址最新使用方式 JS SDK

此 SDK 里面将官方的 SDK 调整为命名空间, 方便学习使用

使用方式

使用 Composer 安装

composer require 18y/wechatpay

composer 安装之后将 /vendor/18y/wechatpay/example 目录复制到与 /vendor 同一目录下即可运行

example 目录说明

native.php 刷卡支付(生成支付二维码),不能使用localhost,使用ip打开,可以看到效果

jsapi.php 公众号支付(js唤起支付),需要openid, 需要使用自己的正确配置

notify.php 支付成功回调地址,标志该笔订单支付成功。

配置文件所在位置

/vendor/18y/wechatpay/src/WxPayConfig.php

其他注意

微信支付目录填写规则

如支付页面为 http://127.0.0.1/wechat/pay.html
则支付目录为 http://127.0.0.1/wechat/
最后一个斜杠不能省略

使用tp框架时如 http://127.0.0.1/index/wechat/pay.html
则支付目录为 http://127.0.0.1/index/wechat/
最后一个斜杠不能省略

All versions of wechatpay with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.38
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 18y/wechatpay contains the following files

Loading the files please wait ....