PHP Class Pop\Payment\Payment

Author: Nick Sagona, III ([email protected])
Afficher le fichier Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Свойство Type Description
$adapter mixed Payment adapter
$fields array These are the common transaction fields that will be normalized to the proper field names by the adapter. You can also add direct adapter-specific fields to the payment transaction object that won't be affected by the field normalization, for example: (Authorize.net) $payment->x_invoice_num = '12345'; (UsaEPay) $payment->UMinvoice = '12345';

Méthodes publiques

Méthode Description
__construct ( AbstractAdapter $adapter ) : Payment Constructor
__get ( string $name ) : mixed Get method to return the value of fields[$name].
__isset ( string $name ) : boolean Return the isset value of fields[$name].
__set ( string $name, mixed $value ) : void Set method to set the property to the value of fields[$name].
__unset ( string $name ) : void Unset fields[$name].
adapter ( ) : AbstractAdapter Access the adapter
getCode ( string $key ) : string Get specific response code from a field in the array
getMessage ( ) : string 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 the transaction is in test mode
isValid ( ) : boolean Validate transaction data
send ( boolean $verifyPeer = true ) : void Send transaction data
shippingSameAsBilling ( ) : Payment Set the shipping data fields to the same as billing data fields

Method Details

__construct() public méthode

Instantiate the payment object
public __construct ( AbstractAdapter $adapter ) : Payment
$adapter Pop\Payment\Adapter\AbstractAdapter
Résultat Payment

__get() public méthode

Get method to return the value of fields[$name].
public __get ( string $name ) : mixed
$name string
Résultat mixed

__isset() public méthode

Return the isset value of fields[$name].
public __isset ( string $name ) : boolean
$name string
Résultat boolean

__set() public méthode

Set method to set the property to the value of fields[$name].
public __set ( string $name, mixed $value ) : void
$name string
$value mixed
Résultat void

__unset() public méthode

Unset fields[$name].
public __unset ( string $name ) : void
$name string
Résultat void

adapter() public méthode

Access the adapter
public adapter ( ) : AbstractAdapter
Résultat Pop\Payment\Adapter\AbstractAdapter

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 ( ) : string
Résultat string

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 the transaction is in test mode
public isTest ( ) : boolean
Résultat boolean

isValid() public méthode

Validate transaction data
public isValid ( ) : boolean
Résultat boolean

send() public méthode

Send transaction data
public send ( boolean $verifyPeer = true ) : void
$verifyPeer boolean
Résultat void

shippingSameAsBilling() public méthode

Set the shipping data fields to the same as billing data fields
public shippingSameAsBilling ( ) : Payment
Résultat Payment

Property Details

$adapter protected_oe property

Payment adapter
protected mixed $adapter
Résultat mixed

$fields protected_oe property

These are the common transaction fields that will be normalized to the proper field names by the adapter. You can also add direct adapter-specific fields to the payment transaction object that won't be affected by the field normalization, for example: (Authorize.net) $payment->x_invoice_num = '12345'; (UsaEPay) $payment->UMinvoice = '12345';
protected array $fields
Résultat array