phpDocumentor

HubClientKeysApiClientInterface

Interface HubClientKeysApiClientInterface

Tags
category

System

subpackage

GambioHub

Table of Contents

createClientKey()  : HubClientKey
Creates a client key in the Gambio Hub.

Methods

createClientKey()

Creates a client key in the Gambio Hub.

public createClientKey(AuthHash $authHash, string $shopUrl, string $shopVersion) : HubClientKey

Provide an authorization hash that can be later used in the hub callbacks to determine where each session key belongs to. This method will additionally save the AuthHash value to the PHP session with the key 'gambio_hub_auth_hash' for later reference.

Parameters
$authHash : AuthHash

The authorization hash to be used.

$shopUrl : string

Shop URL (with trailing slash).

$shopVersion : string

Current shop version (without leading "v").

Tags
throws
UnexpectedValueException

If the server responses with status code different to 201.

Return values
HubClientKey

Returns the new client key.

Search results