PHP Class Pop\Payment\Adapter\AbstractAdapter

Author: Nick Sagona, III ([email protected])
Inheritance: implements Pop\Payment\Adapter\AdapterInterface
Afficher le fichier Open project: nicksagona/PopPHP

Protected Properties

Свойство Type Description
$approved boolean Boolean flag for approved transaction
$declined boolean Boolean flag for declined transaction
$error boolean Boolean flag for error transaction
$fields array Transaction fields for normalization purposes
$message string Response message
$requiredFields array Required fields
$response string Response string
$responseCode string Response code
$responseCodes array Response codes
$test boolean Boolean flag to use test environment or not
$transaction array Transaction data

Méthodes publiques

Méthode Description
getCode ( string $key ) : string Get specific response code from a field in the array
getMessage ( ) : integer Get response message
getResponse ( ) : string Get raw response
getResponseCode ( ) : string Get response code
getResponseCodes ( ) : array Get response codes
isApproved ( ) : boolean Return whether the transaction is approved
isDeclined ( ) : boolean Return whether the transaction is declined
isError ( ) : boolean Return whether the transaction is an error
isTest ( ) : boolean Return whether currently set to test environment
isValid ( ) : boolean Return whether the required transaction data is valid
send ( boolean $verifyPeer = true ) : mixed Send transaction
set ( array | string $data, string $value = null ) : mixed Set transaction data

Méthodes protégées

Méthode Description
filterCardNum ( string $ccNum ) : string Filter the card num to remove dashes or spaces
filterExpDate ( string $date, integer $length = 4 ) : string Filter the exp date
validate ( ) : boolean Validate that the required transaction data is set

Method Details

filterCardNum() protected méthode

Filter the card num to remove dashes or spaces
protected filterCardNum ( string $ccNum ) : string
$ccNum string
Résultat string

filterExpDate() protected méthode

Filter the exp date
protected filterExpDate ( string $date, integer $length = 4 ) : string
$date string
$length integer
Résultat string

getCode() public méthode

Get specific response code from a field in the array
public getCode ( string $key ) : string
$key string
Résultat string

getMessage() public méthode

Get response message
public getMessage ( ) : integer
Résultat integer

getResponse() public méthode

Get raw response
public getResponse ( ) : string
Résultat string

getResponseCode() public méthode

Get response code
public getResponseCode ( ) : string
Résultat string

getResponseCodes() public méthode

Get response codes
public getResponseCodes ( ) : array
Résultat array

isApproved() public méthode

Return whether the transaction is approved
public isApproved ( ) : boolean
Résultat boolean

isDeclined() public méthode

Return whether the transaction is declined
public isDeclined ( ) : boolean
Résultat boolean

isError() public méthode

Return whether the transaction is an error
public isError ( ) : boolean
Résultat boolean

isTest() public méthode

Return whether currently set to test environment
public isTest ( ) : boolean
Résultat boolean

isValid() public méthode

Return whether the required transaction data is valid
public isValid ( ) : boolean
Résultat boolean

send() abstract public méthode

Send transaction
abstract public send ( boolean $verifyPeer = true ) : mixed
$verifyPeer boolean
Résultat mixed

set() public méthode

Set transaction data
public set ( array | string $data, string $value = null ) : mixed
$data array | string
$value string
Résultat mixed

validate() protected méthode

Validate that the required transaction data is set
protected validate ( ) : boolean
Résultat boolean

Property Details

$approved protected_oe property

Boolean flag for approved transaction
protected bool $approved
Résultat boolean

$declined protected_oe property

Boolean flag for declined transaction
protected bool $declined
Résultat boolean

$error protected_oe property

Boolean flag for error transaction
protected bool $error
Résultat boolean

$fields protected_oe property

Transaction fields for normalization purposes
protected array $fields
Résultat array

$message protected_oe property

Response message
protected string $message
Résultat string

$requiredFields protected_oe property

Required fields
protected array $requiredFields
Résultat array

$response protected_oe property

Response string
protected string $response
Résultat string

$responseCode protected_oe property

Response code
protected string $responseCode
Résultat string

$responseCodes protected_oe property

Response codes
protected array $responseCodes
Résultat array

$test protected_oe property

Boolean flag to use test environment or not
protected bool $test
Résultat boolean

$transaction protected_oe property

Transaction data
protected array $transaction
Résultat array