phpDocumentor

KlarnaHubCallbackClient
in package

Class KlarnaHubCallbackClient

Executes requests towards KlarnaHub callback endpoints.

Tags
subpackage

GambioHub

Table of Contents

$clientKey  : string
$orderNumber  : string
$url  : string
__construct()  : mixed
KlarnaHubCallbackClient constructor.
executeAddTrackingCode()  : mixed
Executes the add tracking code callback for the provided order.
executeCancelOrder()  : mixed
Executes the cancel order callback for hte provided order.
executeCapture()  : mixed
Executes the capture callback for the provided order.
executeFullCapture()  : mixed
Executes the full capture callback for the provided order.
executeReduceInvoiceAmount()  : mixed
Executes the reduce invoice amount callback for the provided order.
getKlarnaOrder()  : array<string|int, mixed>
Returns a Klarna order object.
_addDebugMessage()  : mixed
Adds a debug message if shop logging is enabled.
_getQueryParams()  : array<string|int, mixed>
Returns the query parameters as an associative array.

Properties

Methods

executeAddTrackingCode()

Executes the add tracking code callback for the provided order.

public executeAddTrackingCode(array<string|int, mixed> $addTrackingCodeData) : mixed
Parameters
$addTrackingCodeData : array<string|int, mixed>

Contains the required callback data (see KlarnaHub callback for further info).

Tags
throws
CurlRequestException
throws
InvalidHttpCodeException
throws
KlarnaHubException

If the response contains a Klarna API error response.

Return values
mixed

executeCancelOrder()

Executes the cancel order callback for hte provided order.

public executeCancelOrder() : mixed
Tags
throws
CurlRequestException
throws
InvalidHttpCodeException
throws
KlarnaHubException

If the response contains a Klarna API error response.

Return values
mixed

executeCapture()

Executes the capture callback for the provided order.

public executeCapture(array<string|int, mixed> $captureData) : mixed
Parameters
$captureData : array<string|int, mixed>

Contains the required callback data (see KlarnaHub callback for further info).

Tags
throws
CurlRequestException
throws
InvalidHttpCodeException
throws
KlarnaHubException

If the response contains a Klarna API error response.

Return values
mixed

executeFullCapture()

Executes the full capture callback for the provided order.

public executeFullCapture(array<string|int, mixed> $fullCaptureData) : mixed
Parameters
$fullCaptureData : array<string|int, mixed>

Contains the required callback data (see KlarnaHub callback for further info).

Tags
throws
CurlRequestException
throws
InvalidHttpCodeException
throws
KlarnaHubException

If the response contains a Klarna API error response.

Return values
mixed

executeReduceInvoiceAmount()

Executes the reduce invoice amount callback for the provided order.

public executeReduceInvoiceAmount(array<string|int, mixed> $reduceInvoiceAmountData) : mixed
Parameters
$reduceInvoiceAmountData : array<string|int, mixed>

Contains the required callback data (see KlarnaHub callback for further info).

Tags
throws
CurlRequestException
throws
InvalidHttpCodeException
throws
KlarnaHubException

If the response contains a Klarna API error response.

Return values
mixed

getKlarnaOrder()

Returns a Klarna order object.

public getKlarnaOrder() : array<string|int, mixed>
Tags
throws
CurlRequestException
throws
InvalidHttpCodeException
throws
KlarnaHubException

If the response contains a Klarna API error response.

Return values
array<string|int, mixed>

_addDebugMessage()

Adds a debug message if shop logging is enabled.

protected _addDebugMessage(string $message[, array<string|int, mixed> $context = [] ]) : mixed
Parameters
$message : string

Debug message to be logged.

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

Context values important for debugging.

Return values
mixed

_getQueryParams()

Returns the query parameters as an associative array.

protected _getQueryParams(string $action) : array<string|int, mixed>
Parameters
$action : string

Provide a valid action name.

Return values
array<string|int, mixed>

Search results