Skip to content

Instantly share code, notes, and snippets.

@aphilippi
Last active June 4, 2019 11:47
Show Gist options
  • Save aphilippi/f10e4ba4b479a3125c87 to your computer and use it in GitHub Desktop.
Save aphilippi/f10e4ba4b479a3125c87 to your computer and use it in GitHub Desktop.
factureaza callback request processing
<?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);
?>
@aphilippi
Copy link
Author

După înregistrarea unei plăți se poate trimite o structură de date cu detaliile facturii și a plății pe această adresă prin HTTP POST.

Codul de mai sus exemplifică modul în care informațiile se pot prelua și scrie într-un fișier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment