\WePayTransfers

微信商户打款到零钱 Class Transfers

Summary

Methods
Properties
Constants
__construct()
instance()
getNotify()
getNotifySuccessReply()
getPaySign()
shortUrl()
toXml()
create()
query()
No public properties found
No constants found
callPostApi()
$config
$params
$cache
N/A
No private methods found
No private properties found
N/A

Properties

$cache

$cache : static

静态缓存

Type

static

Methods

__construct()

__construct(array  $options) 

WeChat constructor.

Parameters

array $options

instance()

instance(array  $config) : static

静态创建对象

Parameters

array $config

Returns

static

getNotify()

getNotify() : array

获取微信支付通知

Throws

\WeChat\Exceptions\InvalidResponseException

Returns

array

getNotifySuccessReply()

getNotifySuccessReply() : string

获取微信支付通知回复内容

Returns

string

getPaySign()

getPaySign(array  $data, string  $signType = 'MD5', string  $buff = '') : string

生成支付签名

Parameters

array $data

参与签名的数据

string $signType

参与签名的类型

string $buff

参与签名字符串前缀

Returns

string

shortUrl()

shortUrl(string  $longUrl) : array

转换短链接

Parameters

string $longUrl

需要转换的URL,签名用原串,传输需URLencode

Throws

\WeChat\Exceptions\InvalidResponseException
\WeChat\Exceptions\LocalCacheException

Returns

array

toXml()

toXml(array  $data, boolean  $isReturn = false) : string

数组直接转xml数据输出

Parameters

array $data
boolean $isReturn

Returns

string

create()

create(array  $options) : array

企业付款到零钱

Parameters

array $options

Throws

\WeChat\Exceptions\InvalidResponseException
\WeChat\Exceptions\LocalCacheException

Returns

array

query()

query(string  $partnerTradeNo) : array

查询企业付款到零钱

Parameters

string $partnerTradeNo

商户调用企业付款API时使用的商户订单号

Throws

\WeChat\Exceptions\InvalidResponseException
\WeChat\Exceptions\LocalCacheException

Returns

array

callPostApi()

callPostApi(string  $url, array  $data, boolean  $isCert = false, string  $signType = 'HMAC-SHA256', boolean  $needSignType = true) : array

以Post请求接口

Parameters

string $url

请求

array $data

接口参数

boolean $isCert

是否需要使用双向证书

string $signType

数据签名类型 MD5|SHA256

boolean $needSignType

是否需要传签名类型参数

Throws

\WeChat\Exceptions\InvalidResponseException
\WeChat\Exceptions\LocalCacheException

Returns

array