andygoo / wxpay
Wxpay module for Kohana
1.0.4
2017-11-25 09:34 UTC
This package is not auto-updated.
Last update: 2024-09-29 01:25:14 UTC
README
【微信支付】API对应的SDK和调用示例。微信官方代码。仅为自动加载和配置文件做修改。
使用
require
composer require即可。参见 https://packagist.org/packages/andygoo/wxpay
配置
然后在kohana框架的config/wxpay.php 中添加相关配置:
return [ 'appid'=>'wx426b3015555a46be', 'mchid'=>'1225312702', 'key'=>'e10adc3949ba59abbe56e057f20f883e', 'appsecret'=>'01c6d59a3f9024db6336662ac95c8e74', 'sslcert_path'=>'../cert/apiclient_cert.pem', 'sslkey_path'=>'../cert/apiclient_key.pem', 'curl_proxy_host'=>'0.0.0.0', 'curl_proxy_port'=>0, 'report_levenl'=>1, ];
使用
相关类都声明在根命名空间下。
$wxpay=new \WxPayApi();