Skip to content

Commit

Permalink
ver 1.4
Browse files Browse the repository at this point in the history
update
  • Loading branch information
cryptoapi committed Oct 9, 2017
1 parent 5bee0fb commit 294dcbb
Show file tree
Hide file tree
Showing 10 changed files with 1,669 additions and 1,396 deletions.
4 changes: 2 additions & 2 deletions css/style.admin.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

.gourlnowrap { white-space: nowrap; }

.gourladmin h2 {
font-family: 'Tenor Sans', sans-serif;
Expand Down Expand Up @@ -317,10 +318,9 @@
.gourladmin .gourlwidetable .column-addr { overflow: hidden; white-space:nowrap; text-align: right; }

.gourladmin .gourlwidetable .gourlnofilecolumn .column-orderID { width: 11%; text-align: left; }
.gourladmin .gourlwidetable .gourlnofilecolumn .column-userID { width: 11%; }
.gourladmin .gourlwidetable .gourlnofilecolumn .column-amount { width: 8.5%; }
.gourladmin .gourlwidetable .gourlnofilecolumn .column-amountUSD { width: 8%; }
.gourladmin .gourlwidetable .gourlnofilecolumn .column-txDate { width: 7.5%; }
.gourladmin .gourlwidetable .gourlnofilecolumn .column-unrecognised { width: 4.7%; }
.gourladmin .gourlwidetable .gourlnofilecolumn .column-txConfirmed { width: 4.7%; }


Expand Down
4 changes: 3 additions & 1 deletion css/style.front.css
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,6 @@

.edd-order-tx-id span {
word-break: break-all;
}
}

.woocommerce > .woocommerce-order > ul.woocommerce-thankyou-order-details li { margin-bottom: 15px; }
536 changes: 387 additions & 149 deletions gourl.php

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions gourl_wordpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: GoUrl Bitcoin Payment Gateway & Paid Downloads & Membership
Plugin URI: https://gourl.io/bitcoin-wordpress-plugin.html
Description: Official <a href="https://gourl.io">GoUrl.io</a> Bitcoin Payment Gateway Plugin for Wordpress. Provides <a href="https://gourl.io/lib/examples/pay-per-product-multi.php">Pay-Per-Product</a>, <a href="https://gourl.io/lib/examples/pay-per-download-multi.php">Pay-Per-Download</a>, <a href="https://gourl.io/lib/examples/pay-per-membership-multi.php">Pay-Per-Membership</a>, <a href="https://gourl.io/lib/examples/pay-per-page-multi.php">Pay-Per-View</a> and bitcoin/altcoin payment gateways for - <a href='https://gourl.io/bitcoin-payments-woocommerce.html'>WooCommerce</a>, <a href='https://gourl.io/bitcoin-payments-wp-ecommerce.html'>WP eCommerce</a>, <a href='https://gourl.io/bitcoin-payments-jigoshop.html'>Jigoshop</a>, <a href='https://gourl.io/bitcoin-payments-wpmudev-marketpress.html'>MarketPress</a>, <a href='https://gourl.io/bitcoin-appthemes-classipress-jobroller-vantage-etc.html'>AppThemes</a>, <a href='https://gourl.io/bitcoin-payments-paid-memberships-pro.html'>Paid Memberships Pro</a>, <a href='https://gourl.io/bbpress-premium-membership.html'>bbPress</a>, <a href='https://gourl.io/bitcoin-donations-wordpress-plugin.html'>Give Donations</a>, etc. Accept Bitcoin, BitcoinCash, Litecoin, Dash, Dogecoin, Speedcoin, Reddcoin, Potcoin, Feathercoin, Vertcoin, Peercoin, MonetaryUnit payments online. No Chargebacks, Global, Secure. All in automatic mode.
Version: 1.3.18
Version: 1.4.0
Author: GoUrl.io
Author URI: https://gourl.io
License: GPLv2
Expand Down Expand Up @@ -31,10 +31,11 @@

