Bitcoin Forum

Alternate cryptocurrencies => Service Discussion (Altcoins) => Topic started by: Telesquad on July 05, 2017, 12:17:13 AM



Title: Track payments using coinpayments.net addresses
Post by: Telesquad on July 05, 2017, 12:17:13 AM
I am using coinpayments.net api to enable users on my site (pure PHP) to deposit different types of coins to my website's internal wallet. I am generating addresses at run-time, according to the users currency, like so:

Code:
        require('./coinpayments.inc.php');
$cps = new CoinPaymentsAPI();
$cps->Setup('sensitive_info', 'sensitive_info'); //keys removed for security
$display = $cps->GetCallbackAddress('BTC','https://server_name/coinpayments/ipn.php'); //user selects BTC, server name removed
$add = $display['result'];
echo $add['address'];

The user will deposit funds to the echo'd address

Now, I want to know the amount of the deposits that users make, as well as a notification of successful transaction

I tried using IPN but it just doesn't work with my code, I need another way of tracking payments

Please help, I am in a bit of a crisis.