PHP Class PFinal\Wechat\Service\JsService

Inheritance: extends BaseService
ファイルを表示 Open project: pfinal/wechat Class Usage Examples

Public Methods

Method Description
createNonceStr ( $length = 16 )
getJsApiTicket ( string $type = 'jsapi' ) : string 公众号用于调用微信JS接口的临时票据
getSignPackage ( $url = null ) : array 返回js sdk SignPackage

Method Details

createNonceStr() public static method

public static createNonceStr ( $length = 16 )

getJsApiTicket() public static method

http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html#.E9.99.84.E5.BD.951-JS-SDK.E4.BD.BF.E7.94.A8.E6.9D.83.E9.99.90.E7.AD.BE.E5.90.8D.E7.AE.97.E6.B3.95 jsapi_ticket 的type为jsapi (腾讯demo中的JSSDK.php代码中type为1 不知为何) 卡券 api_ticket 的type为 wx_card
public static getJsApiTicket ( string $type = 'jsapi' ) : string
$type string
return string

getSignPackage() public static method

[php] $signPackage = JsService::getSignPackage(); [/php]
public static getSignPackage ( $url = null ) : array
return array