phpDocumentor

HubCallbackApiClient
in package
implements HubCallbackApiClientInterface

Class HubCallbackApiClient

Tags
category

System

subpackage

GambioHub

Interfaces, Classes and Traits

HubCallbackApiClientInterface
Interface HubCallbackApiClientInterface

Table of Contents

$curlRequest  : CurlRequest
$hubSettings  : HubSettings
$logControl  : LogControl
$url  : string
__construct()  : mixed
HubCallbackApiClient constructor.
execute()  : HttpResponse
Executes Gambio Hub payment module callback.

Properties

Methods

__construct()

HubCallbackApiClient constructor.

public __construct(string $url, CurlRequest $curlRequest, LogControl $logControl, HubSettings $hubSettings) : mixed
Parameters
$url : string

Gambio Hub API URL

$curlRequest : CurlRequest

Make cURL requests to the Hub API.

$logControl : LogControl

Log communication error information.

$hubSettings : HubSettings

Hub settings.

Tags
throws
InvalidArgumentException

If the $url argument is not a string or not a valid URL.

Return values
mixed

execute()

Executes Gambio Hub payment module callback.

public execute(string $paymentModuleCode[, bool $isPostRequest = false ][, array<string|int, mixed> $getData = [] ][, array<string|int, mixed> $postData = [] ][, array<string|int, mixed> $headers = [] ]) : HttpResponse
Parameters
$paymentModuleCode : string

Gambio Hub Payment Module Code

$isPostRequest : bool = false

Flag, if url will be executed via GET or POST

$getData : array<string|int, mixed> = []

GET data as an array

$postData : array<string|int, mixed> = []

POST data as an array

$headers : array<string|int, mixed> = []

Headers as an array like ['X-Custom-Header: Foo']

Tags
throws
InvalidArgumentException

If $paymentModuleCode argument is not a string.

throws
UnexpectedValueException

If the server responses with status code different to 201.

Return values
HttpResponse

Returns the HTTP response

Search results