GET
GET = 'get'
Class API.
$http : \EasyWeChat\Core\Http
Http instance.
$accessToken : \EasyWeChat\Core\AccessToken
The request token.
$merchant : \EasyWeChat\Payment\Merchant
Merchant instance.
__construct(\EasyWeChat\Payment\Merchant $merchant)
API constructor.
\EasyWeChat\Payment\Merchant | $merchant |
getHttp() : \EasyWeChat\Core\Http
Return the http instance.
setHttp(\EasyWeChat\Core\Http $http) : $this
Set the http instance.
\EasyWeChat\Core\Http | $http |
getAccessToken() : \EasyWeChat\Core\AccessToken
Return the current accessToken.
setAccessToken(\EasyWeChat\Core\AccessToken $accessToken) : $this
Set the request token.
\EasyWeChat\Core\AccessToken | $accessToken |
parseJSON(string $method, array $args) : \EasyWeChat\Support\Collection
Parse JSON from response and check error.
string | $method | |
array | $args |
| null
send(array $params) : \EasyWeChat\Support\Collection
send a cash coupon.
array | $params |
queryStock(array $params) : \EasyWeChat\Support\Collection
query a coupon stock.
array | $params |
query(array $params) : \EasyWeChat\Support\Collection
query a info of coupon.
array | $params |
setMerchant(\EasyWeChat\Payment\Merchant $merchant) : $this
Merchant setter.
\EasyWeChat\Payment\Merchant | $merchant |
getMerchant() : \EasyWeChat\Payment\Merchant
Merchant getter.
request(string $api, array $params, string $method = 'post') : \EasyWeChat\Support\Collection
Make a API request.
string | $api | |
array | $params | |
string | $method |
parseResponse(\Psr\Http\Message\ResponseInterface|string $response) : \EasyWeChat\Support\Collection
Parse Response XML to array.
\Psr\Http\Message\ResponseInterface|string | $response |