Can you tell me where to implement actions if payment was successfull?
I added an action in check-status.php after line 111..
$payment_status = 'payment verified!';
.. but it's not working.
Would be great if you could help me.
Best regards
It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
$payment_status = 'payment verified!';
This is a little project I've been working on for the last few days. I first came up with this idea here: PHP script to create private key & public address. It was hard to find a decent Elliptic Curve library for PHP but eventually I came across this on a blog: Elliptic Curve PHP-OOP DSA and Diffie-Hellman. The library only came with a set of NIST curves so I had to create a set of SEC curves using the parameters supplied in sec2_final.pdf. Then to convert the keys into bitcoin addresses I basically followed the instructions on this page: Technical background of version 1 Bitcoin addresses. I found that many of these steps had already been coded in PHP: bitcoin-php - Bitcoin utility functions. I did a lot of testing with it and it seems to generate valid bitcoin addresses each time, I even sent coins to one of the addresses generated in PHP and it worked fine. However, I am far from an expert on cryptography so please check the code and let me know if you see any problems. If you have time, take a look at the bitcoin.lib.php file and check the following functions for problems. The mini key functions aren't really used for anything at this point, I just coded them because it seemed like a good idea at the time. getNewPrivKey() getNewKeyPair() getNewKeySet() privKeyToAddress($privKey) privKeyToWIF($privKey) checkMiniKey($miniKey) getNewMiniKey() miniKeyToWIF($miniKey) miniKeyToAddress($miniKey) The other part of this script is the Bitcoin Payment Gateway. Instead of passing the transaction through to a 3rd party for processing, payments are verified simply by using blockexplorer to monitor the status of a payment to a specified address. There's no need to install bitcoind on your server, everything is done in pure PHP. This script essentially enables you to have your own Payment Notification System without the need for a middleman (except blockchain.info/blockexplorer.com), very safe imo, and another amazing feature of bitcoin. This is the description from my website: |
This is a little project I've been working on for the last few days. I first came up with this idea here: PHP script to create private key & public address. It was hard to find a decent Elliptic Curve library for PHP but eventually I came across this on a blog: Elliptic Curve PHP-OOP DSA and Diffie-Hellman. The library only came with a set of NIST curves so I had to create a set of SEC curves using the parameters supplied in sec2_final.pdf. Then to convert the keys into bitcoin addresses I basically followed the instructions on this page: Technical background of version 1 Bitcoin addresses. I found that many of these steps had already been coded in PHP: bitcoin-php - Bitcoin utility functions. I did a lot of testing with it and it seems to generate valid bitcoin addresses each time, I even sent coins to one of the addresses generated in PHP and it worked fine. However, I am far from an expert on cryptography so please check the code and let me know if you see any problems. If you have time, take a look at the bitcoin.lib.php file and check the following functions for problems. The mini key functions aren't really used for anything at this point, I just coded them because it seemed like a good idea at the time. getNewPrivKey() getNewKeyPair() getNewKeySet() privKeyToAddress($privKey) privKeyToWIF($privKey) checkMiniKey($miniKey) getNewMiniKey() miniKeyToWIF($miniKey) miniKeyToAddress($miniKey) The other part of this script is the Bitcoin Payment Gateway. Instead of passing the transaction through to a 3rd party for processing, payments are verified simply by using blockexplorer to monitor the status of a payment to a specified address. There's no need to install bitcoind on your server, everything is done in pure PHP. This script essentially enables you to have your own Payment Notification System without the need for a middleman (except blockchain.info/blockexplorer.com), very safe imo, and another amazing feature of bitcoin. This is the description from my website: |
Main Wallet Backup
------ 16 October 2013 10pm
Balance: BTC 0.0003
Bitcoin Address: mm5SSxdLbMV6yN59koD5kGUezgbaQbBEGE
Transaction ID: c507000c4ead8397337fdd93979b98df6759f938550e09bc0d4985e1e2cb4599
Private Key: 0017DDEEC21A492AD5D22046C890327C95ACFB290587F065BBDC19A35D128EDD
WIF Format: 4imfxryzuMUsrB4T7p48fBcBHhyiv624qkXdJBRUaLz5N3hg227
~/bitcoin-0.8.5-linux/bin$ ./bitcoind importprivkey 0017DDEEC21A492AD5D22046C890327C95ACFB290587F065BBDC19A35D128EDD
error: {"code":-5,"message":"Invalid private key"}
~/bitcoin-0.8.5-linux/bin$ ./bitcoind importprivkey 4imfxryzuMUsrB4T7p48fBcBHhyiv624qkXdJBRUaLz5N3hg227
error: {"code":-5,"message":"Invalid private key"}
~/bitcoin-0.8.5-linux/bin$ ./bitcoind validateaddress mm5SSxdLbMV6yN59koD5kGUezgbaQbBEGE
{
"isvalid" : true,
"address" : "mm5SSxdLbMV6yN59koD5kGUezgbaQbBEGE",
"ismine" : false
}
/**
* Bitcoin utility functions class (extended for sci lib)
*
* @author theymos (functionality)
* @author Mike Gogulski (http://www.gogulski.com/)
* @author Jacob Bruce (private/public/mini key generation)
* (encapsulation, string abstraction, PHPDoc)
*/
require_once(dirname(__FILE__).'/ecc-lib/auto_load.php');
define("BITCOIN_ADDRESS_VERSION", "00");// this is a hex byte
class bitcoin {
/**
* Bitcoin utility functions class (extended for sci lib)
*
* @author theymos (functionality)
* @author Mike Gogulski (http://www.gogulski.com/)
* @author Jacob Bruce (private/public/mini key generation)
* (encapsulation, string abstraction, PHPDoc)
*/
set_time_limit(7200);
if(extension_loaded('gmp') && !defined('USE_EXT')){
define ('USE_EXT', 'GMP');
}else if(extension_loaded('bcmath') && !defined('USE_EXT')){
define ('USE_EXT', 'BCMATH');
}
require_once(dirname(__FILE__).'/ecc-lib/classes/interface/PointInterface.php');
require_once(dirname(__FILE__).'/ecc-lib/classes/interface/PrivateKeyInterface.php');
require_once(dirname(__FILE__).'/ecc-lib/classes/interface/PublicKeyInterface.php');
require_once(dirname(__FILE__).'/ecc-lib/classes/interface/SignatureInterface.php');
require_once(dirname(__FILE__).'/ecc-lib/classes/interface/CurveFpInterface.php');
require_once(dirname(__FILE__).'/ecc-lib/classes/NumberTheory.php');
require_once(dirname(__FILE__).'/ecc-lib/classes/CurveFp.php');
require_once(dirname(__FILE__).'/ecc-lib/classes/SECcurve.php');
require_once(dirname(__FILE__).'/ecc-lib/classes/Point.php');
require_once(dirname(__FILE__).'/ecc-lib/classes/PrivateKey.php');
require_once(dirname(__FILE__).'/ecc-lib/classes/PublicKey.php');
require_once(dirname(__FILE__).'/ecc-lib/classes/Signature.php');
require_once(dirname(__FILE__).'/ecc-lib/classes/util/bcmath_Utils.php');
define("BITCOIN_ADDRESS_VERSION", "00");// this is a hex byte
class bitcoin {