phpDocumentor

AfterbuyXmlResponseValidator

Class AfterbuyXmlResponseValidator

Table of Contents

CALL_STATUS_SUCCESS  = 'Success'
$logger  : AfterbuyLogger
__construct()  : mixed
AfterbuyXmlResponseValidator constructor.
validate()  : void
collectErrorsFromXML()  : array<string|int, mixed>
Collects errors from the Afterbuy response xml if available.
getCallStatus()  : string
isSuccessful()  : bool
Checks if call status matches 'success'.
tryGetXmlElement()  : SimpleXMLElement|null
Tries to get a xml element's property as xml element.
tryGetXmlString()  : string|null
Tries to get a xml element's property as string.

Constants

Properties

Methods

collectErrorsFromXML()

Collects errors from the Afterbuy response xml if available.

private collectErrorsFromXML(SimpleXMLElement $xmlResponse) : array<string|int, mixed>
Parameters
$xmlResponse : SimpleXMLElement
Return values
array<string|int, mixed>

isSuccessful()

Checks if call status matches 'success'.

private isSuccessful(string $callStatus) : bool
Parameters
$callStatus : string
Return values
bool

tryGetXmlElement()

Tries to get a xml element's property as xml element.

private tryGetXmlElement(SimpleXMLElement $xml, string $property) : SimpleXMLElement|null
Parameters
$xml : SimpleXMLElement
$property : string
Return values
SimpleXMLElement|null

tryGetXmlString()

Tries to get a xml element's property as string.

private tryGetXmlString(SimpleXMLElement $xml, string $property) : string|null
Parameters
$xml : SimpleXMLElement
$property : string
Return values
string|null

Search results