Last active
June 4, 2019 11:47
-
-
Save aphilippi/f10e4ba4b479a3125c87 to your computer and use it in GitHub Desktop.
factureaza callback request processing
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); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.