\wxjssdk

Summary

Methods
Properties
Constants
__construct()
getSignPackage()
createNonceStr()
getJsApiTicket()
getAccessToken()
httpGet()
unifiedOrder()
ToXml()
$CI
$appid
$appsecret
$mchid
$key
No constants found
No protected methods found
No protected properties found
N/A
postXmlCurl()
getMillisecond()
No private properties found
N/A

Properties

$CI

$CI : 

Type

$appid

$appid : 

Type

$appsecret

$appsecret : 

Type

$mchid

$mchid : 

Type

$key

$key : 

Type

Methods

__construct()

__construct() 

getSignPackage()

getSignPackage() 

createNonceStr()

createNonceStr(  $length = 16) 

Parameters

$length

getJsApiTicket()

getJsApiTicket() 

getAccessToken()

getAccessToken() 

httpGet()

httpGet(  $url) 

Parameters

$url

unifiedOrder()

unifiedOrder(  $total_fee, integer  $timeOut = 6) : \成功时返回,其他抛异常

统一下单,WxPayUnifiedOrder中out_trade_no、body、total_fee、trade_type必填 appid、mchid、spbill_create_ip、nonce_str不需要填入

Parameters

$total_fee
integer $timeOut

Throws

\WxPayException

Returns

\成功时返回,其他抛异常

ToXml()

ToXml(  $arr) 

输出xml字符

Parameters

$arr

Throws

\WxPayException

postXmlCurl()

postXmlCurl(string  $xml, string  $url, boolean  $useCert = false, integer  $second = 30) 

以post方式提交xml到对应的接口url

Parameters

string $xml

需要post的xml数据

string $url

url

boolean $useCert

是否需要证书,默认不需要

integer $second

url执行超时时间,默认30s

getMillisecond()

getMillisecond() 

获取毫秒级别的时间戳