Blockchain API support - receive payment IPN

1

0

I'm having some real trouble setting up the Blockchain API on my server

First off is it possible to test it offline with local host?

Secondly, how do I set it up so when a tx is made through my site, it runs a php function to update a database with certain values

Has anyone successfully set up the API before and if so could they please walk me through how I would do it

Thanks

Coderrrr

Posted 2013-08-09T16:23:22.133

Reputation: 31

Answers

1

It is possible to test it offline. Check your phpinfo() to confirm, but I perform operations with the blockchain API from my XAMPP server all the time, as I am currently working on a site that uses the API. All you're doing is sending a request to a URL (like when you loaded this page) and getting the contents of that file. If you're interested, check out this class I wrote for using the blockchain API with PHP: https://github.com/lukesims/Blockchain-API-PHP-Class

With that, you could ad more functions or modify it to interact with your database simultaneously.

Luke

Posted 2013-08-09T16:23:22.133

Reputation: 111

1

Here's an example of an IPN that works with the Blockchain API:

https://github.com/damonp/simplebtcpay/blob/master/www/callback.php

siliconsys

Posted 2013-08-09T16:23:22.133

Reputation: 96

0

Its not possible to test it offline (probably because of file_get_contents() function which is present in create.php )

Second, as far as I know, you would have to write your update queries or whatever you want to do, inside the callback.php file, which is called by Blockchain itself once a transaction has been done.

Salmaan Ahmed Khan

Posted 2013-08-09T16:23:22.133

Reputation: 21