src/icepay_api_webservice.php
public function saveToFile($fileName = "wsdata", $directory = "")
    {
        if ($directory == "")
            $directory = dirname(__FILE__);

        date_default_timezone_set("Europe/Paris");
        $line = sprintf("Paymentmethods %s,%s\r\n", date("H:i:s", time()), $this->exportAsString());

        $filename = sprintf("%s/%s.csv", $directory, $fileName);
        try {
            $fp = @fopen($filename, "w");
            @fwrite($fp, $line);
            @fclose($fp);
        } catch (Exception $e) {
            throw new Exception($e->getMessage());
        };

        return true;
    }
public function saveToFile($fileName = "wsdata", $directory = "")
    {
        if ($directory == "")
            $directory = dirname(__FILE__);

        date_default_timezone_set("Europe/Paris");
        $line = sprintf("Paymentmethods %s,%s\r\n", date("H:i:s", time()), $this->exportAsString());

        $filename = sprintf("%s/%s.csv", $directory, $fileName);
        try {
            $fp = @fopen($filename, "w");
            @fwrite($fp, $line);
            @fclose($fp);
        } catch (Exception $e) {
            throw new Exception($e->getMessage());
        };

        return true;
    }
public function saveToFile ( $ fileName = "wsdata" , $ directory = "" ) { if ( $ directory == "" ) $ directory = dirname ( __FILE__ ) ; date_default_timezone_set ( "Europe/Paris" ) ; $ line = sprintf ( "Paymentmethods %s,%s\r\n" , date ( "H:i:s" , time ( ) ) , $ this -> exportAsString ( ) ) ; $ filename = sprintf ( "%s/%s.csv" , $ directory , $ fileName ) ; try { $ fp = @ fopen ( $ filename , "w" ) ; @ fwrite ( $ fp , $ line ) ; @ fclose ( $ fp ) ; } catch ( Exception $ e ) { throw new Exception ( $ e -> getMessage ( ) ) ; } ; return true ; }
Save ws to File

@since 2.1.0
@access public
@param string $fileName
@param directory $directory
@return boolean
@throws Exception
Save ws to File