Skip to content

Commit

Permalink
Version 1.7.11
Browse files Browse the repository at this point in the history
Added Turkish Language
  • Loading branch information
cryptoapi committed Feb 14, 2017
1 parent 2d81a17 commit 06bb248
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 32 deletions.
30 changes: 20 additions & 10 deletions cryptobox.callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* ##########################################
*
*
* Cryptobox Server Callbacks
* Cryptobox Server Callbacks
*
* @package Cryptobox callbacks
* @copyright 2014-2017 Delta Consultants
* @category Libraries
* @website https://gourl.io
* @version 1.7.10
* @version 1.7.11
*
*
* This file processes call-backs from Cryptocoin Payment Box server when new payment
Expand Down Expand Up @@ -42,18 +42,28 @@
if ($_POST) foreach ($_POST as $k => $v) if (is_string($v)) $_POST[$k] = trim($v);


// b.
if (isset($_POST["plugin_ver"]) && !isset($_POST["status"]) && isset($_POST["private_key"]) && strlen($_POST["private_key"]) == 50 && in_array($_POST["private_key"], explode("^", CRYPTOBOX_PRIVATE_KEYS)))
// b. check if private key valid
$valid_key = false;
if (isset($_POST["private_key_hash"]) && strlen($_POST["private_key_hash"]) == 128 && preg_replace('/[^A-Za-z0-9]/', '', $_POST["private_key_hash"]) == $_POST["private_key_hash"])
{
$keyshash = array();
$arr = explode("^", CRYPTOBOX_PRIVATE_KEYS);
foreach ($arr as $v) $keyshash[] = strtolower(hash("sha512", $v));
if (in_array(strtolower($_POST["private_key_hash"]), $keyshash)) $valid_key = true;
}


// c.
if (isset($_POST["plugin_ver"]) && !isset($_POST["status"]) && $valid_key)
{
echo "cryptoboxver_" . (CRYPTOBOX_WORDPRESS ? "wordpress_" . GOURL_VERSION : "php_" . CRYPTOBOX_VERSION);
die;
}


// c.
// d.
if (isset($_POST["status"]) && in_array($_POST["status"], array("payment_received", "payment_received_unrecognised")) &&
$_POST["box"] && is_numeric($_POST["box"]) && $_POST["box"] > 0 && $_POST["amount"] && is_numeric($_POST["amount"]) && $_POST["amount"] > 0 &&
strlen($_POST["private_key"]) == 50 && preg_replace('/[^A-Za-z0-9]/', '', $_POST["private_key"]) == $_POST["private_key"] && in_array($_POST["private_key"], explode("^", CRYPTOBOX_PRIVATE_KEYS)))
$_POST["box"] && is_numeric($_POST["box"]) && $_POST["box"] > 0 && $_POST["amount"] && is_numeric($_POST["amount"]) && $_POST["amount"] > 0 && $valid_key)
{

foreach ($_POST as $k => $v)
Expand Down Expand Up @@ -110,9 +120,9 @@
}

else
$box_status = "Only POST Data Allowed";
$box_status = "Only POST Data Allowed";


echo $box_status; // don't delete it
echo $box_status; // don't delete it

?>
24 changes: 16 additions & 8 deletions cryptobox.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* ##########################################
*
*
* PHP Cryptocurrency Payment Class
* PHP Cryptocurrency Payment Class
*
* @package GoUrl PHP Bitcoin/Altcoin Payments and Crypto Captcha
* @copyright 2014-2017 Delta Consultants
Expand All @@ -15,7 +15,7 @@
* @example https://gourl.io/bitcoin-payment-gateway-api.html
* @gitHub https://github.com/cryptoapi/Payment-Gateway
* @license Free GPLv2
* @version 1.7.10
* @version 1.7.11
*
*
* CLASS CRYPTOBOX - LIST OF METHODS:
Expand Down Expand Up @@ -66,7 +66,7 @@
elseif (!defined('ABSPATH')) exit; // Wordpress