DEFINE('GOURL', "gourl");
DEFINE('GOURL_PREVIEW', "gourladmin");
DEFINE('GOURL_VERSION', "1.3.18");
DEFINE('GOURL_VERSION', "1.4.0");
DEFINE('GOURL_ADMIN', admin_url("admin.php?page="));
DEFINE('GOURL_DIR', $dir_arr["basedir"]."/".GOURL.'/');
DEFINE('GOURL_DIR2', $dir_arr["baseurl"]."/".GOURL.'/');
DEFINE('GOURL_IMG', plugins_url('/images/', __FILE__));
DEFINE('GOURL_BASENAME', plugin_basename(__FILE__));
DEFINE("GOURL_PERMISSION", "add_users");

Expand All @@ -47,6 +48,8 @@
DEFINE('GOURL_LOCK_START', "<!-- start_gourlpayment_box -->");
DEFINE('GOURL_LOCK_END', "<!-- end_gourlpayment_box -->");

DEFINE('GOURL_RATES', json_encode(array("USD" => "US Dollar", "EUR" => "Euro", "GBP" => "British Pound", "AUD" => "Australian Dollar", "BRL" => "Brazilian Real", "CAD" => "Canadian Dollar", "CHF" => "Swiss Franc", "CLP" => "Chilean Peso", "CNY" => "Chinese Yuan Renminbi", "DKK" => "Danish Krone", "HKD"=> "Hong Kong Dollar", "INR" => "Indian Rupee", "ISK" => "Icelandic Krona", "JPY" => "Japanese Yen", "KRW" => "South Korean Won", "NZD" => "New Zealand Dollar", "PLN" => "Polish Zloty", "RUB" => "Russian Ruble", "SEK" => "Swedish Krona", "SGD" => "Singapore Dollar", "THB" => "Thai Baht", "TWD" => "Taiwan New Dollar")));

DEFINE('CRYPTOBOX_WORDPRESS', true);

unset($dir_arr);
Expand All @@ -64,4 +67,4 @@
add_action('plugins_loaded', 'gourl_load_textdomain');

if (function_exists( 'mb_stripos' ) && function_exists( 'mb_strripos' ) && function_exists( 'curl_init' ) && function_exists( 'mysqli_connect' ) && version_compare(phpversion(), '5.4.0', '>=')) $gourl = new gourlclass();

12 changes: 7 additions & 5 deletions includes/cryptobox.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ public function __construct($options = array())

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");
if ($this->amount && (!is_numeric($this->amount) || $this->amount < 0.0001 || $this->amount > 500000000)) die("Invalid Amount - ".sprintf('%.8f', $this->amount)." $this->coinLabel. Allowed range: 0.0001 .. 500,000,000");
if ($this->amountUSD && (!is_numeric($this->amountUSD) || $this->amountUSD < 0.01 || $this->amountUSD > 1000000)) die("Invalid amountUSD - ".sprintf('%.8f', $this->amountUSD)." USD. Allowed range: 0.01 .. 1,000,000");

$this->period = trim(strtoupper(str_replace(" ", "", $this->period)));
if (substr($this->period, -1) == "S") $this->period = substr($this->period, 0, -1);
Expand Down Expand Up @@ -1235,14 +1235,16 @@ function convert_currency_live($from_Currency, $to_Currency, $amount)
if ($from_Currency == "TRL") $from_Currency = "TRY"; // fix for Turkish Lyra
if ($from_Currency == "ZWD") $from_Currency = "ZWL"; // fix for Zimbabwe Dollar
if ($from_Currency == "RIAL") $from_Currency = "IRR"; // fix for Iranian Rial
if ($from_Currency == "RM") $from_Currency = "MYR"; // fix for Malaysian Ringgit

$url = "https://finance.google.com/finance/converter?a=".$amount."&from=".$from_Currency."&to=".$to_Currency;

$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko");
curl_setopt ($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko");
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 20);
curl_setopt ($ch, CURLOPT_TIMEOUT, 20);
$res = curl_exec($ch);
Expand Down Expand Up @@ -1518,14 +1520,14 @@ function run_sql($sql)
);

if(!defined("CRYPTOBOX_LOCALISATION")) define("CRYPTOBOX_LOCALISATION", json_encode($cryptobox_localisation));
unset($cryptobox_localisation);
unset($cryptobox_localisation);

if (!CRYPTOBOX_WORDPRESS || defined("CRYPTOBOX_PRIVATE_KEYS"))
{
$cryptobox_private_keys = explode("^", CRYPTOBOX_PRIVATE_KEYS);
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);
}
?>
Loading

0 comments on commit 294dcbb

Please sign in to comment.