Author

Topic: [HELP] Blockchain.info API (Read 539 times)

legendary
Activity: 1524
Merit: 1001
NOBT - WNOBT your saving bank◕◡◕
April 03, 2016, 07:38:32 PM
#6
Your site on shared hosting or VPS/Server
Yes my site is on a hosting provide. I don't have my own dedicated server.
The hosting provider is currently free one but i would upgrade soon.
You need VPS or Server.

  more info in this topic  https://bitcointalksearch.org/topic/m.14150323 
hero member
Activity: 1162
Merit: 547
CryptoTalk.Org - Get Paid for every Post!
April 03, 2016, 07:51:57 AM
#5
Your site on shared hosting or VPS/Server
Yes my site is on a hosting provide. I don't have my own dedicated server.
The hosting provider is currently free one but i would upgrade soon.
legendary
Activity: 1524
Merit: 1001
NOBT - WNOBT your saving bank◕◡◕
April 03, 2016, 07:46:06 AM
#4
 Your site on shared hosting or VPS/Server
hero member
Activity: 1162
Merit: 547
CryptoTalk.Org - Get Paid for every Post!
April 03, 2016, 02:59:52 AM
#3
I want that after receiving the payment then the user should be redirected to another url automatically. How should i edit the code to achieve it ?
Would this work ?

Code:
$URL = 'http://example.com/proceed.php';
if ($_GET['value'] >=1000) {
        echo '*ok*';
header('Location: '.$URL);
} else {
   
}
legendary
Activity: 938
Merit: 1002
April 02, 2016, 10:06:13 PM
#2
From what I can see, they are. Your code is echoeing *OK* back to you, so everything is going as you want it to, based on your parameters.
hero member
Activity: 1162
Merit: 547
CryptoTalk.Org - Get Paid for every Post!
April 02, 2016, 02:23:22 AM
#1
I have decided to use blockcahin.info API for payment integration. I created a php to generate new address to send the BTC to. But this new generated address is not showing in my blockchain.info wallet. Is this normal?

Here are the codes for the two :

New address Generator :

Code:
$secret 'abc';

$my_xpub 'xpub123';
$my_api_key 'api123';

$my_callback_url 'http://yoyobtcrotator.cf/callback.php?&secret='.$secret;

$root_url 'https://api.blockchain.info/v2/receive';

$parameters 'xpub=' .$my_xpub'&callback=' .urlencode($my_callback_url). '&key=' .$my_api_key;

$response file_get_contents($root_url '?' $parameters);

$object json_decode($response);

echo 
'Send Payment To : ' $object->address;
?>

Callback.php :

Code:
$real_secret 'abc';
$transaction_hash $_GET['transaction_hash'];
$value_in_satoshi $_GET['value'];
$value_in_btc $value_in_satoshi 100000000;

if (
$_GET['test'] == true) {
    return;
}


if (
$_GET['confirmations'] >= && $_GET['value'] >=10000) {
    
    echo 
'*ok*';
} else {
   
}
?>

The secret, api, xpub are imaginary.

Working : New address is generated for each user, the user needs to pay 10k or above and the callback.php displays *ok*.
Are these codes correct ?
Jump to: