public function Braintree_Transaction::__toString in Commerce Braintree 7
returns a string representation of the transaction
Return value
string
File
- braintree_php/
lib/ Braintree/ Transaction.php, line 533
Class
- Braintree_Transaction
- Creates and manages transactions
Code
public function __toString() {
// array of attributes to print
$display = array(
'id',
'type',
'amount',
'status',
'createdAt',
'creditCardDetails',
'customerDetails',
);
$displayAttributes = array();
foreach ($display as $attrib) {
$displayAttributes[$attrib] = $this->{$attrib};
}
return __CLASS__ . '[' . Braintree_Util::attributesToString($displayAttributes) . ']';
}