diff --git a/Examples/pay-per-product-multi.php b/Examples/pay-per-product-multi.php index f835050..b0329ca 100644 --- a/Examples/pay-per-product-multi.php +++ b/Examples/pay-per-product-multi.php @@ -176,7 +176,7 @@ function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_ is_paid()) echo $coins_list . "

Pay Invoice Now -

"; ?>

Language:  
-display_cryptobox(true, 560, 230, "border-radius:15px;border:1px solid #eee;padding:3px 6px;margin:10px;", "display:inline-block;max-width:580px;padding:15px 20px;border:1px solid #eee;margin:7px;line-height:25px;"); ?> +display_cryptobox(true, 570, 230, "border-radius:15px;border:1px solid #eee;padding:3px 6px;margin:10px;", "display:inline-block;max-width:580px;padding:15px 20px;border:1px solid #eee;margin:7px;line-height:25px;"); ?>


Message :

diff --git a/Examples/pay-per-product.php b/Examples/pay-per-product.php index 7a1bd1a..0966c6d 100644 --- a/Examples/pay-per-product.php +++ b/Examples/pay-per-product.php @@ -136,7 +136,7 @@ function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_

is_paid()) echo "

Pay Invoice Now -

"; else echo "

"; ?>
Language:  
-display_cryptobox(); ?> +display_cryptobox(true, 570, 230); ?>


Message :

