PHP Класс Braintree\Result\Error

An Error Result will be returned from gateway methods when the gateway responds with an error. It will provide access to the original request. For example, when voiding a transaction, Error Result will respond to the void request if it failed: $result = Transaction::void('abc123'); if ($result->success) { Successful Result } else { Result\Error }
Наследование: extends Braintree\Base
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$success always false

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

Метод Описание
__construct ( array $response ) overrides default constructor
__toString ( ) : string create a printable representation of the object as: ClassName[property=value, property=value]
valueForHtmlField ( string $field ) : string return original value for a field For example, if a user tried to submit 'invalid-email' in the html field transaction[customer][email], $result->valueForHtmlField("transaction[customer][email]") would yield "invalid-email"

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

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

overrides default constructor
public __construct ( array $response )
$response array gateway response array

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

create a printable representation of the object as: ClassName[property=value, property=value]
public __toString ( ) : string
Результат string

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

return original value for a field For example, if a user tried to submit 'invalid-email' in the html field transaction[customer][email], $result->valueForHtmlField("transaction[customer][email]") would yield "invalid-email"
public valueForHtmlField ( string $field ) : string
$field string
Результат string

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

$success публичное свойство

always false
public $success