Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
added version info
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoshualewis committed Jul 30, 2019
1 parent 1f21534 commit 1f9b93e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
8 changes: 6 additions & 2 deletions bitpay/bp_lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion includes/languages/english/modules/payment/bitpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
6 changes: 4 additions & 2 deletions includes/modules/payment/bitpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 1f9b93e

Please sign in to comment.