PHP Class 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 }
Inheritance: extends Braintree\Base
Datei anzeigen Open project: braintree/braintree_php

Public Properties

Property Type Description
$success always false

Public Methods

Method Description
__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"

Method Details

__construct() public method

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

__toString() public method

create a printable representation of the object as: ClassName[property=value, property=value]
public __toString ( ) : string
return string

valueForHtmlField() public method

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
return string

Property Details

$success public_oe property

always false
public $success