diff options
author | Camil Staps | 2016-08-01 10:18:36 +0200 |
---|---|---|
committer | Camil Staps | 2016-08-01 10:18:36 +0200 |
commit | 2dc93d359e1badbeadc470bc2c53f6794594c868 (patch) | |
tree | 07cb5250404395f43bcad6ab01c4f83a98314109 /classes | |
parent | Removed duplicate code (diff) |
Braintree status history
Diffstat (limited to 'classes')
-rw-r--r-- | classes/Payment.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/classes/Payment.php b/classes/Payment.php index d37bcc9..939ce13 100644 --- a/classes/Payment.php +++ b/classes/Payment.php @@ -77,6 +77,19 @@ class Payment extends Model { $trans = Braintree_Transaction::find($this->braintree_id); $this->braintree_status = $trans->status; + return $this->braintree_status; + } + + /** + * Get Braintree status history + */ + public function getBraintreeStatusHistory() { + if (is_null($this->braintree_id)) { + return []; + } + + $trans = Braintree_Transaction::find($this->braintree_id); + return $trans->statusHistory; } /** |