API CALLBACK Debug Code Sample [PHP]

When developing an API callback endpoint in PHP, the following sample code may be used for debugging purposes.  When a callback is received it will be sent to the nominated e-mail address as a print_r output. 


   $message = "Callback response received:  \n\n" . print_r($_REQUEST, true);
   mail('Your@Email.Address', 'API Callback Debug', $message);


This will send you an e-mail containing all the values passed to your callback endpoint from the API server.



If you don't receive the e-mail, please check your spam filter, or /var/log/mail.log on the server running your code.

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk