Author

Topic: Bitping API; HTML=POST (Read 520 times)

rex
newbie
Activity: 52
Merit: 0
March 11, 2013, 04:05:20 AM
#3
Finally i sort this out. the "secret key" is just the one that on our api page (in the example the site shows to us)
rex
newbie
Activity: 52
Merit: 0
March 11, 2013, 03:53:31 AM
#2
+1

I have the same question.
first I though this secret should be my account password, but if I use that, the sha1.haxdigest() doesn't match with the signature. What is this exactly?

member
Activity: 102
Merit: 10
November 29, 2012, 01:44:08 AM
#1
I'm drawing a blank on some basic HTML stuff.

Bitping.net API sends a POST. I have a php script set up from twilio that sends a txt any time it is loaded. I have it set on a link now anytime I click it I get a text sent to my cell.

How do set it up so anytime I get a HTML POST from Bitping sent to my page it loads/runs this PHP script?


"from bitping.net "

To get the full benefit of BPN you need to implement the HTTP POST api callback.

We provide a simple example in PHP to receive the events below, please note that the secret value is unique to your account, and should be kept secret.
If you build a module for a webshop, the secret value should be user editable.

When you choose to receive HTTP POST events for a order, we will contact your webserver when a payment has received the required amount of confirmations.
The HTTP POST event will contain the following variables

Code:

             $address       
$_POST["to_address"];
              
$amount        $_POST["amount"];
              
$btc           $_POST["btc_amount"];
              
$confirmations $_POST["confirmations"];
              
$txhash        $_POST["txhash"];
              
$block         $_POST["block"];
              
$sig           $_POST["signature"];
              
$mysig sha1(
                
$address .
                
$amount .
                
$confirmations .
                
$txhash .
                
$block .
                
"f632c83ad0f5a44d9a1XXXXXXXXXXXX"
                
);

                if (
$mysig === $sig)
                {
                  
//check if number of confirmations is ok
                  //update order/send user notification
                
} else {
                  
//log all post data, send warning email to administrator
                
}
                   
?>

also;
What is that "$block "f632c83ad0f5a44d9a1XXXXXXXXXXXX"




bitping
https://bitcointalksearch.org/topic/closed-bitpingnet-a-bitcoin-notify-service-55923


I can post the twilio php if that helps.
 
Jump to: