dqhdz04240 2019-04-28 10:28 采纳率: 0%
浏览 52

coinpayments IPN回调没有在我的服务器上执行脚本

I'm using coinpayments API to exchange cryptocurrency. Everything is working fine But I need to update payment status in my DB when transaction status is completed. I'm checking IPN History and it is showing correct URL of my script which handles the IPN data. Sent status is also "Yes" but it is not executing my script to update payment status in my DB.

I'm using LTCT coins for development and testing purposes. Not sure if this is causing the issue because it just testing currency. I cant check it with real currency yet. Here is my code.

require('./coinpayments.inc.php');
$cps = new CoinPaymentsAPI();
$cps->Setup('B2Ec451e6a2b0e47981336B8C63Da7f5630b613C54032198df5F807c77179eF2', 'c609b111559b6709054ea3f2f0ed300ea7932fe20c8d1f01b3bc189476e0c49c');

$req = array(
    'amount' => 10.00,
    'currency1' => 'USD',
    'currency2' => 'LTCT',
    'buyer_email' => 'email@gmail.com',
    'item_name' => 'Test Item/Order Description',
    'address' => '', // leave blank send to follow your settings on the Coin Settings page
    'ipn_url' => 'http://btcmoney.rf.gd/ipn_handler.php',
    'success_url' => 'http://btcmoney.rf.gd/success_handler.php',
);
// See https://www.coinpayments.net/apidoc-create-transaction for all of the available fields

$result = $cps->CreateTransaction($req);
if ($result['error'] == 'ok') {
    $le = php_sapi_name() == 'cli' ? "
" : '<br />';
    print 'Transaction created with ID: '.$result['result']['txn_id'].$le;
    print 'Buyer should send '.sprintf('%.08f', $result['result']['amount']).' BTC'.$le;
    print 'Status URL: '.$result['result']['status_url'].$le;
    print 'Send to: '.$result['result']['address'].$le;

} else {
    print 'Error: '.$result['error']."
";
}

When payment request is initiated using this code and user deposit LTCT into my wallet, it says "complete" status in coinpayments Dashboard. But IPN or success callback is not being executed. I really need to execute that script to update statuses in my DB.

To verify if script is being called or not. I'm creating a text file in that script and folder permissions are 777. Hitting that URL via web creates text field. But it should be called successfully from IPN callback.

Any help will be highly appreciated.

Regards.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 matlab中使用gurobi时报错
    • ¥15 WPF 大屏看板表格背景图片设置
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭
    • ¥15 2020长安杯与连接网探
    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真
    • ¥15 arduino 四自由度机械臂