BraintreeDisbursement

The Paid Memberships Pro Braintree Disbursement class.

Defined (1)

The class is defined in the following location(s).

/includes/lib/Braintree/lib/Braintree/Disbursement.php  
  1. class Disbursement extends Base 
  2. private $_merchantAccount; 
  3.  
  4. protected function _initialize($disbursementAttribs) 
  5. $this->_attributes = $disbursementAttribs; 
  6. $this->merchantAccountDetails = $disbursementAttribs['merchantAccount']; 
  7.  
  8. if (isset($disbursementAttribs['merchantAccount'])) { 
  9. $this->_set('merchantAccount',  
  10. MerchantAccount::factory($disbursementAttribs['merchantAccount']) 
  11. ); 
  12.  
  13. public function transactions() 
  14. $collection = Transaction::search([ 
  15. TransactionSearch::ids()->in($this->transactionIds),  
  16. ]); 
  17.  
  18. return $collection; 
  19.  
  20. public static function factory($attributes) 
  21. $instance = new self(); 
  22. $instance->_initialize($attributes); 
  23. return $instance; 
  24.  
  25. public function __toString() 
  26. $display = [ 
  27. 'id', 'merchantAccountDetails', 'exceptionMessage', 'amount',  
  28. 'disbursementDate', 'followUpAction', 'retry', 'success',  
  29. 'transactionIds' 
  30. ]; 
  31.  
  32. $displayAttributes = []; 
  33. foreach ($display AS $attrib) { 
  34. $displayAttributes[$attrib] = $this->$attrib; 
  35. return __CLASS__ . '[' . 
  36. Util::attributesToString($displayAttributes) .']';