Set Receiver Information Set to (receiver) data in invoice

You can easily set "to" data (i.e. receiver details) in invoice using setInvoiceTo function or You can set to data directly by passing array using setInvoiceToData() function with "to" parameter. "To" data normally includes "name", "address1", "address2", "city", "state", "country", "postalcode", "email", "website" etc. You can add or remove these fields.

  
                            $xinvoice = new Xinvoice();
                            //set to array
                            $to = array("name" => "Test Company", "address1"=>" Dummy address");
                            //set to data 
                            $xinvoice->setInvoiceToData($to);            
                            echo $xinvoice->render();