Title: Probleme withdraw blockchain api PHP
Post by: pulser on January 25, 2014, 12:50:31 PM
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_api i'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: <a href='https://blockchain.info/address/".$op->tx_hash."' target='_blank'>".$op->tx_hash."</a> | ".$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
Title: Re: Probleme withdraw blockchain api PHP
Post by: Abdussamad on January 25, 2014, 09:48:01 PM
What does var_dump($op) give you?
|