define("CRYPTOBOX_VERSION", "1.7.10");
define("CRYPTOBOX_VERSION", "1.7.11");

// GoUrl supported crypto currencies
define("CRYPTOBOX_COINS", json_encode(array('bitcoin', 'litecoin', 'paycoin', 'dogecoin', 'dash', 'speedcoin', 'reddcoin', 'potcoin', 'feathercoin', 'vertcoin', 'vericoin', 'peercoin', 'monetaryunit', 'swiscoin')));
Expand All @@ -87,7 +87,7 @@ class Cryptobox {
* User will pay you all times the actual price which is linked on current exchange price in USD on the datetime of purchase.
* You can use in cryptobox options one variable only: amount or amountUSD. You cannot place values of those two variables together. */
private $period = ""; // period after which the payment becomes obsolete and new cryptobox will be shown; allow values: NOEXPIRY, 1 MINUTE..90 MINUTE, 1 HOUR..90 HOURS, 1 DAY..90 DAYS, 1 WEEK..90 WEEKS, 1 MONTH..90 MONTHS
private $language = "en"; // cryptobox localisation; en - English, es - Spanish, fr - French, de - German, ru - Russian, nl - Dutch, pt - Portuguese, fa - Persian, ko - Korean, ar - Arabic, cn - Simplified Chinese, zh - Traditional Chinese, hi - Hindi
private $language = "en"; // cryptobox localisation; en - English, es - Spanish, fr - French, de - German, nl - Dutch, it - Italian, ru - Russian, pl - Polish, pt - Portuguese, fa - Persian, ko - Korean, ja - Japanese, id - Indonesian, tr - Turkish, ar - Arabic, cn - Simplified Chinese, zh - Traditional Chinese, hi - Hindi
private $iframeID = ""; // optional, html iframe element id; allow symbols: a..Z0..9_-
private $orderID = ""; // your page name / product name or order name (not unique); allow symbols: a..Z0..9_-@.; max size: 50 symbols
private $userID = ""; // optional, manual setup unique identifier for each of your users; allow symbols: a..Z0..9_-@.; max size: 50 symbols
Expand Down Expand Up @@ -117,7 +117,7 @@ class Cryptobox {
private $boxType = ""; // cryptobox type - 'paymentbox' or 'captchabox'
private $processed = false; // optional - set flag to paid & processed
private $cookieName = ""; // user cookie/session name (if cookies/sessions use)
private $localisation = ""; // localisation; en - English, es - Spanish, fr - French, de - German, ru - Russian, nl - Dutch, pt - Portuguese, fa - Persian, ko - Korean, ar - Arabic, cn - Simplified Chinese, zh - Traditional Chinese, hi - Hindi
private $localisation = ""; // localisation; en - English, es - Spanish, fr - French, de - German, nl - Dutch, it - Italian, ru - Russian, pl - Polish, pt - Portuguese, fa - Persian, ko - Korean, ja - Japanese, id - Indonesian, ar - Arabic, tr - Turkish, cn - Simplified Chinese, zh - Traditional Chinese, hi - Hindi


public function __construct($options = array())
Expand Down Expand Up @@ -153,7 +153,7 @@ public function __construct($options = array())
if (!$this->amount || $this->amount <= 0) $this->amount = 0;
if (!$this->amountUSD || $this->amountUSD <= 0) $this->amountUSD = 0;

if (($this->amount <= 0 && $this->amountUSD <= 0) || ($this->amount > 0 && $this->amountUSD > 0)) die("You can use in cryptobox options one of variable only: amount or amountUSD. You cannot place values in that two variables together");
if (($this->amount <= 0 && $this->amountUSD <= 0) || ($this->amount > 0 && $this->amountUSD > 0)) die("You can use in cryptobox options one of variable only: amount or amountUSD. You cannot place values in that two variables together (submitted amount = '".$this->amount."' and amountUSD = '".$this->amountUSD."' )");

if ($this->amount && (!is_numeric($this->amount) || $this->amount < 0.0001 || $this->amount > 50000000)) die("Invalid Amount - $this->amount $this->coinLabel. Allowed range: 0.0001 .. 50,000,000");
if ($this->amountUSD && (!is_numeric($this->amountUSD) || $this->amountUSD < 0.01 || $this->amountUSD > 1000000)) die("Invalid amountUSD - $this->amountUSD USD. Allowed range: 0.01 .. 1,000,000");
Expand Down Expand Up @@ -1163,7 +1163,7 @@ function run_sql($sql)
}


// en - English, es - Spanish, fr - French, de - German, ru - Russian, nl - Dutch, pt - Portuguese, fa - Persian, ko - Korean, ar - Arabic, cn - Simplified Chinese, zh - Traditional Chinese, hi - Hindi
// en - English, es - Spanish, fr - French, de - German, nl - Dutch, it - Italian, ru - Russian, pl - Polish, pt - Portuguese, fa - Persian, ko - Korean, ja - Japanese, id - Indonesian, tr - Turkish, ar - Arabic, cn - Simplified Chinese, zh - Traditional Chinese, hi - Hindi
$cryptobox_localisation = array(
"en" => array("name" => "English",
/*36*/ "button" => "Click Here if you have already sent %coinNames%",
Expand Down Expand Up @@ -1269,6 +1269,14 @@ function run_sql($sql)
"payment" => "Pilih Metode Pembayaran",
"pay_in" => "Pembayaran dalam bentuk %coinName%"),

"tr" => array("name" => "Turkish",
"button" => "%coinName% g&#246;nderdiyseniz, buraya t&#305;klay&#305;n",
"msg_not_received" => "<b>%coinNames% hen&#252;z al&#305;namad&#305;.</b><br> De&#287;i&#351;ik yada yanl&#305;&#351; bir mebl&#226; verdiyseniz, sistem kabul etmemi&#351; olabilir. Bu durumda g&#246;derme i&#351;leminizi birka&#231; dakika bekleyerek tekrarlay&#305;n. Veya site sahibinden yard&#305;m isteyin.",
"msg_received" => "%coinName% &#246;deme sistemine %amountPaid% %coinLabel% ba&#351;ar&#305;yla gelmi&#351;tir !",
"msg_received2" => "%coinName% Capcha`ya %amountPaid% %coinLabel% ba&#351;ar&#305;yla gelmi&#351;tir !",
"payment" => "&#214;deme metodunu se&#231;iniz",
"pay_in" => "%coinName% ile &#246;deme"),

"ar" => array("name" => "Arabic",
"button" => "&#1575;&#1590;&#1594;&#1591; &#1607;&#1606;&#1575; &#1601;&#1610; &#1581;&#1575;&#1604;&#1577; &#1602;&#1605;&#1578; &#1601;&#1593;&#1604;&#1575;&#1611; &#1576;&#1575;&#1604;&#1575;&#1585;&#1587;&#1575;&#1604; %coinNames%",
"msg_not_received" => "<b>%coinNames% &#1604;&#1605; &#1610;&#1578;&#1605; &#1575;&#1587;&#1578;&#1604;&#1575;&#1605;&#1607;&#1575; &#1576;&#1593;&#1583;.</b><br> &#1573;&#1584;&#1575; &#1602;&#1605;&#1578; &#1576;&#1573;&#1585;&#1587;&#1575;&#1604;&#1607;&#1575; %coinNames% (&#1576;&#1575;&#1604;&#1592;&#1576;&#1591; %coinName% &#1605;&#1576;&#1604;&#1594; &#1601;&#1610; &#1583;&#1601;&#1593; &#1608;&#1575;&#1581;&#1583;), &#1610;&#1585;&#1580;&#1609; &#1575;&#1604;&#1573;&#1606;&#1578;&#1592;&#1575;&#1585; &#1576;&#1590;&#1593; &#1583;&#1602;&#1575;&#1574;&#1602; &#1604;&#1573;&#1587;&#1578;&#1604;&#1575;&#1605;&#1607;&#1605; &#1605;&#1606; &#1582;&#1604;&#1575;&#1604; %coinName% &#1606;&#1592;&#1575;&#1605; &#1575;&#1604;&#1583;&#1601;&#1593;. &#1573;&#1584;&#1575; &#1602;&#1605;&#1578; &#1576;&#1573;&#1585;&#1587;&#1575;&#1604; &#1605;&#1576;&#1575;&#1604;&#1594; &#1571;&#1582;&#1585;&#1609;, &#1606;&#1592;&#1575;&#1605; &#1575;&#1604;&#1583;&#1601;&#1593; &#1587;&#1608;&#1601; &#1610;&#1580;&#1575;&#1607;&#1604; &#1575;&#1604;&#1589;&#1601;&#1602;&#1577;&#1548; &#1608;&#1587;&#1608;&#1601; &#1578;&#1581;&#1578;&#1575;&#1580; &#1604;&#1573;&#1585;&#1587;&#1575;&#1604; &#1575;&#1604;&#1605;&#1576;&#1604;&#1594; &#1575;&#1604;&#1589;&#1581;&#1610;&#1581; &#1605;&#1585;&#1577; &#1571;&#1582;&#1585;&#1609;",
Expand Down Expand Up @@ -1311,6 +1319,6 @@ function run_sql($sql)
foreach ($cryptobox_private_keys as $v)
if (strpos($v, " ") !== false || strpos($v, "PRV") === false || strpos($v, "AA") === false || strpos($v, "77") === false) die("Invalid Private Key - ". (CRYPTOBOX_WORDPRESS ? "please setup it on your plugin settings page" : "$v in variable \$cryptobox_private_keys, file cryptobox.config.php."));

unset($v); unset($cryptobox_private_keys);
unset($v); unset($cryptobox_private_keys);
}
?>
2 changes: 1 addition & 1 deletion cryptobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @category Javascript
* @website https://gourl.io
* @api https://gourl.io/api.html
* @version 1.7.10
* @version 1.7.11
*
*/

Expand Down
2 changes: 1 addition & 1 deletion cryptobox.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions cryptobox.newpayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* {
* "status":"payment_received"
* "err":""
* "private_key":"1206lO6HX76cw9Bitcoin77DOGED82Y8eyBExZ9kZpX"
* "private_key_hash":"85770A30B97D3AC035EC32354633C1614CF76E1621A20B143A1FBDAD1FCBF25A6EC6C5F99FFF495DD1836E47AE0E37942EC0B04867BD14778B2C93967E4A7FAC" // sha512 hash of gourl payment box private_key
* "box":"120"
* "boxtype":"paymentbox"
* "order":"order15620A"
Expand All @@ -53,7 +53,7 @@
* {
* "status":"payment_received_unrecognised"
* "err":"An incorrect bitcoin amount has been received"
* "private_key":"1206lO6HX76cw9Bitcoin77DOGED82Y8eyBExZ9kZpX"
* "private_key_hash":"85770A30B97D3AC035EC32354633C1614CF76E1621A20B143A1FBDAD1FCBF25A6EC6C5F99FFF495DD1836E47AE0E37942EC0B04867BD14778B2C93967E4A7FAC" // sha512 hash of gourl payment box private_key
* "box":"120"
* "boxtype":"paymentbox"
* "order":""
Expand Down Expand Up @@ -119,18 +119,18 @@ function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_
.............
*/

Debug - new payment email notification for webmaster
Uncomment lines below and make any test payment
--------------------------------------------
$email = "....your email address....";
mail($email, "Payment - " . $paymentID . " - " . $box_status, " \n Payment ID: " . $paymentID . " \n\n Status: " . $box_status . " \n\n Details: " . print_r($payment_details, true));
// Debug - new payment email notification for webmaster
// Uncomment lines below and make any test payment
// --------------------------------------------
// $email = "....your email address....";
// mail($email, "Payment - " . $paymentID . " - " . $box_status, " \n Payment ID: " . $paymentID . " \n\n Status: " . $box_status . " \n\n Details: " . print_r($payment_details, true));

*/



return true;
return true;
}

?>
10 changes: 9 additions & 1 deletion history.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
===============================================================================
== Version 1.7.10 (February 2017)
== Version 1.7.11 (February 2017)
===============================================================================

- Added Turkish Language (Thanks to Gezgin)



===============================================================================
== Version 1.7.10 (January 2017)
===============================================================================

- Added Italian Language (Thanks to Lorenzo)
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
GoUrl.io Cryptocoin Payment Gateway API
-----------------------------------------

Version 1.7.10
Version 1.7.11

**Accept Bitcoin, Litecoin, Paycoin, Dogecoin, Dash, Speedcoin, Reddcoin, Potcoin, Feathercoin, Vertcoin, Vericoin, Peercoin, MonetaryUnit, Swiscoin Payments Online on your website**

Expand All @@ -25,7 +25,7 @@ Our Payment Gateway with Instant Checkout allows you to easily organise your web
* Direct Integration on your website (iframe), no external payment pages opens (as other payment gateways offer)
* User will see successful payment result typically within 5 seconds after the payment has been sent
* Your website users and visitors will see GoUrl payment box on your website in their own native languages
* Our Payment Gateway supports the following interface languages: [English](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=en#gourlcryptolang), [Spanish](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=es#gourlcryptolang), [French](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=fr#gourlcryptolang), [German](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=de#gourlcryptolang), [Dutch](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=nl#gourlcryptolang), [Italian](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=it#gourlcryptolang), [Russian](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=ru#gourlcryptolang), [Polish](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=pl#gourlcryptolang), [Portuguese](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=pt#gourlcryptolang), [Persian](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=fa#gourlcryptolang), [Korean](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=ko#gourlcryptolang), [Japanese](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=ja#gourlcryptolang), [Indonesian](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=id#gourlcryptolang), [Arabic](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=ar#gourlcryptolang), [Simplified Chinese](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=cn#gourlcryptolang), [Traditional Chinese](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=zh#gourlcryptolang), [Hindi](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=hi#gourlcryptolang). We can also add any new language to payment system on [request](https://gourl.io/api-php.html#lan)
* Our Payment Gateway supports the following interface languages: [English](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=en#gourlcryptolang), [Spanish](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=es#gourlcryptolang), [French](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=fr#gourlcryptolang), [German](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=de#gourlcryptolang), [Dutch](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=nl#gourlcryptolang), [Italian](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=it#gourlcryptolang), [Russian](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=ru#gourlcryptolang), [Polish](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=pl#gourlcryptolang), [Portuguese](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=pt#gourlcryptolang), [Persian](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=fa#gourlcryptolang), [Korean](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=ko#gourlcryptolang), [Japanese](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=ja#gourlcryptolang), [Indonesian](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=id#gourlcryptolang), [Turkish](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=tr#gourlcryptolang), [Arabic](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=ar#gourlcryptolang), [Simplified Chinese](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=cn#gourlcryptolang), [Traditional Chinese](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=zh#gourlcryptolang), [Hindi](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=hi#gourlcryptolang). We can also add any new language to payment system on [request](https://gourl.io/api-php.html#lan)
* [Affiliate Program for Web Developers](https://gourl.io/affiliates.html) - Earn 0.50% Lifetime from each cryptocoin payment made by users through GoUrl Payment Gateway
* Global, Anonymous, Secure, Zero Risk, No Chargebacks, No visitor registration is needed.
* GoUrl Bitcoin Official [Wordpress Plugin](https://gourl.io/bitcoin-wordpress-plugin.html) - easy to use on your website
Expand Down

0 comments on commit 06bb248

Please sign in to comment.