Download the PHP package min-radish/php-wechat-pay without Composer

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

微信支付

需自定义一个类并继承 Radish\WeChatPay\WeChatPay重写构造函数进行相关配置

自定义相关参数保存调用接口凭证

public function cacheGet($key, $default = false);

public function cacheSet($key, $val, $timeout = 7140);

api示例说明

    $wechatPay = new WeChatPay();
    $wechatPay->sendRedPackent($options)

options 示例

    $mchbillno = $wechatPay->orderNo('建议相关表ID | 也可不传');
    $params = [
        'mch_billno' => $mchbillno,//'商户订单号(每个订单号必须唯一。取值范围:0~9,a~z,A~Z接口根据商户订单号支持重入,如出现超时可再调用。'
        'send_name' => 'Radish',//'商户名称 红包发送者名称  注意:敏感词会被转义成字符*'
        'open_id' => open_id,//'open_id 微信号在微信公众号唯一标识'
        'total_amount' => 0.5 * 100,//'付款金额,单位分'
        'wishing' => '',//'红包祝福语注意:敏感词会被转义成字符*'
        'act_name' => '',//'活动名称注意:敏感词会被转义成字符*'
        'remark' => '',//'备注信息'
        'scene_id' => '',//'场景id发放红包使用场景,红包金额大于200或者小于1元时必传'
    ];

配置相关

根据个人仍情况整理
[
    'appId' => '微信公众号APPID',
    'appSecret' => '微信公众号APPSECRET',
    'pay' => [
        'mchId' => '商户号',
        'key' => '商户秘钥',
        'serverIp' => '服务器IP',
        'apiclientCert' => 证书路径, 
        'apiclientKey' => 证书路径, 
    ],
];

All versions of php-wechat-pay with dependencies

PHP Build Version
Package Version
Requires php Version >=5.0.0
min-radish/php-curl 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 min-radish/php-wechat-pay contains the following files

Loading the files please wait ...