diff --git a/cryptobox.callback.php b/cryptobox.callback.php index 690aeb2..4a826ee 100644 --- a/cryptobox.callback.php +++ b/cryptobox.callback.php @@ -7,7 +7,7 @@ * @copyright 2014-2016 Delta Consultants * @category Libraries * @website https://gourl.io - * @version 1.7.4 + * @version 1.7.5 * * * This file processes call-backs from Cryptocoin Payment Box server when new payment diff --git a/cryptobox.class.php b/cryptobox.class.php index 06fa0e1..40319f0 100644 --- a/cryptobox.class.php +++ b/cryptobox.class.php @@ -11,7 +11,7 @@ * @example https://gourl.io/bitcoin-payment-gateway-api.html * @gitHub https://github.com/cryptoapi/Payment-Gateway * @license Free GPLv2 - * @version 1.7.4 + * @version 1.7.5 * * * @@ -58,7 +58,7 @@ elseif (!defined('ABSPATH')) exit; // Wordpress -define("CRYPTOBOX_VERSION", "1.7.4"); +define("CRYPTOBOX_VERSION", "1.7.5"); // GoUrl supported crypto currencies define("CRYPTOBOX_COINS", json_encode(array('bitcoin', 'litecoin', 'paycoin', 'dogecoin', 'dash', 'speedcoin', 'reddcoin', 'potcoin', 'feathercoin', 'vertcoin', 'vericoin', 'peercoin', 'monetaryunit'))); @@ -73,13 +73,13 @@ class Cryptobox { private $webdev_key = ""; // optional, web developer affiliate key private $amount = 0; // amount of cryptocoins which will be used in the payment box/captcha, precision is 4 (number of digits after the decimal), example: 0.0001, 2.444, 100, 2455, etc. /* we will use this $amount value of cryptocoins in the payment box with a small fraction after the decimal point to uniquely identify each of your users individually - * (for example, if you enter 2455 DOGE, one of your user will see 2455.02308 DOGE, and another will see 2455.07832 DOGE, etc) */ + * (for example, if you enter 0.5 BTC, one of your user will see 0.500011 BTC, and another will see 0.500046 BTC, etc) */ private $amountUSD = 0; /* you can specify your price in USD and cryptobox will automatically convert that USD amount to cryptocoin amount using today live cryptocurrency exchange rates. * Using that functionality (price in USD), you don't need to worry if cryptocurrency prices go down or up. * 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, ru - Russian, ar - Arabic, cn - Simplified Chinese, zh - Traditional Chinese, hi - Hindi + private $language = "en"; // cryptobox localisation; en - English, es - Spanish, fr - French, de - German, ru - Russian, nl - Dutch, fa - Persian, 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 @@ -104,12 +104,12 @@ class Cryptobox { private $confirmed = false; // transaction/payment have 6+ confirmations or not private $paymentID = false; // current record id in the table crypto_payments (table stores all payments from your users) private $paymentDate = ""; // transaction/payment datetime in GMT format - private $amountPaid = 0; // exact paid amount; for example, $amount = 10 DOGE and user paid - $amountPaid = 10.03223 DOGE + private $amountPaid = 0; // exact paid amount; for example, $amount = 0.5 BTC and user paid - $amountPaid = 0.50002 BTC private $amountPaidUSD = 0; // approximate paid amount in USD; using cryptocurrency exchange rate on datetime of payment 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, ru - Russian, ar - Arabic, cn - Simplified Chinese, zh - Traditional Chinese, hi - Hindi + private $localisation = ""; // localisation; en - English, es - Spanish, fr - French, de - German, ru - Russian, nl - Dutch, fa - Persian, ar - Arabic, cn - Simplified Chinese, zh - Traditional Chinese, hi - Hindi public function __construct($options = array()) @@ -265,7 +265,7 @@ public function display_cryptobox($submit_btn = true, $width = "530", $height = $id = "id".md5(mt_rand()); if (!$this->paid) $cryptobox_html .= ""; $cryptobox_html .= "
"; - $cryptobox_html .= '
'; + $cryptobox_html .= 'language, array("ar", "fa"))?' dir="rtl"':'').' style="'.htmlspecialchars($message_style, ENT_COMPAT).'">'; if ($this->paid) $cryptobox_html .= "".str_replace(array("%coinName%", "%coinLabel%", "%amountPaid%"), array($this->coinName, $this->coinLabel, $this->amountPaid), $this->localisation[($this->boxType=="paymentbox"?"msg_received":"msg_received2")]).""; @@ -286,7 +286,7 @@ public function display_cryptobox($submit_btn = true, $width = "530", $height = $cryptobox_html .= "
"; $cryptobox_html .= ""; $cryptobox_html .= "
"; - $cryptobox_html .= ""; + $cryptobox_html .= "language, array("ar", "fa"))?' dir="rtl"':'')." style='color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top;display:inline-block;text-decoration:none;font-size:13px;line-height:26px;min-height:28px;margin:20px 0 25px 0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-family:\"Open Sans\",sans-serif;font-size: 13px;font-weight: normal;text-transform: none;'>  ".str_replace(array("%coinName%", "%coinNames%", "%coinLabel%"), array($this->coinName, ($this->coinLabel=='DASH'?$this->coinName:$this->coinName.'s'), $this->coinLabel), $this->localisation["button"]).($this->language!="ar"?" »":"")."  "; $cryptobox_html .= "
"; $cryptobox_html .= "
"; } @@ -363,7 +363,7 @@ public function amount_paid() * * Returns the approximate amount in USD received from the user * using live cryptocurrency exchange rates on the datetime of payment. - * Live Exchange Rates obtained from sites cryptsy.com and bitstamp.net + * Live Exchange Rates obtained from sites poloniex.com and bitstamp.net * and are updated every 30 minutes! * * Or you can directly specify your price in USD and submit it in cryptobox using @@ -375,7 +375,7 @@ public function amount_paid() * price in USD on the datetime of purchase. * * You can accepting cryptocoins on your website with cryptobox variable 'amountUSD'. - * It increase your online sales and also use Cryptsy.com AutoSell feature + * It increase your online sales and also use Poloniex.com AutoSell feature * (to trade your cryptocoins to USD/BTC during next 30 minutes after payment received). */ public function amount_paid_usd() @@ -763,55 +763,43 @@ public function icrc32($str) return $out; } + + public function ip_address() { static $ip_address; if ($ip_address) return $ip_address; - $ip_address = "0.0.0.0"; + $ip_address = ""; + $proxy_ips = (defined("PROXY_IPS")) ? unserialize(PROXY_IPS) : array(); // your server internal proxy ip + $internal_ips = array('127.0.0.0', '127.0.0.1', '127.0.0.2', '192.0.0.0', '192.0.0.1', '192.168.0.0', '192.168.0.1', '192.168.0.253', '192.168.0.254', '192.168.0.255', '192.168.1.0', '192.168.1.1', '192.168.1.253', '192.168.1.254', '192.168.1.255', '192.168.2.0', '192.168.2.1', '192.168.2.253', '192.168.2.254', '192.168.2.255', '10.0.0.0', '10.0.0.1', '11.0.0.0', '11.0.0.1', '1.0.0.0', '1.0.1.0', '1.1.1.1', '255.0.0.0', '255.0.0.1', '255.255.255.0', '255.255.255.254', '255.255.255.255', '0.0.0.0', '::', '0::', '0:0:0:0:0:0:0:0'); - if (!empty($_SERVER['HTTP_CLIENT_IP']) && filter_var($_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) - { - $ip_address = $_SERVER['HTTP_CLIENT_IP']; - } - elseif (!empty($_SERVER['HTTP_X_CLIENT_IP']) && filter_var($_SERVER['HTTP_X_CLIENT_IP'], FILTER_VALIDATE_IP)) - { - $ip_address = $_SERVER['HTTP_X_CLIENT_IP']; - } - elseif (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && filter_var($_SERVER['HTTP_X_CLUSTER_CLIENT_IP'], FILTER_VALIDATE_IP)) - { - $ip_address = $_SERVER['HTTP_X_CLUSTER_CLIENT_IP']; - } - elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) - { - foreach (explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']) as $ip) if (filter_var(trim($ip), FILTER_VALIDATE_IP)) $ip_address = trim($ip); - } - elseif (!empty($_SERVER['HTTP_X_FORWARDED'])) - { - foreach (explode(',', $_SERVER['HTTP_X_FORWARDED']) as $ip) if (filter_var(trim($ip), FILTER_VALIDATE_IP)) $ip_address = trim($ip); - } - elseif (!empty($_SERVER['HTTP_FORWARDED_FOR'])) - { - foreach (explode(',', $_SERVER['HTTP_FORWARDED_FOR']) as $ip) if (filter_var(trim($ip), FILTER_VALIDATE_IP)) $ip_address = trim($ip); - } - elseif (!empty($_SERVER['HTTP_FORWARDED'])) - { - foreach (explode(',', $_SERVER['HTTP_FORWARDED']) as $ip) if (filter_var(trim($ip), FILTER_VALIDATE_IP)) $ip_address = trim($ip); - } - elseif (!empty($_SERVER['HTTP_X_REAL_IP']) && filter_var($_SERVER['HTTP_X_REAL_IP'], FILTER_VALIDATE_IP)) - { - $ip_address = $_SERVER['HTTP_X_REAL_IP']; - } - elseif (!empty($_SERVER['REMOTE_ADDR']) && filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP)) - { - $ip_address = $_SERVER['REMOTE_ADDR']; - } + for ($i = 1; $i <= 2; $i++) + if (!$ip_address) + { + foreach (array('HTTP_CLIENT_IP', 'HTTP_X_CLIENT_IP', 'HTTP_X_CLUSTER_CLIENT_IP', 'X-Forwarded-For', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'HTTP_X_REAL_IP', 'REMOTE_ADDR') as $header) + if (!$ip_address && isset($_SERVER[$header]) && $_SERVER[$header]) + { + $ip = trim($_SERVER[$header]); + $ip2 = ""; + if (strpos($ip, ',') !== FALSE) + { + list($ip, $ip2) = explode(',', $ip, 2); + $ip = trim($ip); + $ip2 = trim($ip2); + } + + if ($ip && filter_var($ip, FILTER_VALIDATE_IP) && !in_array($ip, $proxy_ips) && ($i==2 || !in_array($ip, $internal_ips))) $ip_address = $ip; + elseif ($ip2 && filter_var($ip2, FILTER_VALIDATE_IP) && !in_array($ip2, $proxy_ips) && ($i==2 || !in_array($ip2, $internal_ips))) $ip_address = $ip2; + } + } - $ip_address = trim($ip_address); + if (!$ip_address || !filter_var($ip_address, FILTER_VALIDATE_IP)) $ip_address = '0.0.0.0'; - return $ip_address; + return $ip_address; } + } // end class @@ -1174,7 +1162,7 @@ function run_sql($sql) } - // en - English, es - Spanish, fr - French, ru - Russian, ar - Arabic, cn - Simplified Chinese, zh - Traditional Chinese, hi - Hindi + // en - English, es - Spanish, fr - French, de - German, ru - Russian, nl - Dutch, fa - Persian, ar - Arabic, cn - Simplified Chinese, zh - Traditional Chinese, hi - Hindi $cryptobox_localisation = array( "en" => array("name" => "English", /*19*/ "button" => "Click Here if you have already sent %coinNames%", @@ -1186,20 +1174,28 @@ function run_sql($sql) "es" => array("name" => "Spanish", "button" => "Click aqui si ya has mandado %coinNames%", - "msg_not_received" => "%coinNames% no a sido recibido.
Si ya has enviado %coinNames% (la cantidad exacta de %coinName% en un solo pago como se muestra abajo), porfavor espera unos minutos para recibirlas del %coinName% sistema de pagos. Si has enviado otra cantidad, el sistema de pagos ignorara la transaccion y necesitaras mandar la cantidad correcta de nuevo, o contactar al propietario del sitio para recibir asistencia.", - "msg_received" => "%coinName% Sistema de pago recibió %amountPaid% %coinLabel% Satisfactoriamente !", - "msg_received2" => "%coinName% Captcha recibido %amountPaid% %coinLabel% Satisfactoriamente !", - "payment" => "Seleccionar metodo de pago", + "msg_not_received" => "%coinNames% no han sido recibidos.
Si ya has enviado %coinNames% (la cantidad exacta de %coinName% en un sólo pago como se muestra abajo), por favor espera unos minutos para recibirlas del %coinName% sistema de pagos. Si has enviado otra cantidad, el sistema de pagos ignorará la transacción y necesitarás mandar la cantidad correcta de nuevo, o contactar al propietario del sitio para recibir asistencia.", + "msg_received" => "%coinName% Sistema de pago recibido %amountPaid% %coinLabel% satisfactoriamente !", + "msg_received2" => "%coinName% Captcha recibido %amountPaid% %coinLabel% satisfactoriamente !", + "payment" => "Seleccionar método de pago", "pay_in" => "Pago en %coinName%"), "fr" => array("name" => "French", - "button" => "Cliquez ici si vous avez déjà envoyé %coinNames%", - "msg_not_received" => "%coinNames% pas encore été reçu.
Si vous avez déjà envoyé %coinNames% (l’exacte %coinName% somme en un seul paiement, comme indiqué dans le cadre ci-dessous), S'il vous plaît, attendez quelques minutes de les recevoir par %coinName% Système de paiement. Si vous envoyez toute autre somme, le système de paiement va ignorer la transaction et vous devrez à nouveau envoyer la somme correcte.", - "msg_received" => "%coinName% Système de paiement reçu %amountPaid% %coinLabel% avec succès !", - "msg_received2" => "%coinName% Captcha reçu %amountPaid% %coinLabel% avec succès !", + "button" => "Cliquez ici si vous avez déjà envoyé vos %coinNames%", + "msg_not_received" => "Les %coinNames% n'ont pas encore été reçus.
Si vous avez déjà envoyé les %coinNames% (la somme exacte en un seul paiement, comme indiqué dans le cadre ci-dessous), Veuillez s'il vous plaît attendre quelques minutes le temps que le système reçoive votre paiement en %coinName%. Si vous envoyez toute autre somme, le système de paiement n'identifiera pas la transaction et vous devrez à nouveau envoyer la somme correcte, ou contacter le propriétaire du site via l'assistance.", + "msg_received" => "Le système de paiement %coinName% a reçu %amountPaid% %coinLabel% avec succès !", + "msg_received2" => "Le %coinName% Captcha a reçu %amountPaid% %coinLabel% avec succès !", "payment" => "Sélectionnez la méthode de paiement", "pay_in" => "Paiement en %coinName%"), + "de" => array("name" => "German", + "button" => "Klicke hier wenn du schon %coinNames% gesendet hast", + "msg_not_received" => "%coinNames% wurden bis jetzt noch nicht empfangen.
Wenn du bereits %coinNames% gesendet hast (der exakte %coinName% Betrag für die Zahlung steht in der Box unten) warte bitte ein paar Minuten bis das %coinName% System die Zahlung erhalten hat. Wenn du einen anderen Betrag sendest ignoriert das System die Transaktion und du musst den korrekten Betrag erneut senden, oder den Besitzer der Website kontaktieren um Hilfe zu erhalten.", + "msg_received" => "%coinName% Bezahlsystem hat %amountPaid% %coinLabel% erfolgreich erhalten !", + "msg_received2" => "%coinName% Captcha hat %amountPaid% %coinLabel% erfolgreich erhalten !", + "payment" => "Zahlungmethode auswählen", + "pay_in" => "Zahlung in %coinName%"), + "ru" => array("name" => "Russian", "button" => "Нажмите здесь если вы уже послали %coinNames%", "msg_not_received" => "%coinNames% не получены ещё.
Если вы уже послали %coinNames% (точную сумму %coinName% одним платежём как показано ниже), пожалуйста подождите несколько минут для получения их %coinName% платёжной системой. Если вы послали любую другую сумму, платёжная система будет игнорировать это и вам нужно будет послать правильную сумму опять, или свяжитесь с владельцем сайта для помощи", @@ -1209,13 +1205,21 @@ function run_sql($sql) "pay_in" => "Оплата в %coinName%"), "nl" => array("name" => "Dutch", - "button" => "Click Hier als je al %coinNames% hebt verstuurd", - "msg_not_received" => "%coinNames% zijn nog niet ontvangen.
Als je al %coinNames% verstuurd hebt, (het exacte bedrag in %coinName% staat in het vak hieronder), wacht dan a.u.b. een paar minuten tot ze ontvangen zijn door het %coinName% Betaal Systeem. Als u een ander bedrag overmaakt, zal het Betaal Systeem de transactie negeren, en zult u alsnog het correcte bedrag moeten overmaken, of contact opnemen met de beheerder voor verdere assistentie.", + "button" => "Klik hier als je al %coinNames% hebt verstuurd", + "msg_not_received" => "%coinNames% zijn nog niet ontvangen.
Als je al %coinNames% verstuurd hebt, (het exacte bedrag in %coinName% staat in het vak hieronder), wacht dan a.u.b. een paar minuten tot ze ontvangen zijn door het %coinName% Betaal Systeem. Als u een ander bedrag verstuurd, zal de transactie worden genegeerd, u zult dan alsnog het correcte bedrag moeten overmaken of contact opnemen met de site beheerder voor verdere assistentie.", "msg_received" => "%coinName% Betaal Systeem heeft %amountPaid% %coinLabel% succesvol ontvangen !", "msg_received2" => "%coinName% Captcha Systeem heeft %amountPaid% %coinLabel% succesvol ontvangen !", - "payment" => "Kies uw betaal methode", + "payment" => "Kies uw betaalmethode", "pay_in" => "Betaling in %coinName%"), + "fa" => array("name" => "Persian", + "button" => "اگر شما از قبل ارسال %coinName% اينجا را کليک کنيد", + "msg_not_received" => "%coinNames% هنوز دريافت نشده است
اگر شما قبلا ارسال کرديد %coinNames% ,به صورت دقيق %coinName% مجموع در يک پرداخت همانگونه که در کادر زير نشان داده شده است , لطفا چند دقيقه براي دريافت از طرف %coinName% پرداخت سيستم صبر کنيد. اگر شما هر گونه مجموع ديگري از پرداخت را فرستاده ايد, سيستم پرداخت معامله را ناديده مي گيرد و شما نياز به ارسال مجموع درستي که ذکر شد داريد, يا با دارنده سايت براي کمک و توضيحات بيشتر تماس بگيريد.", + "msg_received" => "%coinName% سيستم پرداخت %amountPaid% %coinLabel% را با موفقيت دريافت کرد !", + "msg_received2" => "%coinName% کپچا %amountPaid% %coinLabel% را با موفقيت دريافت کرد !", + "payment" => "روش پرداخت را انتخاب کنيد", + "pay_in" => "پرداخت در %coinName%"), + "ar" => array("name" => "Arabic", "button" => "اضغط هنا في حالة قمت فعلاً بالارسال %coinNames%", "msg_not_received" => "%coinNames% لم يتم استلامها بعد.
إذا قمت بإرسالها %coinNames% (بالظبط %coinName% مبلغ في دفع واحد), يرجى الإنتظار بضع دقائق لإستلامهم من خلال %coinName% نظام الدفع. إذا قمت بإرسال مبالغ أخرى, نظام الدفع سوف يجاهل الصفقة، وسوف تحتاج لإرسال المبلغ الصحيح مرة أخرى", @@ -1258,6 +1262,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.config.php b/cryptobox.config.php index 40f016a..4d3941f 100644 --- a/cryptobox.config.php +++ b/cryptobox.config.php @@ -1,6 +1,6 @@ =t&&0>=a||t>0&&a>0)alert("You can use in payment box options one of variable only: amount or amountUSD. You cannot place values in that two variables together");else if(0!=t&&(t-0!=t||1e-4>t))alert("Invalid payment box amount");else if(0!=a&&(a-0!=a||.01>a))alert("Invalid payment box amountUSD");else if("COOKIE"!=s&&"SESSION"!=s&&"IPADDRESS"!=s&&"MANUAL"!=s)alert("Invalid payment box userFormat value");else if("COOKIE"==s&&""==p)alert("Invalid payment box cookie name");else if("COOKIE"==s&&""==cryptobox_cookie(p))alert("Please enable Cookies in your browser !");else if("COOKIE"==s&&cryptobox_cookie(p)!=c)alert("Invalid cookie value. It may be you are viewing an older copy of the page that is stored in the website cache. Please contact with website owner, need to disable/turn-off caching for current page");else if(""==d)alert("Invalid orderID");else if(""==i)alert("Invalid period");else if(50!=n.length)alert("Invalid public key");else if(""!=m&&(-1==m.indexOf("DEV")||m.length<20))alert("Invalid webdev_key, leave it empty");else if(""==u)alert("Invalid payment box hash");else{var y="https://coins.gourl.io/b/"+encodeURIComponent(e)+"/c/"+encodeURIComponent(o)+"/p/"+encodeURIComponent(n)+"/a/"+encodeURIComponent(t)+"/au/"+encodeURIComponent(a)+"/pe/"+encodeURIComponent(i.replace(" ","_"))+"/l/"+encodeURIComponent(l)+"/i/"+encodeURIComponent(r)+"/u/"+encodeURIComponent(c)+"/us/"+encodeURIComponent(s)+"/o/"+encodeURIComponent(d)+(m?"/w/"+encodeURIComponent(m):"")+(I>0?"/ws/"+encodeURIComponent(I):"")+(f>0?"/hs/"+encodeURIComponent(f):"")+"/h/"+encodeURIComponent(u)+"/z/"+Math.random(),h=document.getElementById(r);null==h?alert('Cryptobox iframeID HTML with id "'+r+'" not exist!'):h.src=y}return!0}function cryptobox_msghide(e){setTimeout(function(){document.getElementById(e).style.display="none"},15e3)} +function cryptobox_cookie(e){for(var o=e+"=",n=document.cookie.split(";"),t=0;t=t&&0>=a||t>0&&a>0)alert("You can use in payment box options one of variable only: amount or amountUSD. You cannot place values in that two variables together");else if(0!=t&&(t-0!=t||1e-4>t))alert("Invalid payment box amount");else if(0!=a&&(a-0!=a||.01>a))alert("Invalid payment box amountUSD");else if("COOKIE"!=s&&"SESSION"!=s&&"IPADDRESS"!=s&&"MANUAL"!=s)alert("Invalid payment box userFormat value");else if("COOKIE"==s&&""==p)alert("Invalid payment box cookie name");else if("COOKIE"==s&&""==cryptobox_cookie(p))null!=document.getElementById(r).src&&(document.getElementById(r).src="https://gourl.io/images/crypto_cookies.png"),alert("Please enable Cookies in your Browser !");else if("COOKIE"==s&&cryptobox_cookie(p)!=c)alert("Invalid cookie value. It may be you are viewing an older copy of the page that is stored in the website cache. Please contact with website owner, need to disable/turn-off caching for current page");else if(""==d)alert("Invalid orderID");else if(""==i)alert("Invalid period");else if(50!=n.length)alert("Invalid public key");else if(""!=m&&(-1==m.indexOf("DEV")||m.length<20))alert("Invalid webdev_key, leave it empty");else if(""==u)alert("Invalid payment box hash");else{var b="https://coins.gourl.io/b/"+encodeURIComponent(e)+"/c/"+encodeURIComponent(o)+"/p/"+encodeURIComponent(n)+"/a/"+encodeURIComponent(t)+"/au/"+encodeURIComponent(a)+"/pe/"+encodeURIComponent(i.replace(" ","_"))+"/l/"+encodeURIComponent(l)+"/i/"+encodeURIComponent(r)+"/u/"+encodeURIComponent(c)+"/us/"+encodeURIComponent(s)+"/o/"+encodeURIComponent(d)+(m?"/w/"+encodeURIComponent(m):"")+(I>0?"/ws/"+encodeURIComponent(I):"")+(f>0?"/hs/"+encodeURIComponent(f):"")+"/h/"+encodeURIComponent(u)+"/z/"+Math.random(),h=document.getElementById(r);null==h?alert('Cryptobox iframeID HTML with id "'+r+'" not exist!'):h.src=b}return!0}function cryptobox_msghide(e){setTimeout(function(){document.getElementById(e).style.display="none"},15e3)} + diff --git a/readme.md b/readme.md index 1ad43e7..4c330ac 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ GoUrl.io Cryptocoin Payment Gateway API ----------------------------------------- -Version 1.7.4 +Version 1.7.5 **Accept Bitcoin, Litecoin, Paycoin, Dogecoin, Dash, Speedcoin, Reddcoin, Potcoin, Feathercoin, Vertcoin, Vericoin, Peercoin, MonetaryUnit Payments Online on your website** @@ -21,11 +21,11 @@ Our Payment Gateway with Instant Checkout allows you to easily organise your web * [Pay-Per-Registration](http://gourl.io/lib/examples/pay-per-registration-multi.php) - earn money on user registration on your website; stop spam * [Pay-Per-Page-Access](http://gourl.io/lib/examples/pay-per-page-multi.php) - sell paid access to selected web page(es) to unregistered visitors online * [Pay-Per-Membership](http://gourl.io/lib/examples/pay-per-membership-multi.php) - sell monthly/daily membership of your website to members online -* Set your own Prices in USD. It will automatically convert usd to cryptocoins using Live [exchange rates](https://cryptsy.com/) +* Set your own Prices in USD. It will automatically convert usd to cryptocoins using Live [exchange rates](https://poloniex.com/) * 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), [Russian](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=ru#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), [Russian](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=ru#gourlcryptolang), [Dutch](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=nl#gourlcryptolang), [Persian](https://gourl.io/bitcoin-payment-gateway-api.html?gourlcryptolang=fa#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 @@ -76,10 +76,10 @@ You can use the following steps to sell your products on your website for crypto * [Install](https://gourl.io/api-php.html#installation) GoUrl crypto Payment Box on your website and dynamically configure order id, currency, amount to pay, etc. Or use [Monetiser Online](https://gourl.io/view/newurl/Cryptocoin_Monetiser_Make_Money_Online.html) if you don't have your own website. * You can accept payments in Bitcoins only or you can accept other coins - Dogecoin, Litecoin, Reddcoin, etc also. See [Demo1](http://gourl.io/lib/examples/pay-per-product-multi.php) (multiple coins) or [Demo2](http://gourl.io/lib/examples/pay-per-membership.php?gourlcryptocoin=bitcoin) (Bitcoin only) * When you [setup](https://gourl.io/editrecord/coin_boxes/0) Cryptocoin Payment Box, you can enter the [original amount](https://gourl.io/images/instruction-config2.png) in USD or in cryptocoins. The USD amount will be automatically converted to cryptocoin amount using today's LIVE cryptocurrency exchange rates (updated every 30 minutes) and the cryptocoin amount will be displayed in the payment box. For example, if you entered 20 USD, it will display 0.059 BTC in the payment box. -* You will need to create an account on [Cryptsy.com](https://www.cryptsy.com/) or on [Bitstamp.net](https://www.bitstamp.net/) (trading platforms) -* [Setup](https://gourl.io/images/instruction-config3.png) so that all your received payments are automatically forwarded from your GoUrl.io account to your account on Cryptsy / Bitstamp (enter your Cryptsy/Bitstamp coin wallet address in gourl [payment box settings](https://gourl.io/images/instruction-config3.png)). And use the "autosell" feature (auto trade your cryptocoins to USD) on Cryptsy/Bitstamp. -* Using that functionality you don't need to worry if cryptocurrency prices go down or up. Within 1-2 hours after a cryptocoin payment has been received by you, your payment will be automatically converted to USD on Cryptsy/Bitstamp and will be kept on your Cryptsy/Bitstamp USD account. -* Later you can withdraw your USD from Cryptsy/Bitstamp to your own USA/UK/France/etc bank account +* You will need to create an account on [Poloniex.com](https://poloniex.com/) or on [Bitstamp.net](https://www.bitstamp.net/) (trading platforms) +* [Setup](https://gourl.io/images/instruction-config3.png) so that all your received payments are automatically forwarded from your GoUrl.io account to your account on Poloniex / Bitstamp (enter your Poloniex/Bitstamp coin wallet address in gourl [payment box settings](https://gourl.io/images/instruction-config3.png)). And use the "autosell" feature (auto trade your cryptocoins to USD) on Poloniex/Bitstamp. +* Using that functionality you don't need to worry if cryptocurrency prices go down or up. Within 1-2 hours after a cryptocoin payment has been received by you, your payment will be automatically converted to USD on Poloniex/Bitstamp and will be kept on your Poloniex/Bitstamp USD account. +* Later you can withdraw your USD from Poloniex/Bitstamp to your own USA/UK/France/etc bank account **B. End User / Buyer Side** @@ -203,4 +203,4 @@ PHP Examples / Live Demo : * **Pay-Per-Page-Access**: Example19 - [multiple crypto](http://gourl.io/lib/examples/pay-per-page-multi.php), Example10 - [bitcoin](http://gourl.io/lib/examples/pay-per-page.php) * **Pay-Per-Membership**: Example11 - [multiple crypto](http://gourl.io/lib/examples/pay-per-membership-multi.php), Example12 - [bitcoin](http://gourl.io/lib/examples/pay-per-membership.php) - \ No newline at end of file + \ No newline at end of file