This file contains hidden or 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'); | |
/* adapt there variables to your needs*/ | |
$client_id = 1064116434; | |
$currency_id = 183;// 183 -> RON | |
$invoice_series_id = 1061104069; // IDul seriei - NU PREFIXUL !!!!! |
This file contains hidden or 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'); | |
$attributes = array( | |
"client" => array( | |
"name" => 'Firma mea preferata', | |
"uid" => '3987985', |
This file contains hidden or 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( |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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> |
OlderNewer