Search content
Sort by

Showing 7 of 7 results by brouwer
Post
Topic
Board Anfänger und Hilfe
Re: Bitcoins auf Bitcoin Wallet Adresse senden
by
brouwer
on 19/01/2015, 19:43:28 UTC
Code:
require 'lib/Blockchain.php';
$Blockchain = new Blockchain($api_code);
$Blockchain->Wallet->credentials($wallet_id, $main_password, $second_password);
// Zahlung senden
$response = $Blockchain->Wallet->send($btcAddress, $amount, null, "0.0001", "Here you go, Satoshi!");

Ok, dann fehlt mir nur noch der API Code. Den muss man also beantragen, lieg ich da richtig? Ich hab nach 24h immer noch keinen Code. Sind die da anspruchsvoll?
Post
Topic
Board Anfänger und Hilfe
Re: Bitcoins auf Bitcoin Wallet Adresse senden
by
brouwer
on 17/01/2015, 12:44:53 UTC
Dann sollte die ganze Transaktion mit diesen Zeilen Code ja funktionieren.

Code:
require 'BlockChain.php';
$Blockchain = new Blockchain($api_code);
$Blockchain->Wallet->credentials('wallet-id-1', 'password-1', 'optional 2nd password');
$response = $Blockchain->Wallet->sendMany($recipients, $from_address=null, $fee=null, $public_note=null);

In dem Fall habe ich noch eine Frage zum API Code, da ich nicht sicher bin ob ich da den richtigen Code beantragt habe. Dazu habe ich einen Antrag mit den Daten meiner Website und einigen anderen getätigt. Dieser wird innerhalb der nächsten 24h bearbeitet.
Und ist die "Wallet ID" die, welche unter dem QR-Code im "Wallet" Reiter auf blockchain.info steht?

Mit der Beschriftung
"Das ist Ihre Bitcoin Adresse
1DJvYeF*zensiert da ich nicht weiß ob es gefährlich sein könnte wenn ihr es seht*zr566y3iYc

Geben Sie diese an die Personen weiter von denen Sie Zahlungen erhalten wollen."
Post
Topic
Board Anfänger und Hilfe
Re: Bitcoins auf Bitcoin Wallet Adresse senden
by
brouwer
on 16/01/2015, 15:15:05 UTC
Quote
1. Du hast vergessen, im Script deine Zugangsdaten einzutragen.
Wo geb ich die denn ein?
Post
Topic
Board Anfänger und Hilfe
Re: Bitcoins auf Bitcoin Wallet Adresse senden
by
brouwer
on 14/01/2015, 18:22:13 UTC
Eingebunden hatte ich die API mit $Blockchain = new Blockchain();
Und ja du hattest Recht, ich hab auch bei der Angabe immer an eine E-Mail gedacht..

Hab das mal ausgebessert
Code:
$response = $Blockchain->Wallet->send($btcAddress, $amount);
                                $json_url = "https://blockchain.info/de/merchant/$guid/payment?password=$main_password&second_password=$second_password&to=$btcAddress&amount=$amount";
                                $json_data = file_get_contents($json_url); var_dump($json_data);
                                $json_feed = json_decode($json_data);
                                $message = $json_feed->message;
                                $txid = $json_feed->tx_hash;

und bekomme diesen Output:
Code:
Fatal error: Uncaught exception 'Blockchain_CredentialsError' with message 'Please enter wallet credentials.' in /Applications/XAMPP/xamppfiles/htdocs/lib/Blockchain/Wallet.php:22 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/lib/Blockchain/Wallet.php(40): Wallet->_checkCredentials() #1 /Applications/XAMPP/xamppfiles/htdocs/lib/Blockchain/Wallet.php(118): Wallet->call('payment', Array) #2 /Applications/XAMPP/xamppfiles/htdocs/index.php(244): Wallet->send('2CJvYeF1rguDqES...', 8E-11) #3 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/lib/Blockchain/Wallet.php on line 22
Post
Topic
Board Anfänger und Hilfe
Re: Bitcoins auf Bitcoin Wallet Adresse senden
by
brouwer
on 13/01/2015, 20:04:37 UTC
Notice: Undefined property: stdClass::$message in /Applications/XAMPP/xamppfiles/htdocs/stefan/index.php on line 247
Notice: Undefined property: stdClass::$tx_hash in /Applications/XAMPP/xamppfiles/htdocs/stefan/index.php on line 248

Code:
$json_url = "https://blockchain.info/de/merchant/$guid/payment?password=$main_password&second_password=$second_password&to=$btcEmail&amount=$amount";
$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data);
$message = $json_feed->message;
$txid = $json_feed->tx_hash;

Ich nutze die Library von https://github.com/blockchain/api-v1-client-php
Post
Topic
Board Anfänger und Hilfe
Re: Bitcoins auf Bitcoin Wallet Adresse senden
by
brouwer
on 10/01/2015, 19:15:40 UTC
Möglichkeit B klingt gut.
Mir ist noch nicht ganz klar, in welcher Beziehung Blockchain zu Bitcoin steht... Für Möglichkeit B, brauche ich da nicht noch die Libraries von Blockchain? Weil die werden auf der Seite angeboten.
Post
Topic
Board Anfänger und Hilfe
Topic OP
Bitcoins auf Bitcoin Wallet Adresse senden
by
brouwer
on 10/01/2015, 01:47:21 UTC
Hey, ich habe ein kleines Bestellformular und jetzt soll es darum gehen, dass der User Bitcoins von meinem Konto auf seines gesendet bekommt. Zuvor wäre es noch gut, wenn er schaut ob ich genug Bitcoins habe, aber im Grunde eine simple Aufgabe.

Leider komme ich mit der API überhaupt nicht zurecht. Ich teste auf auf meinem lokalen XAMPP Server unter Mac OS X und bin schon mal soweit:

Code:
require_once 'jsonRPCClient.php';
$bitcoin = new jsonRPCClient('http://root:root@127.0.0.1:8332/');
$guid="GUID_HERE";
$main_password="PASSWORD_HERE";
$second_password="PASSWORD_HERE";
$balance = $bitcoin->getbalance($$guid);

// Bitcoin-Zahlung senden
$json_url = "https://blockchain.info/de/merchant/$guid/payment?password=$main_password&second_password=$second_password&to=$btcEmail&amount=$amount";
$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data);
$message = $json_feed->message;
$txid = $json_feed->tx_hash;

Die jsonRPCClient.php habe ich auch. Ich weiß nicht ob der Rest tatsächlich das macht was ich vorhabe... funktioniert eh nicht das Script, da er nicht auf http://root:root@127.0.0.1:8332 connecten kann. Ich habe jetzt auch noch gelesen, dass ich bestimmte Programme installiert, konfiguriert und gestartet haben muss. Ich habe keine Ahnung wie ich das unter XAMPP auf dem Mac machen soll. Ist das denn wirklich nötig für die Nutzung der API? Ich hoffe es kann mir endlich jemand einfach und verständlich erklären.

Mit freundlichen Grüßen