Skip to content

Instantly share code, notes, and snippets.

View aphilippi's full-sized avatar

Andreas Philippi aphilippi

  • Cubus Arts SRL
  • Brasov
View GitHub Profile
@aphilippi
aphilippi / factureaza_update_invoice.php
Last active July 29, 2020 12:19
Modificarea datelor unei facturi deja create
<?php
//set BASE_URL to https://factureaza.ro/api/v1/ for production
define('BASE_URL', 'https://sandbox.factureaza.ro/api/v1/');
//replace with the api key provided in the backend
define('API_KEY', '72543f4dc00474bc40a27916d172eb93339fae894ec7a6f2dceb4751d965');
$invoice_id = 1065253794; // your invoice id here
$changes = array("invoice" =>
array(
"lower_annotation" => 'Explicații noi',
@aphilippi
aphilippi / factureaza_update_client_data_on_invoice.php
Last active May 6, 2019 09:37
Update client record and update invoice for client to reflect changes
<?php
//set BASE_URL to https://factureaza.ro/api/v1/ for production
define('BASE_URL', 'https://sandbox.factureaza.ro/api/v1/');
//replace with the api key provided in the backend
define('API_KEY', '72543f4dc00474bc40a27916d172eb93339fae894ec7a6f2dceb4751d965');
$client_id = 1064116434; // your client id here
$changes = array("client" => array("name" => 'Nume client schimbat', "city" => "Nume oras nou"));
$url = BASE_URL . 'clients/' . $client_id . '.xml' ;
$ch = curl_init();