예제 #1
0
 public function __toString()
 {
     $display = array('amount', 'reason', 'status', 'replyByDate', 'receivedDate', 'currencyIsoCode');
     $displayAttributes = array();
     foreach ($display as $attrib) {
         $displayAttributes[$attrib] = $this->{$attrib};
     }
     return __CLASS__ . '[' . Braintree_Util::attributesToString($displayAttributes) . ']';
 }
예제 #2
0
 public function __toString()
 {
     $display = array('id', 'merchantAccountDetails', 'exceptionMessage', 'amount', 'disbursementDate', 'followUpAction', 'retry', 'success', 'transactionIds');
     $displayAttributes = array();
     foreach ($display as $attrib) {
         $displayAttributes[$attrib] = $this->{$attrib};
     }
     return __CLASS__ . '[' . Braintree_Util::attributesToString($displayAttributes) . ']';
 }
예제 #3
0
 /**
  * returns a string representation of the customer
  * @return string
  */
 public function __toString()
 {
     $excludedAttributes = array('statusHistory');
     $displayAttributes = array();
     foreach ($this->_attributes as $key => $val) {
         if (!in_array($key, $excludedAttributes)) {
             $displayAttributes[$key] = $val;
         }
     }
     return __CLASS__ . '[' . Braintree_Util::attributesToString($displayAttributes) . ']';
 }
예제 #4
0
 /**
  * create a printable representation of the object as:
  * ClassName[property=value, property=value]
  * @return string
  */
 public function __toString()
 {
     return __CLASS__ . '[' . Braintree_Util::attributesToString($this->_attributes) . ']';
 }
예제 #5
0
 /**
  * returns a string representation of the transaction
  * @return string
  */
 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) . ']';
 }
예제 #6
0
 public static function attributesToString($attributes)
 {
     $printableAttribs = array();
     foreach ($attributes as $key => $value) {
         if (is_array($value)) {
             $pAttrib = Braintree_Util::attributesToString($value);
         } else {
             if ($value instanceof DateTime) {
                 $pAttrib = $value->format(DateTime::RFC850);
             } else {
                 $pAttrib = $value;
             }
         }
         $printableAttribs[$key] = sprintf('%s', $pAttrib);
     }
     return Braintree_Util::implodeAssociativeArray($printableAttribs);
 }
예제 #7
0
 public function __toString()
 {
     return get_called_class() . '[' . Braintree_Util::attributesToString($this->_attributes) . ']';
 }
예제 #8
0
파일: Error.php 프로젝트: Flesh192/magento
 /**
  * create a printable representation of the object as:
  * ClassName[property=value, property=value]
  * @ignore
  * @return var
  */
 public function __toString()
 {
     $output = Braintree_Util::attributesToString($this->_attributes);
     if (isset($this->_creditCardVerification)) {
         $output .= sprintf('%s', $this->_creditCardVerification);
     }
     return __CLASS__ . '[' . $output . ']';
 }