It's a simple and fast gateway for your Burstcoin transactions. We facilitate easy access to Burstcoin purchases, in a secure and reliable way.
Enter the amount of USD / EUR and click "Get Payment URL". The url of the payment page will be generated and it will be valid for 20minutes.
Only 1% + 2 BURST fee, as it's enough to cover our infrastructure costs.
pay.php :
<?php
$secret="My_Secret_Key";
$address="My_Burstcoin_Address";
$amount="10";
$currency="EUR";
$return="https://www.mysite.com/thankyou.html";
$notify="https://www.mystte.com/notify.php";
$info="Invoice 211";
$custom="111";
$bind=array("amount"=>$amount,"currency"=>$currency, "secret"=>$secret, "address"=>$address, "notify_url"=>$notify, "return_url"=>$return, "custom"=>$custom. "info"=>$info);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://burstpay.net/?api=1");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($bind));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$res = curl_exec ($ch);
$result=json_decode($res,true);
curl_close ($ch);
if($result['status']==1) {
//redirect to the payment gateway
header("Location: $result[url]"); exit;
} else {
//An error as been encountered
}
?>
notify.php :
<?php
$secret="My_Secret_Key";
$id=$_POST['id'];
$amount=number_format($_POST['amount'],2,'.','');
$currency=$_POST['currency'];
$burst=$_POST['burst'];
$payment_id=$_POST['payment_id'];
$address=$_POST['address'];
$key=$_POST['key'];
$custom=$_POST['custom'];
$burst_final=$_POST['burst_final']; //total burst minus the fees
$confirm=hash('sha256',$id.$amount.$currency.$burst.$address.$payment_id.$secret);
if($confirm==$key) {
//all good
echo "*ok*"; // always return *ok* to stop notifications. Max 100 notifications are retried.
exit;
} else {
//error, invalid key
}
?>