yuxiaoyang/getwxopenid
Laravel 5.1 微信JSAPI支付中获取openid
使用示例
生成openid参数示例代码
composer require yuxiaoyang/getwxopenid
或者在你的 composer.json 的 require 部分中添加:
"yuxiaoyang/getwxopenid": "~1.0"
下载完毕之后,直接配置 config/app.php 的 providers:
//Illuminate\Hashing\HashServiceProvider::class,
Yuxiaoyang\GetwxOpenid\GetwxOpenidProvider::class,
控制器中使用 WxpayController.php :
<?php
use \Yuxiaoyang\GetwxOpenid\GetwxOpenid;
class WxpayController extends Controller
{
public $getwxopenid;
//获取JSAPI openid
public function getopenid()
{
//创建示例对象
$this->getwxopenid = new GetwxOpenid();
$data = $this->getwxopenid->getOpenid();
return $data;
}
}
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
648,266,899
9,701
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
429,221,767
607
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
403,217,078
4,664
Version History
| Version | Released | License |
|---|---|---|
| 1.0 | MIT |