payment_method)); if ($this->txn_code != null) { $payment_method = ucfirst(str_replace('_', ' ', $this->payment_method)). ' ' .translate('TRX ID'). ':' .$this->txn_code; } return [ 'id' => $this->id, 'amount' => format_price($this->amount), 'payment_method' => $payment_method, 'payment_date' => date('d-m-Y', strtotime($this->created_at)), ]; } }