Bitcoin Forum

Bitcoin => Project Development => Topic started by: imrer on October 16, 2013, 04:00:18 PM



Title: Php -> wallet
Post by: imrer on October 16, 2013, 04:00:18 PM
I have this use case: I want to sell product per bitcoins. We have online bitcoin wallet with unique name per product per buying customer.

I want to display bitcoin payment link (sth like bitcoin:wallet?amout=0.001) and make user to process the payment.

It requires 3 confirmations to accept the payment.

Then I want to check, if payment was successful (somecron?).

I'm new to this. Can I ask you, how this would look like in php?


Title: Re: Php -> wallet
Post by: Ditto on October 17, 2013, 02:42:00 PM
http://blockchain.info/api/api_receive


Title: Re: Php -> wallet
Post by: Gordon Bleu on October 17, 2013, 02:46:12 PM
bitcoin:1DdtTzJeQojWYGwYa669VoeJ785iyJPoQB?amount=0.01&label=sqservice
bitcoin:1DdtTzJeQojWYGwYa669VoeJ785iyJPoQB?amount=0.01&label=sqservice (bitcoin:1DdtTzJeQojWYGwYa669VoeJ785iyJPoQB?amount=0.01&label=sqservice)


Title: Re: Php -> wallet
Post by: imrer on October 17, 2013, 08:12:05 PM
I've got bitcoind client on server so external services is not what I'm looking for. How to process what I described in php code?


Title: Re: Php -> wallet
Post by: Ditto on October 18, 2013, 07:14:34 PM
I've got bitcoind client on server so external services is not what I'm looking for. How to process what I described in php code?
Simple JSON-RPC. Use this library  - http://jsonrpcphp.org/?page=download&lang=en

Code:
  require_once 'jsonRPCClient.php';
 
  $bitcoin = new jsonRPCClient('http://user:pass@127.0.0.1:8332/');
 
  echo "<pre>\n";
  print_r($bitcoin->getinfo());
  echo "</pre>";