Here you will find everything you need to get started coding for bitcoin/altcoin - PHP, JSON, ASP, Python, Java, C#, Node.js, etc.
Please use our official free PHP Bitcoin/Altcoin Payment Class -
PHP Examples » PHP Instruction » Download from GithubYou can easily integrate crypto payments to your own wordpress plugin using our official Wordpress Bitcoin Gateway Plugin -
WP Instructions for Plugins » WP Instructions for Themes »Please use general instructions below to add bitcoin/altcoin payments to scripts/websites -
API Instructions Below ASP.NET C# Python's Django / Flask33.3% lifetime revenue share - 0.50% from each bitcoin/altcoin payment made by users through your scripts with GoUrl Bitcoin/Altcoin Payment Gateway installed on various websites -
Read moreSimple instructions on how to integrate GoUrl Payment Gateway to your scripts/website (ASP, Python, Java, C#, Node.js, etc).
If you use PHP language, please goto here, for other languages - read below.
Cryptocoin Payment Box and Crypto Captcha ("CRYPTOBOX") are very easy to use ! They are identical technically except their visual effect and will automatically display successful message if payment has been received. Default box size: 530 x 230 px
For Python's Django/Flask Bitcoin Payment Gateway example click here »
For PHP API Class click here »
For Laravel Class click here »
For payments in JSON format click here »
For ASP.NET API Plugin click here »
Testing environment (free speedcoins) click here »
GoUrl Bitcoin/Altcoin Gateway operates as follows -
GoUrl Payment Integrations. Please do the following steps -
Please download javascript file from here.
Javascript function cryptobox_show (boxID, coinName, public_key, amount, amountUSD, period, language, iframeID, userID, userFormat, orderID, cookieName, webdev_key, hash, width, height) - generate a html iframe with a bitcoin/altcoin payment box on your webpage
Function cryptobox_show() Parameters -
Notes: if you use the same public_key, orderID and userID in your multiple cryptocoin payment boxes on different your website pages and a user has made payment; a successful result for that user will be returned on all those pages (of course if period time not expired).
<html> <head> <script src="cryptobox.js" type="text/javascript"></script> </head> <body> <div align="center" style="min-width:530px"> <iframe id="box1913" style="border-radius:15px;border:1px solid #eee;padding:3px 6px;margin:10px;" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" width="530" height="230"></iframe> </div> <script type="text/javascript"> <!-- Amount $5.50 --> cryptobox_show(1514, 'bitcoin', '1514AAf8QICBitcoin77BTCPUB7XBxPbmc4uK79CCWHEB5DAmY', 0, 5.5, '60 MINUTE', 'en', 'box1913', 'user4', 'MANUAL', 'product1', '', '', 'f2cea21af212b8a60a1620bc46ea8f79', 530, 230); </script> </body> </html>
or see alternative JSON/JQuery custom bitcoin payment box »
-> Send DUMMY Test Payment Data to your website »
See examples of JSON DATA here »
Example in PHP. Simple convert that code to your own website language (ASP, Python, C#, etc). See full php version of script below here
<?
$html = "";
if (isset($_POST["status"]) && in_array($_POST["status"], array("payment_received", "payment_received_unrecognised")) &&
$_POST["box"] && $_POST["box"] > 0 && $_POST["amount"] && $_POST["amount"] > 0 &&
strtolower($_POST["private_key_hash"]) == strtolower(hash("sha512", "..place-here-your-gourl-box-private-key..")))
{
// check if new payment; sql example
$obj = run_sql("select paymentID, txConfirmed from my_payments where boxID = ".intval($_POST["box"])." &&
orderID = '".addslashes($_POST["order"])."' && userID = '".addslashes($_POST["user"])."' &&
txID = '".addslashes($_POST["tx"])."' limit 1");
$paymentID = ($obj) ? $obj->paymentID : 0;
$txConfirmed = ($obj) ? $obj->txConfirmed : 0;
// Save new payment details in your database
if (!$paymentID)
{
// your code here; for example update user membership
$html = "cryptobox_newrecord"; // don't change text; it use by gourl.io server
}
// Update record; payment confirmed
elseif ($_POST["confirmed"] && !$txConfirmed)
{
// your code here
$html = "cryptobox_updated"; // don't change text
}
else
{
// your code here
$html = "cryptobox_nochanges"; // don't change text
}
}
else
$html = "Only POST Data Allowed"; // don't change text
echo $html;
?>
For example, your user with userID = user26 bought product with orderID = order15620A. Product price was 11.5 USD and user paid in Bitcoins.
If payment received with correct amount, function receive status = 'payment_received'. If incorrectly paid amount, the system can not recognize user; status = 'payment_received_unrecognised'
Your callback url receive POST data -
'user' - user who has made payment, 'order' current order ID,
'amount' = 0.0479166 BTC paid by User (~11.5 USD),
private_key_hash - your private key for validation that data has been sent from Gourl.io; calculated as hash("sha512", your_gourl_private_key)
etc.
I. IPN POST DATA (correct amount)
{
"status":"payment_received"
"err":""
"private_key_hash":"d91921eef5d136d5cd22bd5210b4494d417...." // hash("sha512", your_gourl_private_key)
"box":"120"
"boxtype":"paymentbox"
"order":"order15620A"
"user":"user26"
"userformat":"MANUAL"
"usercountry":"USA"
"period":"NOEXPIRY"
"amount":"0.00124166"
"amountusd":"11.5"
"coinlabel":"BTC"
"coinname":"bitcoin"
"addr":"14dt2cSbvwghDcETJDuvFGHe5bCsNPR8jW"
"tx":"95ed924c215f2945e75acfb5650e28387deac382c9629cf0d3f31d0ec23db09d"
"confirmed":0
"timestamp":"1422624765"
"date":"30 January 2015"
"datetime":"2015-01-30 13:32:45"
}
We use amount value of cryptocoins in the payment box with a small fraction after the decimal point to uniquely identify each of your users individually. If user pay wrong amount on your internal wallet address, GoUrl Gateway cannot identify that user. You need to process all unrecognised payments manually. We forward you ALL coins received on your internal wallet address/es including all payments with incorrect amounts (unrecognised payments).
In example below, user paid wrong/incorrect amount in 0.0016 BTC to you -
II. IPN POST DATA (wrong amount)
{
"status":"payment_received_unrecognised"
"err":"An incorrect bitcoin amount has been received"
"private_key_hash":"d91921eef5d136d5cd22bd5210b4494d417...." // hash("sha512", your_gourl_private_key)
"box":"120"
"boxtype":"paymentbox"
"order":""
"user":""
"userformat":""
"usercountry":""
"period":""
"amount":"0.0016"
"amountusd":"15.26"
"coinlabel":"BTC"
"coinname":"bitcoin"
"addr":"14dt4cSbvwghDcETJDuvFGHe5bCsCPR1jW"
"tx":"6f1c6f34189a27446d18e25b9c79db90be55b0bb775b1768b5aa4520f23d71a8"
"confirmed":0
"timestamp":"1422623712"
"date":"30 January 2015"
"datetime":"2015-01-30 13:15:12"
}
NOTE: If user paid wrong amount, fields "order", "user", "userformat", "usercountry", "period" will be empty. Read here
Usually your callback url will automatically appear for each new payment two times :
But sometimes if the payment notification is delayed for 20-30min (for example, your site was unavailable and GoUrl Gateway auto re-send data later), the payment/transaction will already be confirmed and the function will appear once with values: POST[confirmed] = 1, etc.
Alternatively you can use Dogecoins for testing, create dogecoin payment box.
The minimum account balance on GoUrl.io which our system will automatically transfer from your GoUrl internal wallet address to your external wallet address is 0.01 BTC for Bitcoin, 5 coins for Speedcoin and Dogecoin, etc
Additional actions after a payment has been received (update database records, send email to user, etc). Read here
Send DUMMY Test Payment Data to your website »
Please use it for test your generated MD5 HASH values
We offer Free Support in the integration of our GoUrl Crypto Payment Gateway in your scripts/plugins/website.
Please feel free to contact us if you have any questions