diff --git a/bitpay/bp_lib.php b/bitpay/bp_lib.php index 9948c05..7e92829 100755 --- a/bitpay/bp_lib.php +++ b/bitpay/bp_lib.php @@ -28,7 +28,9 @@ function bpIPN($url) { $ch = curl_init(); - $request_headers = array(); + $request_headers = array(); + $pluginInfo = MODULE_PAYMENT_BITPAY_EXTENSION_VERSION; + $request_headers[] = 'X-BitPay-Plugin-Info: ' . $pluginInfo; $request_headers[] = 'Content-Type: application/json'; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers); @@ -52,7 +54,9 @@ function bpCurl($url, $apiKey, $post = false) curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $length = strlen($post); } - $request_headers = array(); + $request_headers = array(); + $pluginInfo = MODULE_PAYMENT_BITPAY_EXTENSION_VERSION; + $request_headers[] = 'X-BitPay-Plugin-Info: ' . $pluginInfo; $request_headers[] = 'Content-Type: application/json'; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers); diff --git a/includes/languages/english/modules/payment/bitpay.php b/includes/languages/english/modules/payment/bitpay.php index b7c23ab..0f1d88d 100755 --- a/includes/languages/english/modules/payment/bitpay.php +++ b/includes/languages/english/modules/payment/bitpay.php @@ -26,7 +26,8 @@ // Bitpay Payment Module - Lanugage File -define('MODULE_PAYMENT_BITPAY_TEXT_TITLE', 'BitPay'); +define('MODULE_PAYMENT_BITPAY_TEXT_TITLE', 'BitPay Checkout'); +define('MODULE_PAYMENT_BITPAY_EXTENSION_VERSION', 'BitPay_Checkout_Zencart_2.0.0.1'); define('MODULE_PAYMENT_BITPAY_TEXT_DESCRIPTION', 'Use BitPay.com\'s invoice processing server to automatically accept cryptocurrencies.'); define('MODULE_PAYMENT_BITPAY_TEXT_EMAIL_FOOTER', 'Thank you for using BitPay'); diff --git a/includes/modules/payment/bitpay.php b/includes/modules/payment/bitpay.php index ec7261b..0e893d4 100755 --- a/includes/modules/payment/bitpay.php +++ b/includes/modules/payment/bitpay.php @@ -164,6 +164,7 @@ public function after_process() 'notificationURL' => zen_href_link('bitpay_callback.php', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = true), 'redirectURL' => zen_href_link('account'), 'transactionSpeed' => MODULE_PAYMENT_BITPAY_TRANSACTION_SPEED, + ); #test or prod @@ -213,13 +214,13 @@ public function install() global $db, $messageStack; if (defined('MODULE_PAYMENT_BITPAY_STATUS')) { - $messageStack->add_session('BitPay module already installed.', 'error'); + $messageStack->add_session('BitPay Checkout module already installed.', 'error'); zen_redirect(zen_href_link(FILENAME_MODULES, 'set=payment&module=bitpay', 'NONSSL')); return 'failed'; } $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) " - . "values ('Enable BitPay Module', 'MODULE_PAYMENT_BITPAY_STATUS', 'True', 'Do you want to accept cryptocurrency payments via BitPay.com?', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now());"); + . "values ('Enable BitPay Checkout Module', 'MODULE_PAYMENT_BITPAY_STATUS', 'True', 'Do you want to accept cryptocurrency payments via BitPay.com?', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now());"); //Sandbox or Production @@ -262,6 +263,7 @@ public function remove() public function keys() { return array( + 'MODULE_PAYMENT_BITPAY_EXTENSION_VERSION', 'MODULE_PAYMENT_BITPAY_STATUS', 'MODULE_PAYMENT_BITPAY_STATUS_ENV', 'MODULE_PAYMENT_BITPAY_APIKEY',