Constants

SIGN_DIGEST_SHA1

SIGN_DIGEST_SHA1

SIGN_DIGEST_SHA256

SIGN_DIGEST_SHA256

SIGN_DIGEST_NONE

SIGN_DIGEST_NONE

Properties

$digests

$digests : array

Type

array — Valid Digests

$endpoint

$endpoint : string

Type

string — API URL Endpoint

$apiToken

$apiToken : string

Type

string — API Authentication Token

$signingKey

$signingKey : string

Type

string — Request Signing Key

$options

$options : array

Type

array

Methods

__construct()

__construct(  $endpoint,   $apiToken,   $signingKey = null, array  $options = array()) 

Client constructor.

Parameters

$endpoint
$apiToken
$signingKey
array $options
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

getHttpClient()

getHttpClient() : \MerchantAPI\Http\HttpClient

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

\MerchantAPI\Http\HttpClient

getEndpoint()

getEndpoint() : string

Get the endpoint URL.

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

string

setEndpoint()

setEndpoint(string  $endpoint) : \MerchantAPI\Client

Set the endpoint URL.

Parameters

string $endpoint
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

\MerchantAPI\Client

getApiToken()

getApiToken() : string

Get the authentication API token.

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

string

setApiToken()

setApiToken(string  $apiToken) : \MerchantAPI\Client

Set the authentication API token.

Parameters

string $apiToken
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

\MerchantAPI\Client

setOption()

setOption(  $key,   $value) : $this

Set a client option.

Parameters

$key
$value

Throws

\MerchantAPI\ClientException

Returns

$this

getOption()

getOption(  $key) : mixed

Get a client option.

Parameters

$key

Throws

\MerchantAPI\ClientException

Returns

mixed

getSigningKey()

getSigningKey() : string

Get the request signing key, base64 encoded.

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

string

setSigningKey()

setSigningKey(string  $signingKey) : \MerchantAPI\Client

Set the base64 encoded request signing key.

Parameters

string $signingKey
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/gidriss/miva/tools/api-sdk/sdk-tools/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

\MerchantAPI\Client

sendRequestLowLevel()

sendRequestLowLevel(array  $data, array  $query = array(), array  $headers = array()) : \MerchantAPI\Http\HttpResponse

Low level API Request function.

Parameters

array $data
array $query
array $headers

Throws

\MerchantAPI\ClientException

Returns

\MerchantAPI\Http\HttpResponse

generateAuthHeader()

generateAuthHeader(  $data) : string

Generates an authentication header for API request, including signature if required.

Parameters

$data

Throws

\MerchantAPI\ClientException

Returns

string

createRequest()

createRequest(  $name, array  $args = array()) : \MerchantAPI\RequestInterface

Create as new instance of request by name.

Parameters

$name
array $args

Throws

\InvalidArgumentException

Returns

\MerchantAPI\RequestInterface