Oara\Network\Publisher\PerformanceHorizon::getPaymentHistory PHP Метод

getPaymentHistory() публичный Метод

public getPaymentHistory ( ) : array
Результат array
    public function getPaymentHistory()
    {
        $paymentHistory = array();
        foreach ($this->_publisherList as $publisherId => $publisherName) {
            $url = "https://{$this->_pass}@api.performancehorizon.com/user/publisher/{$publisherId}/selfbill.json?";
            $result = \file_get_contents($url);
            $paymentList = \json_decode($result, true);
            foreach ($paymentList["selfbills"] as $selfbill) {
                $selfbill = $selfbill["selfbill"];
                $obj = array();
                $obj['date'] = $selfbill["payment_date"];
                $obj['pid'] = \intval($selfbill["publisher_self_bill_id"]);
                $obj['value'] = $selfbill["total_value"];
                $obj['method'] = "BACS";
                $paymentHistory[] = $obj;
            }
        }
        return $paymentHistory;
    }