Install the PHP 7 modules JSON and CURL. If you are on a Linux Debian/Ubuntu machine, you can use the following commands: apt-get install php7-curl apt-get install php7-json
Depending on your machine and PHP version, you might try the following instead: apt-get install php-curl apt-get install php-json
Now restart your webserver.
Create a folder with a secure name on your web server. For example B5tN-KtfOTf37 (Please use something own).
Upload the created PHP script to the created folder on your web server.
Create a file named ipnlog.txt and upload it to the same folder and give the file write permissions. The script above will log all deposits and withdrawals to the ipnlog.txt file. You can process deposits and withdrawals the way you want of course (Example: Update user balances, Mark orders as paid, ...).
You can also send mails on every deposit (to you or your client). For this, we recommend using Elastic Email who offer a great API, tracking, reliability and pricing. By using this link you can save 50%.