From 3b37e8288c25ebe1e34f4d48792db9ebe60f9db4 Mon Sep 17 00:00:00 2001 From: "Gourl.io" Date: Tue, 15 Nov 2016 17:30:01 +0000 Subject: [PATCH] Version 1.7.8 - Added Japanese Language (Thanks to Takiko) - Added Indonesian Language (Thanks to Tejo) - Added Polish Language (Thanks to Kacper) --- Examples/example_basic.php | 4 +- Examples/pay-per-download-multi.php | 6 +++ Examples/pay-per-download.php | 5 +++ Examples/pay-per-membership-multi.php | 2 +- Examples/pay-per-membership.php | 2 +- Examples/pay-per-page-multi.php | 2 +- Examples/pay-per-page.php | 2 +- Examples/pay-per-product-multi.php | 7 ++++ Examples/pay-per-product.php | 4 ++ Examples/pay-per-registration-multi.php | 2 +- Examples/pay-per-registration.php | 2 +- cryptobox.callback.php | 2 +- cryptobox.class.php | 50 +++++++++++++++++------ cryptobox.js | 2 +- cryptobox.min.js | 2 +- history.txt | 53 +++++++++++++++++++++++++ readme.md | 2 +- 17 files changed, 126 insertions(+), 23 deletions(-) create mode 100644 history.txt diff --git a/Examples/example_basic.php b/Examples/example_basic.php index 30a6737..b7a2974 100644 --- a/Examples/example_basic.php +++ b/Examples/example_basic.php @@ -18,7 +18,9 @@ "userFormat" => "COOKIE", // save your user identifier userID in cookies. Available values: COOKIE, SESSION, IPADDRESS, MANUAL "amount" => 0, // amount in cryptocurrency or in USD below "amountUSD" => 2, // price is 2 USD; it will convert to cryptocoins amount, using Live Exchange Rates - // For convert fiat currencies Euro/GBP/etc. to USD, use function convert_currency_live() + // *** For convert Euro/GBP/etc. to USD/Bitcoin, use function convert_currency_live() with Google Finance + // *** examples: convert_currency_live("EUR", "BTC", 22.37) - convert 22.37 Euro to Bitcoin + // *** convert_currency_live("EUR", "USD", 22.37) - convert 22.37 Euro to USD "period" => "24 HOUR", // payment valid period, after 1 day user need to pay again "iframeID" => "", // optional; when iframeID value is empty - system will autogenerate iframe html payment box id "language" => "EN" // english, please contact us and we can add your language diff --git a/Examples/pay-per-download-multi.php b/Examples/pay-per-download-multi.php index 5f3ab80..ab1317e 100644 --- a/Examples/pay-per-download-multi.php +++ b/Examples/pay-per-download-multi.php @@ -24,9 +24,15 @@ $period = "24 HOURS"; // download link will be valid for 24 hours $def_language = "en"; // default Payment Box Language $def_payment = "bitcoin"; // Default Coin in Payment Box + + // *** For convert Euro/GBP/etc. to USD/Bitcoin, use function convert_currency_live() with Google Finance + // *** examples: convert_currency_live("EUR", "BTC", 22.37) - convert 22.37 Euro to Bitcoin + // *** convert_currency_live("EUR", "USD", 22.37) - convert 22.37 Euro to USD // IMPORTANT: Please read description of options here - https://gourl.io/api-php.html#options + + // List of coins that you accept for payments // For example, for accept payments in bitcoins, dogecoins, litecoins use - $available_payments = array('bitcoin', 'dogecoin', 'litecoin'); $available_payments = array('bitcoin', 'litecoin', 'paycoin', 'dogecoin', 'dash', 'speedcoin', 'reddcoin', 'potcoin', 'feathercoin', 'vertcoin', 'vericoin', 'peercoin', 'monetaryunit'); diff --git a/Examples/pay-per-download.php b/Examples/pay-per-download.php index 7233f43..9225ff3 100644 --- a/Examples/pay-per-download.php +++ b/Examples/pay-per-download.php @@ -25,6 +25,11 @@ $public_key = "-your public key for coin box-"; // from gourl.io $private_key = "-your private key for coin box-";// from gourl.io + + // *** For convert Euro/GBP/etc. to USD/Bitcoin, use function convert_currency_live() with Google Finance + // *** examples: convert_currency_live("EUR", "BTC", 22.37) - convert 22.37 Euro to Bitcoin + // *** convert_currency_live("EUR", "USD", 22.37) - convert 22.37 Euro to USD + // IMPORTANT: Please read description of options here - https://gourl.io/api-php.html#options /********************************/ diff --git a/Examples/pay-per-membership-multi.php b/Examples/pay-per-membership-multi.php index e6a1b3f..5f2563f 100644 --- a/Examples/pay-per-membership-multi.php +++ b/Examples/pay-per-membership-multi.php @@ -168,7 +168,7 @@

