Constants

GET

GET = 'get'

POST

POST = 'post'

JSON

JSON = 'json'

API_SEND

API_SEND = 'https://api.mch.weixin.qq.com/mmpaymkttransfers/sendredpack'

API_SEND_GROUP

API_SEND_GROUP = 'https://api.mch.weixin.qq.com/mmpaymkttransfers/sendgroupredpack'

API_QUERY

API_QUERY = 'https://api.mch.weixin.qq.com/mmpaymkttransfers/gethbinfo'

API_PREPARE

API_PREPARE = 'https://api.mch.weixin.qq.com/mmpaymkttransfers/hbpreorder'

TYPE_NORMAL

TYPE_NORMAL = 'NORMAL'

TYPE_GROUP

TYPE_GROUP = 'GROUP'

RISK_NORMAL

RISK_NORMAL = 'NORMAL'

RISK_IGN_FREQ_LMT

RISK_IGN_FREQ_LMT = 'IGN_FREQ_LMT'

RISK_IGN_DAY_LMT

RISK_IGN_DAY_LMT = 'IGN_DAY_LMT'

RISK_IGN_FREQ_DAY_LMT

RISK_IGN_FREQ_DAY_LMT = 'IGN_FREQ_DAY_LMT'

Properties

$maxRetries

$maxRetries : integer

Type

integer

Methods

setHttp()

setHttp(\EasyWeChat\Core\Http  $http) : $this

Set the http instance.

Parameters

\EasyWeChat\Core\Http $http

Returns

$this

setAccessToken()

setAccessToken(\EasyWeChat\Core\AccessToken  $accessToken) : $this

Set the request token.

Parameters

\EasyWeChat\Core\AccessToken $accessToken

Returns

$this

maxRetries()

maxRetries(integer  $retries) 

Parameters

integer $retries

parseJSON()

parseJSON(string  $method, array  $args) : \EasyWeChat\Support\Collection

Parse JSON from response and check error.

Parameters

string $method
array $args

Returns

\EasyWeChat\Support\Collection

prepare()

prepare(array  $params) : \EasyWeChat\Support\Collection

Prepare luckymoney.

Parameters

array $params

Returns

\EasyWeChat\Support\Collection

query()

query(string  $mchBillNo) : \EasyWeChat\Support\Collection

Query luckymoney.

Parameters

string $mchBillNo

Returns

\EasyWeChat\Support\Collection

send()

send(array  $params, string  $type = self::TYPE_NORMAL) : \EasyWeChat\Support\Collection

Send LuckyMoney.

Parameters

array $params
string $type

Returns

\EasyWeChat\Support\Collection

sendNormal()

sendNormal(array  $params) : \EasyWeChat\Support\Collection

Send normal LuckyMoney.

Parameters

array $params

Returns

\EasyWeChat\Support\Collection

sendGroup()

sendGroup(array  $params) : \EasyWeChat\Support\Collection

Send group luckymoney.

Parameters

array $params

Returns

\EasyWeChat\Support\Collection

setMerchant()

setMerchant(\EasyWeChat\Payment\Merchant  $merchant) : $this

Merchant setter.

Parameters

\EasyWeChat\Payment\Merchant $merchant

Returns

$this

registerHttpMiddlewares()

registerHttpMiddlewares() 

Register Guzzle middlewares.

accessTokenMiddleware()

accessTokenMiddleware() : \Closure

Attache access token to request query.

Returns

\Closure

logMiddleware()

logMiddleware() : \Closure

Log the request.

Returns

\Closure

retryMiddleware()

retryMiddleware() : \Closure

Return retry middleware.

Returns

\Closure

checkAndThrow()

checkAndThrow(array  $contents) 

Check the array data errors, and Throw exception when the contents contains error.

Parameters

array $contents

Throws

\EasyWeChat\Core\Exceptions\HttpException

request()

request(string  $api, array  $params, string  $method = 'post') : \EasyWeChat\Support\Collection

Make a API request.

Parameters

string $api
array $params
string $method

Returns

\EasyWeChat\Support\Collection