<?php

namespace App\Http\EFatura;

class Request
{
    public $hataKod;
    public $hataMesaj;

    public function send($action, $params)
    {
        $client = new \SoapClient(Util::$service_url);
        try {
            $response = $client->__soapCall($action, [$params]);
            return $response;
        } catch (\SoapFault $fault) {
            $this->hataKod = $fault->faultcode;
            $this->hataMesaj = $fault->faultstring;
            return null;
        }
    }
}