is_paid()) echo $coins_list; ?>
Language:  
- display_cryptobox(true, 530, 230, "padding:3px 6px;margin:10px;border:10px solid #f7f5f2;"); ?> + display_cryptobox(true, 540, 230, "padding:3px 6px;margin:10px;border:10px solid #f7f5f2;"); ?>





diff --git a/Examples/pay-per-membership.php b/Examples/pay-per-membership.php index c0ff2b4..0f1a005 100644 --- a/Examples/pay-per-membership.php +++ b/Examples/pay-per-membership.php @@ -126,7 +126,7 @@
Language:  
- display_cryptobox(true, 530, 230, "padding:3px 6px;margin:10px;border:10px solid #f7f5f2;"); ?> + display_cryptobox(true, 540, 230, "padding:3px 6px;margin:10px;border:10px solid #f7f5f2;"); ?>





diff --git a/Examples/pay-per-page-multi.php b/Examples/pay-per-page-multi.php index 1b3eab8..e4f07d3 100644 --- a/Examples/pay-per-page-multi.php +++ b/Examples/pay-per-page-multi.php @@ -149,7 +149,7 @@



Language:  
- display_cryptobox(true, 530, 230, "padding:3px 6px;margin:10px"); ?> + display_cryptobox(true, 540, 230, "padding:3px 6px;margin:10px"); ?> diff --git a/Examples/pay-per-page.php b/Examples/pay-per-page.php index d9217e7..7667f38 100644 --- a/Examples/pay-per-page.php +++ b/Examples/pay-per-page.php @@ -110,7 +110,7 @@ Awaiting Payment - Cryptocoin Pay Per Page Access
Language:  
- display_cryptobox(true, 530, 230, "padding:3px 6px;margin:10px"); ?> + display_cryptobox(true, 540, 230, "padding:3px 6px;margin:10px"); ?> diff --git a/Examples/pay-per-product-multi.php b/Examples/pay-per-product-multi.php index 7e93519..2e0cadf 100644 --- a/Examples/pay-per-product-multi.php +++ b/Examples/pay-per-product-multi.php @@ -24,8 +24,15 @@ $def_language = "en"; // default Payment Box Language $def_payment = "bitcoin"; // Default Coin in Payment Box + // *** For convert Euro/GBP/etc. to USD/Bitcoin, use function convert_currency_live() with Google Finance + // *** examples: convert_currency_live("EUR", "BTC", 22.37) - convert 22.37 Euro to Bitcoin + // *** convert_currency_live("EUR", "USD", 22.37) - convert 22.37 Euro to USD + // IMPORTANT: Please read description of options here - https://gourl.io/api-php.html#options + + + // List of coins that you accept for payments // For example, for accept payments in bitcoins, dogecoins, litecoins use - $available_payments = array('bitcoin', 'dogecoin', 'litecoin'); $available_payments = array('bitcoin', 'litecoin', 'paycoin', 'dogecoin', 'dash', 'speedcoin', 'reddcoin', 'potcoin', 'feathercoin', 'vertcoin', 'vericoin', 'peercoin', 'monetaryunit'); diff --git a/Examples/pay-per-product.php b/Examples/pay-per-product.php index e94c1eb..bb82b3c 100644 --- a/Examples/pay-per-product.php +++ b/Examples/pay-per-product.php @@ -26,6 +26,10 @@ // IMPORTANT: Please read description of options here - https://gourl.io/api-php.html#options + // *** For convert Euro/GBP/etc. to USD/Bitcoin, use function convert_currency_live() with Google Finance + // *** examples: convert_currency_live("EUR", "BTC", 22.37) - convert 22.37 Euro to Bitcoin + // *** convert_currency_live("EUR", "USD", 22.37) - convert 22.37 Euro to USD + /********************************/ diff --git a/Examples/pay-per-registration-multi.php b/Examples/pay-per-registration-multi.php index adff652..3f39f71 100644 --- a/Examples/pay-per-registration-multi.php +++ b/Examples/pay-per-registration-multi.php @@ -194,7 +194,7 @@
Language:  
is_paid()) echo "
".$coins_list."
"; ?> - display_cryptobox(true, 530, 230, "border-radius:15px;border:1px solid #eee;padding:3px 6px;margin:10px"); ?> + display_cryptobox(true, 540, 230, "border-radius:15px;border:1px solid #eee;padding:3px 6px;margin:10px"); ?>
is_paid()): ?> diff --git a/Examples/pay-per-registration.php b/Examples/pay-per-registration.php index 8a8df61..da17bcb 100644 --- a/Examples/pay-per-registration.php +++ b/Examples/pay-per-registration.php @@ -152,7 +152,7 @@
Language:  
- display_cryptobox(true, 530, 230, "border-radius:15px;border:2px dashed #eee;padding:3px 6px;margin:10px"); ?> + display_cryptobox(true, 540, 230, "border-radius:15px;border:2px dashed #eee;padding:3px 6px;margin:10px"); ?>
is_paid()): ?> diff --git a/cryptobox.callback.php b/cryptobox.callback.php index c3ce4d1..8e166b9 100644 --- a/cryptobox.callback.php +++ b/cryptobox.callback.php @@ -11,7 +11,7 @@ * @copyright 2014-2016 Delta Consultants * @category Libraries * @website https://gourl.io - * @version 1.7.7 + * @version 1.7.8 * * * This file processes call-backs from Cryptocoin Payment Box server when new payment diff --git a/cryptobox.class.php b/cryptobox.class.php index abd89c1..072fd1d 100644 --- a/cryptobox.class.php +++ b/cryptobox.class.php @@ -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.7 + * @version 1.7.8 * * * CLASS CRYPTOBOX - LIST OF METHODS: @@ -66,7 +66,7 @@ elseif (!defined('ABSPATH')) exit; // Wordpress -define("CRYPTOBOX_VERSION", "1.7.7"); +define("CRYPTOBOX_VERSION", "1.7.8"); // GoUrl supported crypto currencies define("CRYPTOBOX_COINS", json_encode(array('bitcoin', 'litecoin', 'paycoin', 'dogecoin', 'dash', 'speedcoin', 'reddcoin', 'potcoin', 'feathercoin', 'vertcoin', 'vericoin', 'peercoin', 'monetaryunit'))); @@ -257,7 +257,7 @@ public function __construct($options = array()) * Next time your user goes to your website/reloads page they will automatically see the message * that their payment has been received successfully. */ - public function display_cryptobox($submit_btn = true, $width = "530", $height = "230", $box_style = "", $message_style = "", $anchor = "") + public function display_cryptobox($submit_btn = true, $width = "540", $height = "230", $box_style = "", $message_style = "", $anchor = "") { if (!$box_style) $box_style = "border-radius:15px;box-shadow:0 0 12px #aaa;-moz-box-shadow:0 0 12px #aaa;-webkit-box-shadow:0 0 12px #aaa;padding:3px 6px;margin:10px"; if (!$message_style) $message_style = "display:inline-block;max-width:580px;padding:15px 20px;box-shadow:0 0 10px #aaa;-moz-box-shadow: 0 0 10px #aaa;margin:7px;font-size:13px;font-weight:normal;line-height:21px;font-family: Verdana, Arial, Helvetica, sans-serif;"; @@ -1025,16 +1025,18 @@ function get_country_name($countryID, $reverse = false) * * Currency Converter using Google Finance live exchange rates * Example - convert_currency_live("EUR", "USD", 22.37) - convert 22.37euro to usd + convert_currency_live("EUR", "BTC", 22.37) - convert 22.37euro to bitcoin */ 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 - $amount = urlencode($amount); - $from_Currency = urlencode($from_Currency); - $to_Currency = urlencode($to_Currency); - + $from_Currency = trim(strtoupper(urlencode($from_Currency))); + $to_Currency = trim(strtoupper(urlencode($to_Currency))); + + 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 + $url = "https://www.google.com/finance/converter?a=".$amount."&from=".$from_Currency."&to=".$to_Currency; $ch = curl_init(); @@ -1049,7 +1051,7 @@ function convert_currency_live($from_Currency, $to_Currency, $amount) $data = explode('bld>', $rawdata); $data = explode($to_Currency, $data[1]); - return round($data[0], 2); + return round($data[0], ($to_Currency=="BTC"?5:2)); } @@ -1203,6 +1205,14 @@ function run_sql($sql) "payment" => "Выберите способ оплаты", "pay_in" => "Оплата в %coinName%"), + "pl" => array("name" => "Polish", + "button" => "Kliknij tutaj, jeśli już wysłane %coinNames%", + "msg_not_received" => "%coinNames% nie zostały jeszcze otrzymane.
Jeśli już wysłałeś %coinNames% (dokładną sumę %coinName% w jednej płatności, jak pokazano w poniższym polu), proszę poczekać kilka minut, aby system płatności %coinName% mógł ją otrzymać. Jeśli wyślesz jakąkolwiek inną sumę, system płatności zignoruje transakcje i trzeba będzie wysłać poprawną sumę ponownie lub skontaktować się z właścicielem witryny w celu uzyskania pomocy.", + "msg_received" => "System płatności %coinName% otrzymał %amountPaid% %coinLabel% pomyślnie !", + "msg_received2" => "%coinName% Captcha otrzymał %amountPaid% %coinLabel% pomyślnie !", + "payment" => "Wybierz metodę płatnośći", + "pay_in" => "Płatność w %coinName%"), + "nl" => array("name" => "Dutch", "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.", @@ -1227,14 +1237,30 @@ function run_sql($sql) "payment" => "روش پرداخت را انتخاب کنيد", "pay_in" => "پرداخت در %coinName%"), - "ko" => array("name" => "Korean", + "ko" => array("name" => "Korean", "button" => "만약 %coinName% 이미 보냈다면 여기를 클릭하세요", "msg_not_received" => "%coinNames% 아직 받지 못했습니다.
만약 당신이 이미 %coinNames% 을 보냈다면 (아래 박스안에 보여지는 하나의 결제 내에 여분의 %coinName% 의 합계), 결제 시스템이 진행되는 동안 잠시만 기다려주세요. 만약 당신이 합계에 보여지는 것과 다른 수량의 비트코인을 보냈다면, 결제 시스템은 해당 거래를 무시하며, 당신은 다시 올바른 합계만큼의 비트코인을 보내거나 도움을 줄 수 있는 사이트 관리자에게 연락해야 합니다.", "msg_received" => "%coinName% 결제 시스템이 %amountPaid% %coinLabel% 를 성공적으로 받았습니다 !", "msg_received2" => "%coinName% 캡챠가 %amountPaid% %coinLabel% 를 성공적으로 받았습니다 !", "payment" => "결제 방법 선택", "pay_in" => "%coinName% 지급"), + + "ja" => array("name" => "Japanese", + "button" => "%coinNames%を送信済の場合は、こちらをクリックしてください", + "msg_not_received" => "%coinNames%の受取は完了していません。
%coinNames%(下記に表示されているちょうどの%coinNames%を1回のトランザクションとして)をすでに送った場合は、%coinName%決済システムから数分以内に確認があります。指定以上の%coinNames%を送った場合は、システムに反映されませんので、もう一度やり直すか、ウェブサイト管理者へお問合せください。万が一、送信済みの場合は、%coinName%決済システムからの確認を待ってください。", + "msg_received" => "%coinName%決済システムで %amountPaid% %coinLabel% の決済が完了しました !", + "msg_received2" => "%coinName%キャブチャで %amountPaid% %coinLabel% の決済が完了しました !", + "payment" => "決済方法を選択", + "pay_in" => "%coinName%での決済"), + "id" => array("name" => "Indonesian", + "button" => "Klik disini jika anda telah mengirim %coinNames%", + "msg_not_received" => "%coinNames% belum diterima.
Jika kamu sudah mengirim %coinNames% (sejumlah %coinNames% dengan jumlah yang tepat seperti pada kotak dibawah), silahkan tunggu beberapa menit untuk menerima %coinName% lewat sistem pembayaran. Jika anda mengirim sejumlah lain, sistem pembayaran akan mengabaikan transaksinya dan anda perlu mengirim dengan jumlah yang tepat lagi, atau kontak pemilik web untuk membantu.", + "msg_received" => "%coinName% Sistem Pembayaran menerima %amountPaid% %coinLabel% dengan sukses !", + "msg_received2" => "%coinName% Captcha menerima %amountPaid% %coinLabel% dengan sukses !", + "payment" => "Pilih Metode Pembayaran", + "pay_in" => "Pembayaran dalam bentuk %coinName%"), + "ar" => array("name" => "Arabic", "button" => "اضغط هنا في حالة قمت فعلاً بالارسال %coinNames%", "msg_not_received" => "%coinNames% لم يتم استلامها بعد.
إذا قمت بإرسالها %coinNames% (بالظبط %coinName% مبلغ في دفع واحد), يرجى الإنتظار بضع دقائق لإستلامهم من خلال %coinName% نظام الدفع. إذا قمت بإرسال مبالغ أخرى, نظام الدفع سوف يجاهل الصفقة، وسوف تحتاج لإرسال المبلغ الصحيح مرة أخرى", @@ -1277,6 +1303,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 7e96aaa..06fe2c3 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.7 + * @version 1.7.8 * */ diff --git a/cryptobox.min.js b/cryptobox.min.js index 072149c..000c90a 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.7 + * @version 1.7.8 * */ diff --git a/history.txt b/history.txt new file mode 100644 index 0000000..48ce8e4 --- /dev/null +++ b/history.txt @@ -0,0 +1,53 @@ +=============================================================================== +== Version 1.7.8 (November, 2016) +=============================================================================== + +- Added Japanese Language (Thanks to Takiko) + +- Added Indonesian Language (Thanks to Tejo) + +- Added Polish Language (Thanks to Kacper) + + + +=============================================================================== +== Version 1.7.7 (May, 2016) +=============================================================================== + +- Added Korean Language (Thanks to Arthur) + +- Moved IPN function cryptobox_new_payment(...) in separate file cryptobox.newpayment.php + + + +=============================================================================== +== Version 1.7.6 (March, 2016) +=============================================================================== + +- Added Portuguese Language (Thanks to Miguel) + +- Several new enhancements + + + +=============================================================================== +== Version 1.7.5 (January, 2016) +=============================================================================== + +- Added German Language (Thanks to Sebastian, Julius) + +- Added Persian Language (Thanks to Kaveh, Ali-Mehdi) + +- Supporting Right-to-Left Languages + + + +=============================================================================== +== Version 1.7.4 (December, 2015) +=============================================================================== + +- Added Dutch Language (Thanks to Erik) + +- Several new enhancements + + diff --git a/readme.md b/readme.md index df9310c..98069e5 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ GoUrl.io Cryptocoin Payment Gateway API ----------------------------------------- -Version 1.7.7 +Version 1.7.8 **Accept Bitcoin, Litecoin, Paycoin, Dogecoin, Dash, Speedcoin, Reddcoin, Potcoin, Feathercoin, Vertcoin, Vericoin, Peercoin, MonetaryUnit Payments Online on your website**