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
}
Показать файл
Открыть проект
Открытые свойства
Свойство |
Тип |
Описание |
|
$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
__toString()
публичный Метод
create a printable representation of the object as:
ClassName[property=value, property=value]
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"
Описание свойств
$success публичное свойство