PHP Класс Pop\Payment\Payment

Автор: Nick Sagona, III ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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';

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

Метод Описание
__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

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

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

Instantiate the payment object
public __construct ( AbstractAdapter $adapter ) : Payment
$adapter Pop\Payment\Adapter\AbstractAdapter
Результат Payment

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

Get method to return the value of fields[$name].
public __get ( string $name ) : mixed
$name string
Результат mixed

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

Return the isset value of fields[$name].
public __isset ( string $name ) : boolean
$name string
Результат boolean

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

Set method to set the property to the value of fields[$name].
public __set ( string $name, mixed $value ) : void
$name string
$value mixed
Результат void

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

Unset fields[$name].
public __unset ( string $name ) : void
$name string
Результат void

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

Access the adapter
public adapter ( ) : AbstractAdapter
Результат Pop\Payment\Adapter\AbstractAdapter

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

Get specific response code from a field in the array
public getCode ( string $key ) : string
$key string
Результат string

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

Get response message
public getMessage ( ) : string
Результат string

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

Get raw response
public getResponse ( ) : string
Результат string

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

Get response code
public getResponseCode ( ) : string
Результат string

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

Get response codes
public getResponseCodes ( ) : array
Результат array

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

Return whether the transaction is approved
public isApproved ( ) : boolean
Результат boolean

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

Return whether the transaction is declined
public isDeclined ( ) : boolean
Результат boolean

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

Return whether the transaction is an error
public isError ( ) : boolean
Результат boolean

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

Return whether the transaction is in test mode
public isTest ( ) : boolean
Результат boolean

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

Validate transaction data
public isValid ( ) : boolean
Результат boolean

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

Send transaction data
public send ( boolean $verifyPeer = true ) : void
$verifyPeer boolean
Результат void

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

Set the shipping data fields to the same as billing data fields
public shippingSameAsBilling ( ) : Payment
Результат Payment

Описание свойств

$adapter защищенное свойство

Payment adapter
protected mixed $adapter
Результат mixed

$fields защищенное свойство

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
Результат array