This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); | |
$url = BASE_URL . 'proforma_invoice_series.xml'; | |
$ch = curl_init(); | |
$postdata_with_suffix = '<?xml version="1.0"?> | |
<proforma_invoice_series> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 = 1065253795; // your invoice id here | |
$url = BASE_URL . 'invoices/' . $invoice_id . '/email.xml' ; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); | |
$url = BASE_URL . 'payments/969663447.xml'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_USERPWD, API_KEY . ":x"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); | |
$url = BASE_URL . 'products/search.xml?field=price&value=100'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_USERPWD, API_KEY . ":x"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); | |
$url = BASE_URL . 'payments/search.xml?field=payment_date&value=2014.06.06'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_USERPWD, API_KEY . ":x"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//set BASE_URL to https://factureaza.ro/api/ for production | |
define('BASE_URL', 'https://sandbox.factureaza.ro/api/'); | |
//replace with the api key provided in the backend | |
define('API_KEY', '72543f4dc00474bc40a27916d172eb93339fae894ec7a6f2dceb4751d965'); | |
$url = BASE_URL . 'invoices/search.xml?field=created_at&value=2014.06.06'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_USERPWD, API_KEY . ":x"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// write post parameters to file - sample code for processing the callback after successfull payment | |
$file_name_json = 'factureaza_callback_post_content.json'; | |
$document_as_json = file_get_contents('php://input'); | |
$fp_json = fopen($file_name_json, 'wt') or die('Could not open file! Make sure you have permission to create the file ' . $file_name_json); | |
fwrite($fp_json, $document_as_json) or die('Could not write to file! Make sure you have write permission for the file ' . $file_name_json); | |
fclose($fp_json); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); | |
$currency_id = 183; // 183 -> RON | |
$invoice_id = 1065253795; // your invoice id here | |
$attributes = array( |
NewerOlder