PHP Класс PayWithAmazon\IpnHandler

Наследование: implements paywithamazon\IpnHandlerInterface, implements Psr\Log\LoggerAwareInterface
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( $headers, $body, $ipnConfig = null )
__get ( $name ) * Getter function Returns the value for the key if the key exists in ipnConfig
__set ( $name, $value ) * Setter function Sets the value for the key if the key exists in ipnConfig
returnMessage ( ) * returnMessage() - JSON decode the raw [Message] portion of the IPN
setLogger ( Psr\Log\LoggerInterface $logger = null )
toArray ( ) * toArray() - Converts IPN [Message] field to associative array
toJson ( ) * toJson() - Converts IPN [Message] field to JSON
verifySignatureIsCorrectFromCertificate ( $signature ) * Verify that the signature is correct for the given data and public key

Приватные методы

Метод Описание
checkConfigKeys ( $ipnConfig )
checkForCorrectMessageType ( ) * checkForCorrectMessageType()
constructAndVerifySignature ( ) * Verify that the signature is correct for the given data and public key
getCertificate ( $certificatePath ) * getCertificate($certificatePath)
getErrorMessageForJsonError ( $json_error ) * Convert a json error code to a descriptive error message
getField ( $fieldName ) * Extract the field if present, return null if not defined
getMandatoryField ( $fieldName ) * Extract the mandatory field from the message and return the contents
getMessage ( )
getRemainingIpnFields ( ) * getRemainingIpnFields() Gets the remaining fields of the IPN to be later appended to the return message
logMessage ( $message ) * Helper function to log data within the Client
sanitizeResponseData ( $input )
simpleXmlObject ( ) * addRemainingFields() - Add remaining fields to the datatype
trimArray ( $array ) * Trim the input Array key values
validateHeaders ( )
validateUrl ( $url ) * Ensures that the URL of the certificate is one belonging to AWS.

Описание методов

__construct() публичный Метод

public __construct ( $headers, $body, $ipnConfig = null )

__get() публичный Метод

* Getter function Returns the value for the key if the key exists in ipnConfig
public __get ( $name )

__set() публичный Метод

* Setter function Sets the value for the key if the key exists in ipnConfig
public __set ( $name, $value )

returnMessage() публичный Метод

* returnMessage() - JSON decode the raw [Message] portion of the IPN
public returnMessage ( )

setLogger() публичный Метод

public setLogger ( Psr\Log\LoggerInterface $logger = null )
$logger Psr\Log\LoggerInterface

toArray() публичный Метод

* toArray() - Converts IPN [Message] field to associative array
public toArray ( )

toJson() публичный Метод

Has child elements ['NotificationData'] [XML] - API call XML notification data
public toJson ( )

verifySignatureIsCorrectFromCertificate() публичный Метод

* Verify that the signature is correct for the given data and public key
public verifySignatureIsCorrectFromCertificate ( $signature )
$signature decoded signature to compare against