Note that there are some explanatory texts on larger screens.

plurals
  1. POBitcoin sendfrom not returning any errors
    primarykey
    data
    text
    <p>I am trying to validate bitcoin engine respond once executing with correct amount within the account balance and correct wallet I am getting transaction ID, but if I enter amount too much and fake wallet I am not receiving any error in return just a blank page with html, head and body elements. Is there is any debug mode or what I can do to receive any response?</p> <pre><code>$message = ($bitcoin-&gt;sendfrom($mywallet,$to_wallet,$wammount)); </code></pre> <p>I am using jsonRPCClient to connect with bitcoin engine.</p> <p>however when I do that in console using RPC commands </p> <p>I am getting this : Account has insufficient funds (code -6)</p> <p>code for redirection</p> <pre><code>if ($message !== '') { ob_start(); header("Location: mywallet.php?error=done"); die(); } else { ob_start(); header("Location: mywallet.php?error=true"); die(); } </code></pre> <p><strong>Update</strong> Yes correct I will more ob_start(); above, thing is that once trying (try,catch) event I am getting blank page upon SUCCESS (so not transaction ID like with normal way I am doing I am getting back transaction ID) upon FAIL I am getting Unable to connect to Bitcoin Server. What I just need sounds very simple, how do I verified that transaction is SUCCESSFUL or FAIL, SUCCESSFUL -> I got ID in return, FAIL -> I have got Error in return. SO I can divert users to right places on the page after form is submitted. Actualy I am doing is withdraw funds form, where user inserts amount and his wallet to get funds back from bitcoin account to his private account. Hope this will helps to understand. </p> <p><strong>UPDATE 2</strong> I have changed construction for that and seems to is working very well, basically is looking for "Unable" word as transaction ID doesn't have that word and other exception I am getting is "Unable to connect to server..." Thank you for guiding me. Any feedback ?</p> <pre><code>try { $message = ($bitcoin-&gt;sendfrom($mywallet,$to_wallet,$wammount)); } catch (Exception $e) { $e-&gt;getMessage(); } // exit; if (!strpos($e,'Unable') !== false){ header("Location: mywallet.php?error=done"); die(); } else { header("Location: mywallet.php?error=true"); die(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload