KlarnaHubCallbackClient
in package
Class KlarnaHubCallbackClient
Executes requests towards KlarnaHub callback endpoints.
Tags
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
$clientKey
protected
string
$clientKey
$orderNumber
protected
string
$orderNumber
$url
protected
string
$url
Methods
__construct()
KlarnaHubCallbackClient constructor.
public
__construct(NonEmptyStringType $url, HubClientKey $clientKey, NonEmptyStringType $orderNumber) : mixed
Parameters
- $url : NonEmptyStringType
- $clientKey : HubClientKey
- $orderNumber : NonEmptyStringType
Return values
mixed —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
Return values
mixed —executeCancelOrder()
Executes the cancel order callback for hte provided order.
public
executeCancelOrder() : mixed
Tags
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
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
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
Return values
mixed —getKlarnaOrder()
Returns a Klarna order object.
public
getKlarnaOrder() : array<string|int, mixed>
Tags
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.