BaseServiceHandler
AbstractYes
Table of Contents
Constants
- ACTIVE_URL = 'active'
- STREAM = 1
- STRING = 2
- TEST_URL = 'test'
Methods
- __construct() : mixed
- BaseServiceHandler constructor.
- createClone() : BaseServiceHandler
- creditNoDemand() : ServiceResult
- debitNoDemand() : ServiceResult
- getClientType() : string
- The type of client that the handler can work with
- getCurrencyList() : array<string|int, mixed>
- getDemoParams() : array<string|int, mixed>
- getDescription() : array<string|int, mixed>
- getHandlerModeList() : array<string|int, mixed>
- getHandlerType() : string
- getParamsBusValue() : array<string|int, mixed>
- initiatePay() : ServiceResult
- isClone() : bool
- isTuned() : bool
- OnEndBufferContent() : mixed
- setExtraParams() : mixed
- setInitiateMode() : mixed
- showTemplate() : ServiceResult
Constants
ACTIVE_URL
public
mixed
ACTIVE_URL
= 'active'
STREAM
public
mixed
STREAM
= 1
STRING
public
mixed
STRING
= 2
TEST_URL
public
mixed
TEST_URL
= 'test'
Methods
__construct()
BaseServiceHandler constructor.
public
__construct(mixed $type, Service $service) : mixed
Parameters
- $type : mixed
- $service : Service
createClone()
public
createClone(SplObjectStorage $cloneEntity) : BaseServiceHandler
Parameters
- $cloneEntity : SplObjectStorage
Return values
BaseServiceHandlercreditNoDemand()
public
creditNoDemand(Payment $payment) : ServiceResult
Parameters
- $payment : Payment
Return values
ServiceResultdebitNoDemand()
public
debitNoDemand(Payment $payment) : ServiceResult
Parameters
- $payment : Payment
Return values
ServiceResultgetClientType()
The type of client that the handler can work with
public
getClientType(string $psMode) : string
If, depending on PS_MODE, the handler can work with different types of clients, then you can implement validation in a similar way:
public function getClientType($psMode)
{
if ($psMode === self::MODE_ALFABANK)
{
return ClientType::B2B;
}
return ClientType::B2C;
}
Parameters
- $psMode : string
-
pay system type
Return values
stringgetCurrencyList()
public
abstract getCurrencyList() : array<string|int, mixed>
Return values
array<string|int, mixed>getDemoParams()
public
getDemoParams() : array<string|int, mixed>
Return values
array<string|int, mixed>getDescription()
public
getDescription() : array<string|int, mixed>
Return values
array<string|int, mixed>getHandlerModeList()
public
static getHandlerModeList() : array<string|int, mixed>
Return values
array<string|int, mixed>getHandlerType()
public
getHandlerType() : string
Return values
stringgetParamsBusValue()
public
getParamsBusValue([Payment $payment = null ]) : array<string|int, mixed>
Parameters
- $payment : Payment = null
Return values
array<string|int, mixed>initiatePay()
public
abstract initiatePay(Payment $payment[, Request|null $request = null ]) : ServiceResult
Parameters
- $payment : Payment
- $request : Request|null = null
Return values
ServiceResultisClone()
public
isClone() : bool
Return values
boolisTuned()
public
isTuned() : bool
Return values
boolOnEndBufferContent()
public
OnEndBufferContent(mixed &$content) : mixed
Parameters
- $content : mixed
setExtraParams()
public
setExtraParams(array<string|int, mixed> $values) : mixed
Parameters
- $values : array<string|int, mixed>
setInitiateMode()
public
setInitiateMode(int $mode) : mixed
Parameters
- $mode : int
showTemplate()
public
showTemplate([Payment|null $payment = null ][, string $template = '' ]) : ServiceResult
Parameters
- $payment : Payment|null = null
- $template : string = ''