From 06bb24877261f578db4b36a0733a594b599b43e1 Mon Sep 17 00:00:00 2001 From: "Gourl.io" Date: Tue, 14 Feb 2017 09:14:20 +0000 Subject: [PATCH] Version 1.7.11 Added Turkish Language --- cryptobox.callback.php | 30 ++++++++++++++++++++---------- cryptobox.class.php | 24 ++++++++++++++++-------- cryptobox.js | 2 +- cryptobox.min.js | 2 +- cryptobox.newpayment.php | 18 +++++++++--------- history.txt | 10 +++++++++- readme.md | 4 ++-- 7 files changed, 58 insertions(+), 32 deletions(-) diff --git a/cryptobox.callback.php b/cryptobox.callback.php index 23cdff3..8bb95a5 100644 --- a/cryptobox.callback.php +++ b/cryptobox.callback.php @@ -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 @@ -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) @@ -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 + ?> \ No newline at end of file diff --git a/cryptobox.class.php b/cryptobox.class.php index acb2e08..033948d 100644 --- a/cryptobox.class.php +++ b/cryptobox.class.php @@ -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 @@ -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: @@ -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'))); @@ -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 @@ -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()) @@ -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"); @@ -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%", @@ -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önderdiyseniz, buraya tıklayın", + "msg_not_received" => "%coinNames% henüz alınamadı.
Değişik yada yanlış bir meblâ verdiyseniz, sistem kabul etmemiş olabilir. Bu durumda göderme işleminizi birkaç dakika bekleyerek tekrarlayın. Veya site sahibinden yardım isteyin.", + "msg_received" => "%coinName% ödeme sistemine %amountPaid% %coinLabel% başarıyla gelmiştir !", + "msg_received2" => "%coinName% Capcha`ya %amountPaid% %coinLabel% başarıyla gelmiştir !", + "payment" => "Ödeme metodunu seçiniz", + "pay_in" => "%coinName% ile ödeme"), + "ar" => array("name" => "Arabic", "button" => "اضغط هنا في حالة قمت فعلاً بالارسال %coinNames%", "msg_not_received" => "%coinNames% لم يتم استلامها بعد.
إذا قمت بإرسالها %coinNames% (بالظبط %coinName% مبلغ في دفع واحد), يرجى الإنتظار بضع دقائق لإستلامهم من خلال %coinName% نظام الدفع. إذا قمت بإرسال مبالغ أخرى, نظام الدفع سوف يجاهل الصفقة، وسوف تحتاج لإرسال المبلغ الصحيح مرة أخرى", @@ -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); } ?> \ No newline at end of file diff --git a/cryptobox.js b/cryptobox.js index 7ad16f3..f27a80f 100644 --- a/cryptobox.js +++ b/cryptobox.js @@ -11,7 +11,7 @@ * @category Javascript * @website https://gourl.io * @api https://gourl.io/api.html - * @version 1.7.10 + * @version 1.7.11 * */ diff --git a/cryptobox.min.js b/cryptobox.min.js index 0b07b34..6301a96 100644 --- a/cryptobox.min.js +++ b/cryptobox.min.js @@ -11,7 +11,7 @@ * @category Javascript * @website https://gourl.io * @api https://gourl.io/api.html - * @version 1.7.10 + * @version 1.7.11 * */ diff --git a/cryptobox.newpayment.php b/cryptobox.newpayment.php index 7098d37..a39e1d7 100644 --- a/cryptobox.newpayment.php +++ b/cryptobox.newpayment.php @@ -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" @@ -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":"" @@ -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; } ?> \ No newline at end of file diff --git a/history.txt b/history.txt index 383e025..fe9672f 100644 --- a/history.txt +++ b/history.txt @@ -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) diff --git a/readme.md b/readme.md index 4492278..c148f92 100644 --- a/readme.md +++ b/readme.md @@ -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** @@ -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