\serviceWxpayService

微信扫码支付 Class WxpayService

Summary

Methods
Properties
Constants
__construct()
createJsBizPackage()
notify()
curlGet()
curlPost()
createNonceStr()
arrayToXml()
getSign()
No public properties found
No constants found
formatQueryParaMap()
$mchid
$appid
$apiKey
N/A
No private methods found
No private properties found
N/A

Properties

$mchid

$mchid : 

Type

$appid

$appid : 

Type

$apiKey

$apiKey : 

Type

Methods

__construct()

__construct(  $mchid,   $appid,   $key) 

Parameters

$mchid
$appid
$key

createJsBizPackage()

createJsBizPackage(float  $totalFee, string  $outTradeNo, string  $orderName, string  $notifyUrl, string  $timestamp) : array

发起订单

Parameters

float $totalFee

收款总费用 单位元

string $outTradeNo

唯一的订单号

string $orderName

订单名称

string $notifyUrl

支付结果通知url 不要有问号

string $timestamp

订单发起时间

Returns

array

notify()

notify() 

curlGet()

curlGet(string  $url = '', array  $options = array()) : mixed

curl get

Parameters

string $url
array $options

Returns

mixed

curlPost()

curlPost(  $url = '',   $postData = '',   $options = array()) 

Parameters

$url
$postData
$options

createNonceStr()

createNonceStr(  $length = 16) 

Parameters

$length

arrayToXml()

arrayToXml(  $arr) 

Parameters

$arr

getSign()

getSign(  $params,   $key) 

获取签名

Parameters

$params
$key

formatQueryParaMap()

formatQueryParaMap(  $paraMap,   $urlEncode = false) 

Parameters

$paraMap
$urlEncode