Service
Class Service
Table of Contents
Constants
- ANSWER_ERROR_NO_CODE = '002'
- ANSWER_ERROR_NO_EXT_ID = '003'
- ANSWER_ERROR_NO_PAYLOAD = '004'
- ANSWER_ERROR_NO_SEC_CODE = '005'
- ANSWER_ERROR_SYSTEM = '001'
- ANSWER_ERROR_WRONG_SEC_CODE = '006'
Methods
- __construct() : mixed
- Service constructor.
- checkSecurityCode() : bool
- Check security code.
- create() : static
- Create instance.
- getErrorCollection() : ErrorCollection
- Get error collection.
- handle() : $this
- Handle web hook.
- listen() : void
- Listen web hooks.
- register() : bool
- Register web hook.
- registerForm() : mixed
- remove() : bool
- Remove web hook.
- unregisterForm() : mixed
Constants
ANSWER_ERROR_NO_CODE
public
mixed
ANSWER_ERROR_NO_CODE
= '002'
ANSWER_ERROR_NO_EXT_ID
public
mixed
ANSWER_ERROR_NO_EXT_ID
= '003'
ANSWER_ERROR_NO_PAYLOAD
public
mixed
ANSWER_ERROR_NO_PAYLOAD
= '004'
ANSWER_ERROR_NO_SEC_CODE
public
mixed
ANSWER_ERROR_NO_SEC_CODE
= '005'
ANSWER_ERROR_SYSTEM
public
mixed
ANSWER_ERROR_SYSTEM
= '001'
ANSWER_ERROR_WRONG_SEC_CODE
public
mixed
ANSWER_ERROR_WRONG_SEC_CODE
= '006'
Methods
__construct()
Service constructor.
public
__construct(string $type, string $externalId) : mixed
Parameters
- $type : string
-
Type.
- $externalId : string
-
External ID.
checkSecurityCode()
Check security code.
public
checkSecurityCode(string $securityCode) : bool
Parameters
- $securityCode : string
-
Code.
Return values
boolcreate()
Create instance.
public
static create(string $type, string $externalId) : static
Parameters
- $type : string
-
Type.
- $externalId : string
-
External ID.
Return values
staticgetErrorCollection()
Get error collection.
public
getErrorCollection() : ErrorCollection
Return values
ErrorCollectionhandle()
Handle web hook.
public
handle(Batch $payload) : $this
Parameters
- $payload : Batch
-
Payload instance.
Return values
$thislisten()
Listen web hooks.
public
static listen() : void
register()
Register web hook.
public
register([array<string|int, mixed> $parameters = [] ]) : bool
Parameters
- $parameters : array<string|int, mixed> = []
-
Parameters.
Return values
boolregisterForm()
public
static registerForm(mixed $formId) : mixed
Parameters
- $formId : mixed
remove()
Remove web hook.
public
remove() : bool
Return values
boolunregisterForm()
public
static unregisterForm(mixed $formId) : mixed
Parameters
- $formId : mixed