Hello all
I have big probléme with withdraw systeme, for déposit its ok i use this
https://blockchain.info/fr/api/blockchain_wallet_apii'am new in blockchain
$montant = $_POST['wiSold'];
$addr = $_POST['wiAddr'];
// BTC TO SATOSHI
$amount = ($montant * 100000000);
// BLOCKCHAIN LOGIN
$guid = "xxxxx";
$main_password = "xxxx";
// TO
$address = $addr;
$note = "Withdraw";
$shared = "false";
// SUBMIT
$op = "https://blockchain.info/fr/merchant/$guid/payment?password=$main_password&to=$address&amount=$amount&shared=$shared";
$op= file_get_contents($op);
$op = json_decode($op);
// OK
if(empty($op->error))
{
$re = mysql_query("SELECT * FROM account WHERE id_account='".$id_playerSession."' ORDER BY id ASC LIMIT 1");
$do = mysql_fetch_array($re);
$sold_last = $do['sold'];
$sold_new = $sold_last - $montant;
$type = "withdraw";
$id_type = "";
$gain = "-".$montant;
$info = $op->tx_hash;
newTransaction(newHashMd5(), $id_playerSession, $sold_last, $sold_new, $type, $id_type, $gain, $info);
// MESSAGE
$messageTxt = "ID:
".$op->tx_hash." | ".$op->message;
$messageColor = $messageColorGreen;
// SON
$loadSound = "buy";
}
else // ERROR
{
// MESSAGE
$messageTxt = "Error: ".$op->error;
$messageColor = $messageColorRed;
// SON
$loadSound = "error";
}
But the btc no comme to my wallet
Its probleme with blockchain or in my code
Thanks you