[TEP-COMMIT] [CVS catalog] use the new database class
hpdl-OfajU3CKLf1/[email protected] 24 Feb 2005 01:13:44 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>catalog/catalog/includes/modules/payment</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">authorizenet.php</a></tt></td><td align="right" id="added">+37</td><td align="right" id="removed">-25</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/authorizenet.php?rev=1.54&content-type=text/vnd.viewcvs-markup">1.54</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/authorizenet.php.diff?r1=1.54&r2=1.55">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/authorizenet.php?rev=1.55&content-type=text/vnd.viewcvs-markup">1.55</a></td></tr>
<tr class="alt"><td><tt><a href="#file2">cc.php</a></tt></td><td align="right" id="added">+27</td><td align="right" id="removed">-14</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/cc.php?rev=1.59&content-type=text/vnd.viewcvs-markup">1.59</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/cc.php.diff?r1=1.59&r2=1.60">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/cc.php?rev=1.60&content-type=text/vnd.viewcvs-markup">1.60</a></td></tr>
<tr><td><tt><a href="#file3">cod.php</a></tt></td><td align="right" id="added">+26</td><td align="right" id="removed">-13</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/cod.php?rev=1.30&content-type=text/vnd.viewcvs-markup">1.30</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/cod.php.diff?r1=1.30&r2=1.31">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/cod.php?rev=1.31&content-type=text/vnd.viewcvs-markup">1.31</a></td></tr>
<tr class="alt"><td><tt><a href="#file4">ipayment.php</a></tt></td><td align="right" id="added">+31</td><td align="right" id="removed">-18</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/ipayment.php?rev=1.40&content-type=text/vnd.viewcvs-markup">1.40</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/ipayment.php.diff?r1=1.40&r2=1.41">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/ipayment.php?rev=1.41&content-type=text/vnd.viewcvs-markup">1.41</a></td></tr>
<tr><td><tt><a href="#file5">moneyorder.php</a></tt></td><td align="right" id="added">+27</td><td align="right" id="removed">-14</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/moneyorder.php?rev=1.11&content-type=text/vnd.viewcvs-markup">1.11</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/moneyorder.php.diff?r1=1.11&r2=1.12">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/moneyorder.php?rev=1.12&content-type=text/vnd.viewcvs-markup">1.12</a></td></tr>
<tr class="alt"><td><tt><a href="#file6">nochex.php</a></tt></td><td align="right" id="added">+27</td><td align="right" id="removed">-14</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/nochex.php?rev=1.16&content-type=text/vnd.viewcvs-markup">1.16</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/nochex.php.diff?r1=1.16&r2=1.17">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/nochex.php?rev=1.17&content-type=text/vnd.viewcvs-markup">1.17</a></td></tr>
<tr><td><tt><a href="#file7">paypal.php</a></tt></td><td align="right" id="added">+28</td><td align="right" id="removed">-15</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/paypal.php?rev=1.45&content-type=text/vnd.viewcvs-markup">1.45</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/paypal.php.diff?r1=1.45&r2=1.46">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/paypal.php?rev=1.46&content-type=text/vnd.viewcvs-markup">1.46</a></td></tr>
<tr class="alt"><td><tt><a href="#file8">pm2checkout.php</a></tt></td><td align="right" id="added">+29</td><td align="right" id="removed">-16</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/pm2checkout.php?rev=1.25&content-type=text/vnd.viewcvs-markup">1.25</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/pm2checkout.php.diff?r1=1.25&r2=1.26">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/pm2checkout.php?rev=1.26&content-type=text/vnd.viewcvs-markup">1.26</a></td></tr>
<tr><td><tt><a href="#file9">psigate.php</a></tt></td><td align="right" id="added">+31</td><td align="right" id="removed">-18</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/psigate.php?rev=1.23&content-type=text/vnd.viewcvs-markup">1.23</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/psigate.php.diff?r1=1.23&r2=1.24">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/psigate.php?rev=1.24&content-type=text/vnd.viewcvs-markup">1.24</a></td></tr>
<tr class="alt"><td><tt><a href="#file10">secpay.php</a></tt></td><td align="right" id="added">+30</td><td align="right" id="removed">-17</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/secpay.php?rev=1.39&content-type=text/vnd.viewcvs-markup">1.39</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/secpay.php.diff?r1=1.39&r2=1.40">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/secpay.php?rev=1.40&content-type=text/vnd.viewcvs-markup">1.40</a></td></tr>
<tr><td></td><td align="right" id="added">+293</td><td align="right" id="removed">-164</td><td></td></tr>
</table>
<small id="info">10 modified files</small><br />
<pre class="comment">
use the new database class
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment">payment</a><br /></span>
<div class="fileheader"><big><b>authorizenet.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/authorizenet.php?rev=1.54&content-type=text/vnd.viewcvs-markup">1.54</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/authorizenet.php.diff?r1=1.54&r2=1.55">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/authorizenet.php?rev=1.55&content-type=text/vnd.viewcvs-markup">1.55</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.54 -r1.55
--- authorizenet.php 2004/07/22 22:00:10 1.54
+++ authorizenet.php 2005/02/24 01:13:34 1.55
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">4</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -116,16 +116,22 @@
</small></pre><pre class="diff" id="context"> // end authorize.net code
function update_status() {
</pre><pre class="diff" id="removed">- global $order;
</pre><pre class="diff" id="added">+ global $osC_Database, $order;
</pre><pre class="diff" id="context">
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_AUTHORIZENET_ZONE > 0) ) {
$check_flag = false;
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_AUTHORIZENET_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
- while ($check = tep_db_fetch_array($check_query)) {
- if ($check['zone_id'] < 1) {
</pre><pre class="diff" id="added">+
+ $Qcheck = $osC_Database->query('select zone_id from :table_zones_to_geo_zones where geo_zone_id = :geo_zone_id and zone_country_id = :zone_country_id order by zone_id');
+ $Qcheck->bindTable(':table_zones_to_geo_zones', TABLE_ZONES_TO_GEO_ZONES);
+ $Qcheck->bindInt(':geo_zone_id', MODULE_PAYMENT_AUTHORIZENET_ZONE);
+ $Qcheck->bindInt(':zone_country_id', $order->billing['country']['id']);
+ $Qcheck->execute();
+
+ while ($Qcheck->next()) {
+ if ($Qcheck->valueInt('zone_id') < 1) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
</pre><pre class="diff" id="removed">- } elseif ($<span id="removedchars">check['zone_id']</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="added">+ } elseif ($<span id="addedchars">Qcheck->valueInt('zone_id')</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
}
</pre><pre class="diff"><small id="info">@@ -483,33 +489,39 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_AUTHORIZENET_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_PAYMENT_AUTHORIZENET_STATUS');
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> return $this->_check;
}
</pre><pre class="diff" id="removed">- function remove() {
- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ function install() {
+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Authorize.net Module', 'MODULE_PAYMENT_AUTHORIZENET_STATUS', 'True', 'Do you want to accept Authorize.net payments?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Include file that defines the Login Username', 'MODULE_PAYMENT_AUTHORIZENET_LOGIN_FILE', '" . DIR_FS_CATALOG . "includes/local/auth_login.php', 'The full path to the file that defines the login username used for the Authorize.net service. This should be a secure file. The PHP variable MODULE_PAYMENT_AUTHORIZENET_LOGIN must be defined here.', '6', '0', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Transaction Key', 'MODULE_PAYMENT_AUTHORIZENET_TXNKEY', 'Test', 'Transaction Key used for encrypting TP data', '6', '0', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_AUTHORIZENET_TESTMODE', 'Test', 'Transaction mode used for processing orders', '6', '0', 'tep_cfg_select_option(array(\'Test\', \'Production\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Method', 'MODULE_PAYMENT_AUTHORIZENET_METHOD', 'Credit Card', 'Transaction method used for processing orders', '6', '0', 'tep_cfg_select_option(array(\'Credit Card\', \'eCheck\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Gateway Method', 'MODULE_PAYMENT_AUTHORIZENET_GATEWAY_METHOD', 'AIM', 'Gateway transaction method used for processing orders', '6', '0', 'tep_cfg_select_option(array(\'AIM\', \'SIM\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Customer Notifications', 'MODULE_PAYMENT_AUTHORIZENET_EMAIL_CUSTOMER', 'False', 'Should Authorize.Net e-mail a receipt to the customer?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_AUTHORIZENET_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_AUTHORIZENET_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_AUTHORIZENET_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Credit Card Mode', 'MODULE_PAYMENT_AUTHORIZENET_CREDIT_CAPTURE', 'AUTH_CAPTURE', 'Credit Card processing method. Authorize Only or Authorize and Capture (Collect Funds)', '6', '0', 'tep_cfg_select_option(array(\'AUTH_CAPTURE\', \'AUTH_ONLY\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Wells Fargo Secure Source Account?', 'MODULE_PAYMENT_AUTHORIZENET_WELLSFARGO', 'No', 'Set to YES if your account is with Wells Fargo', '6', '0', 'tep_cfg_select_option(array(\'No\', \'Yes\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Path to cURL', 'MODULE_PAYMENT_AUTHORIZENET_CURL', '/usr/local/bin/curl', 'The full path to the cURL program (ask your hosting provider)', '6', '0', now())");
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- function install() {
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Authorize.net Module', 'MODULE_PAYMENT_AUTHORIZENET_STATUS', 'True', 'Do you want to accept Authorize.net payments?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Include file that defines the Login Username', 'MODULE_PAYMENT_AUTHORIZENET_LOGIN_FILE', '" . DIR_FS_CATALOG . "includes/local/auth_login.php', 'The full path to the file that defines the login username used for the Authorize.net service. This should be a secure file. The PHP variable MODULE_PAYMENT_AUTHORIZENET_LOGIN must be defined here.', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Transaction Key', 'MODULE_PAYMENT_AUTHORIZENET_TXNKEY', 'Test', 'Transaction Key used for encrypting TP data', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_AUTHORIZENET_TESTMODE', 'Test', 'Transaction mode used for processing orders', '6', '0', 'tep_cfg_select_option(array(\'Test\', \'Production\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Method', 'MODULE_PAYMENT_AUTHORIZENET_METHOD', 'Credit Card', 'Transaction method used for processing orders', '6', '0', 'tep_cfg_select_option(array(\'Credit Card\', \'eCheck\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Gateway Method', 'MODULE_PAYMENT_AUTHORIZENET_GATEWAY_METHOD', 'AIM', 'Gateway transaction method used for processing orders', '6', '0', 'tep_cfg_select_option(array(\'AIM\', \'SIM\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Customer Notifications', 'MODULE_PAYMENT_AUTHORIZENET_EMAIL_CUSTOMER', 'False', 'Should Authorize.Net e-mail a receipt to the customer?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_AUTHORIZENET_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_AUTHORIZENET_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_AUTHORIZENET_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Credit Card Mode', 'MODULE_PAYMENT_AUTHORIZENET_CREDIT_CAPTURE', 'AUTH_CAPTURE', 'Credit Card processing method. Authorize Only or Authorize and Capture (Collect Funds)', '6', '0', 'tep_cfg_select_option(array(\'AUTH_CAPTURE\', \'AUTH_ONLY\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Wells Fargo Secure Source Account?', 'MODULE_PAYMENT_AUTHORIZENET_WELLSFARGO', 'No', 'Set to YES if your account is with Wells Fargo', '6', '0', 'tep_cfg_select_option(array(\'No\', \'Yes\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Path to cURL', 'MODULE_PAYMENT_AUTHORIZENET_CURL', '/usr/local/bin/curl', 'The full path to the cURL program (ask your hosting provider)', '6', '0', now())");
</pre><pre class="diff" id="added">+ function remove() {
+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">-// Authorize.net utility functions
</pre><pre class="diff" id="context"> function keys() {
return array('MODULE_PAYMENT_AUTHORIZENET_STATUS', 'MODULE_PAYMENT_AUTHORIZENET_LOGIN_FILE', 'MODULE_PAYMENT_AUTHORIZENET_TXNKEY', 'MODULE_PAYMENT_AUTHORIZENET_GATEWAY_METHOD', 'MODULE_PAYMENT_AUTHORIZENET_TESTMODE', 'MODULE_PAYMENT_AUTHORIZENET_METHOD', 'MODULE_PAYMENT_AUTHORIZENET_CREDIT_CAPTURE', 'MODULE_PAYMENT_AUTHORIZENET_WELLSFARGO', 'MODULE_PAYMENT_AUTHORIZENET_EMAIL_CUSTOMER', 'MODULE_PAYMENT_AUTHORIZENET_ZONE', 'MODULE_PAYMENT_AUTHORIZENET_ORDER_STATUS_ID', 'MODULE_PAYMENT_AUTHORIZENET_SORT_ORDER', 'MODULE_PAYMENT_AUTHORIZENET_CURL');
}
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment">payment</a><br /></span>
<div class="fileheader"><big><b>cc.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/cc.php?rev=1.59&content-type=text/vnd.viewcvs-markup">1.59</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/cc.php.diff?r1=1.59&r2=1.60">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/cc.php?rev=1.60&content-type=text/vnd.viewcvs-markup">1.60</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.59 -r1.60
--- cc.php 2004/07/22 22:00:10 1.59
+++ cc.php 2005/02/24 01:13:35 1.60
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">4</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -37,16 +37,22 @@
</small></pre><pre class="diff" id="context"> }
function update_status() {
</pre><pre class="diff" id="removed">- global $order;
</pre><pre class="diff" id="added">+ global $osC_Database, $order;
</pre><pre class="diff" id="context">
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_CC_ZONE > 0) ) {
$check_flag = false;
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_CC_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
- while ($check = tep_db_fetch_array($check_query)) {
- if ($check['zone_id'] < 1) {
</pre><pre class="diff" id="added">+
+ $Qcheck = $osC_Database->query('select zone_id from :table_zones_to_geo_zones where geo_zone_id = :geo_zone_id and zone_country_id = :zone_country_id order by zone_id');
+ $Qcheck->bindTable(':table_zones_to_geo_zones', TABLE_ZONES_TO_GEO_ZONES);
+ $Qcheck->bindInt(':geo_zone_id', MODULE_PAYMENT_CC_ZONE);
+ $Qcheck->bindInt(':zone_country_id', $order->billing['country']['id']);
+ $Qcheck->execute();
+
+ while ($Qcheck->next()) {
+ if ($Qcheck->valueInt('zone_id') < 1) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
</pre><pre class="diff" id="removed">- } elseif ($<span id="removedchars">check['zone_id']</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="added">+ } elseif ($<span id="addedchars">Qcheck->valueInt('zone_id')</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
}
</pre><pre class="diff"><small id="info">@@ -194,22 +200,29 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_CC_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_PAYMENT_CC_STATUS');
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> return $this->_check;
}
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Credit Card Module', 'MODULE_PAYMENT_CC_STATUS', 'True', 'Do you want to accept credit card payments?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Split Credit Card E-Mail Address', 'MODULE_PAYMENT_CC_EMAIL', '', 'If an e-mail address is entered, the middle digits of the credit card number will be sent to the e-mail address (the outside digits are stored in the database with the middle digits censored)', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_CC_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0' , now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_CC_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_CC_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Credit Card Module', 'MODULE_PAYMENT_CC_STATUS', 'True', 'Do you want to accept credit card payments?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Split Credit Card E-Mail Address', 'MODULE_PAYMENT_CC_EMAIL', '', 'If an e-mail address is entered, the middle digits of the credit card number will be sent to the e-mail address (the outside digits are stored in the database with the middle digits censored)', '6', '0', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_CC_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0' , now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_CC_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_CC_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
function keys() {
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment">payment</a><br /></span>
<div class="fileheader"><big><b>cod.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/cod.php?rev=1.30&content-type=text/vnd.viewcvs-markup">1.30</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/cod.php.diff?r1=1.30&r2=1.31">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/cod.php?rev=1.31&content-type=text/vnd.viewcvs-markup">1.31</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.30 -r1.31
--- cod.php 2004/08/10 18:24:18 1.30
+++ cod.php 2005/02/24 01:13:35 1.31
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">3</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -37,16 +37,22 @@
</small></pre><pre class="diff" id="context"> }
function update_status() {
</pre><pre class="diff" id="removed">- global $order;
</pre><pre class="diff" id="added">+ global $osC_Database, $order;
</pre><pre class="diff" id="context">
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_COD_ZONE > 0) ) {
$check_flag = false;
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
- while ($check = tep_db_fetch_array($check_query)) {
- if ($check['zone_id'] < 1) {
</pre><pre class="diff" id="added">+
+ $Qcheck = $osC_Database->query('select zone_id from :table_zones_to_geo_zones where geo_zone_id = :geo_zone_id and zone_country_id = :zone_country_id order by zone_id');
+ $Qcheck->bindTable(':table_zones_to_geo_zones', TABLE_ZONES_TO_GEO_ZONES);
+ $Qcheck->bindInt(':geo_zone_id', MODULE_PAYMENT_COD_ZONE);
+ $Qcheck->bindInt(':zone_country_id', $order->billing['country']['id']);
+ $Qcheck->execute();
+
+ while ($Qcheck->next()) {
+ if ($Qcheck->valueInt('zone_id') < 1) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
</pre><pre class="diff" id="removed">- } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
</pre><pre class="diff" id="added">+ } elseif ($Qcheck->valueInt('zone_id') == $order->billing['zone_id']) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
}
</pre><pre class="diff"><small id="info">@@ -100,21 +106,28 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_COD_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_PAYMENT_COD_STATUS');
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> return $this->_check;
}
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Cash On Delivery Module', 'MODULE_PAYMENT_COD_STATUS', 'True', 'Do you want to accept Cash On Delivery payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_COD_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_COD_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_COD_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Cash On Delivery Module', 'MODULE_PAYMENT_COD_STATUS', 'True', 'Do you want to accept Cash On Delivery payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_COD_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_COD_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_COD_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
function keys() {
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment">payment</a><br /></span>
<div class="fileheader"><big><b>ipayment.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/ipayment.php?rev=1.40&content-type=text/vnd.viewcvs-markup">1.40</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/ipayment.php.diff?r1=1.40&r2=1.41">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/ipayment.php?rev=1.41&content-type=text/vnd.viewcvs-markup">1.41</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.40 -r1.41
--- ipayment.php 2004/07/22 22:00:10 1.40
+++ ipayment.php 2005/02/24 01:13:35 1.41
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">4</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -39,16 +39,22 @@
</small></pre><pre class="diff" id="context"> }
function update_status() {
</pre><pre class="diff" id="removed">- global $order;
</pre><pre class="diff" id="added">+ global $osC_Database, $order;
</pre><pre class="diff" id="context">
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_IPAYMENT_ZONE > 0) ) {
$check_flag = false;
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_IPAYMENT_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
- while ($check = tep_db_fetch_array($check_query)) {
- if ($check['zone_id'] < 1) {
</pre><pre class="diff" id="added">+
+ $Qcheck = $osC_Database->query('select zone_id from :table_zones_to_geo_zones where geo_zone_id = :geo_zone_id and zone_country_id = :zone_country_id order by zone_id');
+ $Qcheck->bindTable(':table_zones_to_geo_zones', TABLE_ZONES_TO_GEO_ZONES);
+ $Qcheck->bindInt(':geo_zone_id', MODULE_PAYMENT_IPAYMENT_ZONE);
+ $Qcheck->bindInt(':zone_country_id', $order->billing['country']['id']);
+ $Qcheck->execute();
+
+ while ($Qcheck->next()) {
+ if ($Qcheck->valueInt('zone_id') < 1) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
</pre><pre class="diff" id="removed">- } elseif ($<span id="removedchars">check['zone_id']</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="added">+ } elseif ($<span id="addedchars">Qcheck->valueInt('zone_id')</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
}
</pre><pre class="diff"><small id="info">@@ -247,26 +253,33 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_IPAYMENT_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_PAYMENT_IPAYMENT_STATUS');
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> return $this->_check;
}
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable iPayment Module', 'MODULE_PAYMENT_IPAYMENT_STATUS', 'True', 'Do you want to accept iPayment payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Account Number', 'MODULE_PAYMENT_IPAYMENT_ID', '99999', 'The account number used for the iPayment service', '6', '2', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('User ID', 'MODULE_PAYMENT_IPAYMENT_USER_ID', '99999', 'The user ID for the iPayment service', '6', '3', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('User Password', 'MODULE_PAYMENT_IPAYMENT_PASSWORD', '0', 'The user password for the iPayment service', '6', '4', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Security Key', 'MODULE_PAYMENT_IPAYMENT_SECURITY_KEY', '', 'The security key used to generate the security hash', '6', '5', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_IPAYMENT_CURRENCY', 'Either EUR or USD, else EUR', 'The currency to use for credit card transactions', '6', '6', 'tep_cfg_select_option(array(\'Always EUR\', \'Always USD\', \'Either EUR or USD, else EUR\', \'Either EUR or USD, else USD\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_IPAYMENT_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '7', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_IPAYMENT_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '8', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_IPAYMENT_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '9', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable iPayment Module', 'MODULE_PAYMENT_IPAYMENT_STATUS', 'True', 'Do you want to accept iPayment payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Account Number', 'MODULE_PAYMENT_IPAYMENT_ID', '99999', 'The account number used for the iPayment service', '6', '2', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('User ID', 'MODULE_PAYMENT_IPAYMENT_USER_ID', '99999', 'The user ID for the iPayment service', '6', '3', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('User Password', 'MODULE_PAYMENT_IPAYMENT_PASSWORD', '0', 'The user password for the iPayment service', '6', '4', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Security Key', 'MODULE_PAYMENT_IPAYMENT_SECURITY_KEY', '', 'The security key used to generate the security hash', '6', '5', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_IPAYMENT_CURRENCY', 'Either EUR or USD, else EUR', 'The currency to use for credit card transactions', '6', '6', 'tep_cfg_select_option(array(\'Always EUR\', \'Always USD\', \'Either EUR or USD, else EUR\', \'Either EUR or USD, else USD\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_IPAYMENT_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '7', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_IPAYMENT_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '8', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_IPAYMENT_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '9', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
function keys() {
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment">payment</a><br /></span>
<div class="fileheader"><big><b>moneyorder.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/moneyorder.php?rev=1.11&content-type=text/vnd.viewcvs-markup">1.11</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/moneyorder.php.diff?r1=1.11&r2=1.12">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/moneyorder.php?rev=1.12&content-type=text/vnd.viewcvs-markup">1.12</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.11 -r1.12
--- moneyorder.php 2004/07/22 22:00:10 1.11
+++ moneyorder.php 2005/02/24 01:13:35 1.12
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">3</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -39,16 +39,22 @@
</small></pre><pre class="diff" id="context"> }
function update_status() {
</pre><pre class="diff" id="removed">- global $order;
</pre><pre class="diff" id="added">+ global $osC_Database, $order;
</pre><pre class="diff" id="context">
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_MONEYORDER_ZONE > 0) ) {
$check_flag = false;
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_MONEYORDER_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
- while ($check = tep_db_fetch_array($check_query)) {
- if ($check['zone_id'] < 1) {
</pre><pre class="diff" id="added">+
+ $Qcheck = $osC_Database->query('select zone_id from :table_zones_to_geo_zones where geo_zone_id = :geo_zone_id and zone_country_id = :zone_country_id order by zone_id');
+ $Qcheck->bindTable(':table_zones_to_geo_zones', TABLE_ZONES_TO_GEO_ZONES);
+ $Qcheck->bindInt(':geo_zone_id', MODULE_PAYMENT_MONEYORDER_ZONE);
+ $Qcheck->bindInt(':zone_country_id', $order->billing['country']['id']);
+ $Qcheck->execute();
+
+ while ($Qcheck->next()) {
+ if ($Qcheck->valueInt('zone_id') < 1) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
</pre><pre class="diff" id="removed">- } elseif ($<span id="removedchars">check['zone_id']</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="added">+ } elseif ($<span id="addedchars">Qcheck->valueInt('zone_id')</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
}
</pre><pre class="diff"><small id="info">@@ -95,22 +101,29 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_MONEYORDER_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_PAYMENT_MONEYORDER_STATUS');
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> return $this->_check;
}
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Check/Money Order Module', 'MODULE_PAYMENT_MONEYORDER_STATUS', 'True', 'Do you want to accept Check/Money Order payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now());");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Make Payable to:', 'MODULE_PAYMENT_MONEYORDER_PAYTO', '', 'Who should payments be made payable to?', '6', '1', now());");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_MONEYORDER_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Check/Money Order Module', 'MODULE_PAYMENT_MONEYORDER_STATUS', 'True', 'Do you want to accept Check/Money Order payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now());");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Make Payable to:', 'MODULE_PAYMENT_MONEYORDER_PAYTO', '', 'Who should payments be made payable to?', '6', '1', now());");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_MONEYORDER_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
function keys() {
</pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment">payment</a><br /></span>
<div class="fileheader"><big><b>nochex.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/nochex.php?rev=1.16&content-type=text/vnd.viewcvs-markup">1.16</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/nochex.php.diff?r1=1.16&r2=1.17">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/nochex.php?rev=1.17&content-type=text/vnd.viewcvs-markup">1.17</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.16 -r1.17
--- nochex.php 2004/07/22 22:00:10 1.16
+++ nochex.php 2005/02/24 01:13:36 1.17
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">4</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -39,16 +39,22 @@
</small></pre><pre class="diff" id="context"> }
function update_status() {
</pre><pre class="diff" id="removed">- global $order;
</pre><pre class="diff" id="added">+ global $osC_Database, $order;
</pre><pre class="diff" id="context">
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_NOCHEX_ZONE > 0) ) {
$check_flag = false;
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOCHEX_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
- while ($check = tep_db_fetch_array($check_query)) {
- if ($check['zone_id'] < 1) {
</pre><pre class="diff" id="added">+
+ $Qcheck = $osC_Database->query('select zone_id from :table_zones_to_geo_zones where geo_zone_id = :geo_zone_id and zone_country_id = :zone_country_id order by zone_id');
+ $Qcheck->bindTable(':table_zones_to_geo_zones', TABLE_ZONES_TO_GEO_ZONES);
+ $Qcheck->bindInt(':geo_zone_id', MODULE_PAYMENT_NOCHEX_ZONE);
+ $Qcheck->bindInt(':zone_country_id', $order->billing['country']['id']);
+ $Qcheck->execute();
+
+ while ($Qcheck->next()) {
+ if ($Qcheck->valueInt('zone_id') < 1) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
</pre><pre class="diff" id="removed">- } elseif ($<span id="removedchars">check['zone_id']</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="added">+ } elseif ($<span id="addedchars">Qcheck->valueInt('zone_id')</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
}
</pre><pre class="diff"><small id="info">@@ -104,22 +110,29 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOCHEX_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_PAYMENT_NOCHEX_STATUS');
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> return $this->_check;
}
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable NOCHEX Module', 'MODULE_PAYMENT_NOCHEX_STATUS', 'True', 'Do you want to accept NOCHEX payments?', '6', '3', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('E-Mail Address', 'MODULE_PAYMENT_NOCHEX_ID', 'you-0/H1Xqmg7/[email protected]', 'The e-mail address to use for the NOCHEX service', '6', '4', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_NOCHEX_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_NOCHEX_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_NOCHEX_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable NOCHEX Module', 'MODULE_PAYMENT_NOCHEX_STATUS', 'True', 'Do you want to accept NOCHEX payments?', '6', '3', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('E-Mail Address', 'MODULE_PAYMENT_NOCHEX_ID', 'you-0/H1Xqmg7/[email protected]', 'The e-mail address to use for the NOCHEX service', '6', '4', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_NOCHEX_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_NOCHEX_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_NOCHEX_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
function keys() {
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment">payment</a><br /></span>
<div class="fileheader"><big><b>paypal.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/paypal.php?rev=1.45&content-type=text/vnd.viewcvs-markup">1.45</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/paypal.php.diff?r1=1.45&r2=1.46">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/paypal.php?rev=1.46&content-type=text/vnd.viewcvs-markup">1.46</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.45 -r1.46
--- paypal.php 2004/08/06 11:40:50 1.45
+++ paypal.php 2005/02/24 01:13:36 1.46
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">4</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -39,16 +39,22 @@
</small></pre><pre class="diff" id="context"> }
function update_status() {
</pre><pre class="diff" id="removed">- global $order;
</pre><pre class="diff" id="added">+ global $osC_Database, $order;
</pre><pre class="diff" id="context">
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_ZONE > 0) ) {
$check_flag = false;
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PAYPAL_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
- while ($check = tep_db_fetch_array($check_query)) {
- if ($check['zone_id'] < 1) {
</pre><pre class="diff" id="added">+
+ $Qcheck = $osC_Database->query('select zone_id from :table_zones_to_geo_zones where geo_zone_id = :geo_zone_id and zone_country_id = :zone_country_id order by zone_id');
+ $Qcheck->bindTable(':table_zones_to_geo_zones', TABLE_ZONES_TO_GEO_ZONES);
+ $Qcheck->bindInt(':geo_zone_id', MODULE_PAYMENT_PAYPAL_ZONE);
+ $Qcheck->bindInt(':zone_country_id', $order->billing['country']['id']);
+ $Qcheck->execute();
+
+ while ($Qcheck->next()) {
+ if ($Qcheck->valueInt('zone_id') < 1) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
</pre><pre class="diff" id="removed">- } elseif ($<span id="removedchars">check['zone_id']</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="added">+ } elseif ($<span id="addedchars">Qcheck->valueInt('zone_id')</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
}
</pre><pre class="diff"><small id="info">@@ -126,23 +132,30 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_PAYPAL_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_PAYMENT_PAYPAL_STATUS');
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> return $this->_check;
}
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable PayPal Module', 'MODULE_PAYMENT_PAYPAL_STATUS', 'True', 'Do you want to accept PayPal payments?', '6', '3', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('E-Mail Address', 'MODULE_PAYMENT_PAYPAL_ID', '[email protected]', 'The e-mail address to use for the PayPal service', '6', '4', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_PAYPAL_CURRENCY', 'Selected Currency', 'The currency to use for credit card transactions', '6', '6', 'tep_cfg_select_option(array(\'Selected Currency\',\'Only USD\',\'Only CAD\',\'Only EUR\',\'Only GBP\',\'Only JPY\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_PAYPAL_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_PAYPAL_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable PayPal Module', 'MODULE_PAYMENT_PAYPAL_STATUS', 'True', 'Do you want to accept PayPal payments?', '6', '3', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('E-Mail Address', 'MODULE_PAYMENT_PAYPAL_ID', '[email protected]', 'The e-mail address to use for the PayPal service', '6', '4', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_PAYPAL_CURRENCY', 'Selected Currency', 'The currency to use for credit card transactions', '6', '6', 'tep_cfg_select_option(array(\'Selected Currency\',\'Only USD\',\'Only CAD\',\'Only EUR\',\'Only GBP\',\'Only JPY\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_PAYPAL_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_PAYPAL_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
function keys() {
</pre></div>
<hr /><a name="file8" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment">payment</a><br /></span>
<div class="fileheader"><big><b>pm2checkout.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/pm2checkout.php?rev=1.25&content-type=text/vnd.viewcvs-markup">1.25</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/pm2checkout.php.diff?r1=1.25&r2=1.26">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/pm2checkout.php?rev=1.26&content-type=text/vnd.viewcvs-markup">1.26</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.25 -r1.26
--- pm2checkout.php 2004/07/22 22:00:10 1.25
+++ pm2checkout.php 2005/02/24 01:13:36 1.26
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">4</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -39,16 +39,22 @@
</small></pre><pre class="diff" id="context"> }
function update_status() {
</pre><pre class="diff" id="removed">- global $order;
</pre><pre class="diff" id="added">+ global $osC_Database, $order;
</pre><pre class="diff" id="context">
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_2CHECKOUT_ZONE > 0) ) {
$check_flag = false;
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_2CHECKOUT_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
- while ($check = tep_db_fetch_array($check_query)) {
- if ($check['zone_id'] < 1) {
</pre><pre class="diff" id="added">+
+ $Qcheck = $osC_Database->query('select zone_id from :table_zones_to_geo_zones where geo_zone_id = :geo_zone_id and zone_country_id = :zone_country_id order by zone_id');
+ $Qcheck->bindTable(':table_zones_to_geo_zones', TABLE_ZONES_TO_GEO_ZONES);
+ $Qcheck->bindInt(':geo_zone_id', MODULE_PAYMENT_2CHECKOUT_ZONE);
+ $Qcheck->bindInt(':zone_country_id', $order->billing['country']['id']);
+ $Qcheck->execute();
+
+ while ($Qcheck->next()) {
+ if ($Qcheck->valueInt('zone_id') < 1) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
</pre><pre class="diff" id="removed">- } elseif ($<span id="removedchars">check['zone_id']</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="added">+ } elseif ($<span id="addedchars">Qcheck->valueInt('zone_id')</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
}
</pre><pre class="diff"><small id="info">@@ -218,24 +224,31 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_2CHECKOUT_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_PAYMENT_2CHECKOUT_STATUS');
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> return $this->_check;
}
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable 2CheckOut Module', 'MODULE_PAYMENT_2CHECKOUT_STATUS', 'True', 'Do you want to accept 2CheckOut payments?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Login/Store Number', 'MODULE_PAYMENT_2CHECKOUT_LOGIN', '18157', 'Login/Store Number used for the 2CheckOut service', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_2CHECKOUT_TESTMODE', 'Test', 'Transaction mode used for the 2Checkout service', '6', '0', 'tep_cfg_select_option(array(\'Test\', \'Production\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Merchant Notifications', 'MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT', 'True', 'Should 2CheckOut e-mail a receipt to the store owner?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_2CHECKOUT_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_2CHECKOUT_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable 2CheckOut Module', 'MODULE_PAYMENT_2CHECKOUT_STATUS', 'True', 'Do you want to accept 2CheckOut payments?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Login/Store Number', 'MODULE_PAYMENT_2CHECKOUT_LOGIN', '18157', 'Login/Store Number used for the 2CheckOut service', '6', '0', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_2CHECKOUT_TESTMODE', 'Test', 'Transaction mode used for the 2Checkout service', '6', '0', 'tep_cfg_select_option(array(\'Test\', \'Production\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Merchant Notifications', 'MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT', 'True', 'Should 2CheckOut e-mail a receipt to the store owner?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_2CHECKOUT_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_2CHECKOUT_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
function keys() {
</pre></div>
<hr /><a name="file9" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment">payment</a><br /></span>
<div class="fileheader"><big><b>psigate.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/psigate.php?rev=1.23&content-type=text/vnd.viewcvs-markup">1.23</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/psigate.php.diff?r1=1.23&r2=1.24">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/psigate.php?rev=1.24&content-type=text/vnd.viewcvs-markup">1.24</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.23 -r1.24
--- psigate.php 2004/07/22 22:00:10 1.23
+++ psigate.php 2005/02/24 01:13:36 1.24
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">4</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -39,16 +39,22 @@
</small></pre><pre class="diff" id="context"> }
function update_status() {
</pre><pre class="diff" id="removed">- global $order;
</pre><pre class="diff" id="added">+ global $osC_Database, $order;
</pre><pre class="diff" id="context">
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PSIGATE_ZONE > 0) ) {
$check_flag = false;
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PSIGATE_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
- while ($check = tep_db_fetch_array($check_query)) {
- if ($check['zone_id'] < 1) {
</pre><pre class="diff" id="added">+
+ $Qcheck = $osC_Database->query('select zone_id from :table_zones_to_geo_zones where geo_zone_id = :geo_zone_id and zone_country_id = :zone_country_id order by zone_id');
+ $Qcheck->bindTable(':table_zones_to_geo_zones', TABLE_ZONES_TO_GEO_ZONES);
+ $Qcheck->bindInt(':geo_zone_id', MODULE_PAYMENT_PSIGATE_ZONE);
+ $Qcheck->bindInt(':zone_country_id', $order->billing['country']['id']);
+ $Qcheck->execute();
+
+ while ($Qcheck->next()) {
+ if ($Qcheck->valueInt('zone_id') < 1) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
</pre><pre class="diff" id="removed">- } elseif ($<span id="removedchars">check['zone_id']</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="added">+ } elseif ($<span id="addedchars">Qcheck->valueInt('zone_id')</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
}
</pre><pre class="diff"><small id="info">@@ -279,26 +285,33 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_PSIGATE_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_PAYMENT_PSIGATE_STATUS');
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> return $this->_check;
}
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable PSiGate Module', 'MODULE_PAYMENT_PSIGATE_STATUS', 'True', 'Do you want to accept PSiGate payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant ID', 'MODULE_PAYMENT_PSIGATE_MERCHANT_ID', 'teststorewithcard', 'Merchant ID used for the PSiGate service', '6', '2', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_PSIGATE_TRANSACTION_MODE', 'Always Good', 'Transaction mode to use for the PSiGate service', '6', '3', 'tep_cfg_select_option(array(\'Production\', \'Always Good\', \'Always Duplicate\', \'Always Decline\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Type', 'MODULE_PAYMENT_PSIGATE_TRANSACTION_TYPE', 'PreAuth', 'Transaction type to use for the PSiGate service', '6', '4', 'tep_cfg_select_option(array(\'Sale\', \'PreAuth\', \'PostAuth\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Credit Card Collection', 'MODULE_PAYMENT_PSIGATE_INPUT_MODE', 'Local', 'Should the credit card details be collected locally or remotely at PSiGate?', '6', '5', 'tep_cfg_select_option(array(\'Local\', \'Remote\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_PSIGATE_CURRENCY', 'USD', 'The currency to use for credit card transactions', '6', '6', 'tep_cfg_select_option(array(\'CAD\', \'USD\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_PSIGATE_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_PSIGATE_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_PSIGATE_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable PSiGate Module', 'MODULE_PAYMENT_PSIGATE_STATUS', 'True', 'Do you want to accept PSiGate payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant ID', 'MODULE_PAYMENT_PSIGATE_MERCHANT_ID', 'teststorewithcard', 'Merchant ID used for the PSiGate service', '6', '2', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_PSIGATE_TRANSACTION_MODE', 'Always Good', 'Transaction mode to use for the PSiGate service', '6', '3', 'tep_cfg_select_option(array(\'Production\', \'Always Good\', \'Always Duplicate\', \'Always Decline\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Type', 'MODULE_PAYMENT_PSIGATE_TRANSACTION_TYPE', 'PreAuth', 'Transaction type to use for the PSiGate service', '6', '4', 'tep_cfg_select_option(array(\'Sale\', \'PreAuth\', \'PostAuth\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Credit Card Collection', 'MODULE_PAYMENT_PSIGATE_INPUT_MODE', 'Local', 'Should the credit card details be collected locally or remotely at PSiGate?', '6', '5', 'tep_cfg_select_option(array(\'Local\', \'Remote\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_PSIGATE_CURRENCY', 'USD', 'The currency to use for credit card transactions', '6', '6', 'tep_cfg_select_option(array(\'CAD\', \'USD\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_PSIGATE_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_PSIGATE_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_PSIGATE_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
function keys() {
</pre></div>
<hr /><a name="file10" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment">payment</a><br /></span>
<div class="fileheader"><big><b>secpay.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/secpay.php?rev=1.39&content-type=text/vnd.viewcvs-markup">1.39</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/secpay.php.diff?r1=1.39&r2=1.40">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/payment/secpay.php?rev=1.40&content-type=text/vnd.viewcvs-markup">1.40</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.39 -r1.40
--- secpay.php 2004/07/22 22:00:10 1.39
+++ secpay.php 2005/02/24 01:13:36 1.40
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">4</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -39,16 +39,22 @@
</small></pre><pre class="diff" id="context"> }
function update_status() {
</pre><pre class="diff" id="removed">- global $order;
</pre><pre class="diff" id="added">+ global $osC_Database, $order;
</pre><pre class="diff" id="context">
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_SECPAY_ZONE > 0) ) {
$check_flag = false;
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_SECPAY_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
- while ($check = tep_db_fetch_array($check_query)) {
- if ($check['zone_id'] < 1) {
</pre><pre class="diff" id="added">+
+ $Qcheck = $osC_Database->query('select zone_id from :table_zones_to_geo_zones where geo_zone_id = :geo_zone_id and zone_country_id = :zone_country_id order by zone_id');
+ $Qcheck->bindTable(':table_zones_to_geo_zones', TABLE_ZONES_TO_GEO_ZONES);
+ $Qcheck->bindInt(':geo_zone_id', MODULE_PAYMENT_SECPAY_ZONE);
+ $Qcheck->bindInt(':zone_country_id', $order->billing['country']['id']);
+ $Qcheck->execute();
+
+ while ($Qcheck->next()) {
+ if ($Qcheck->valueInt('zone_id') < 1) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
</pre><pre class="diff" id="removed">- } elseif ($<span id="removedchars">check['zone_id']</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="added">+ } elseif ($<span id="addedchars">Qcheck->valueInt('zone_id')</span> == $order->billing['zone_id']) {
</pre><pre class="diff" id="context"> $check_flag = true;
break;
}
</pre><pre class="diff"><small id="info">@@ -181,25 +187,32 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_SECPAY_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_PAYMENT_SECPAY_STATUS');
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> return $this->_check;
}
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable SECpay Module', 'MODULE_PAYMENT_SECPAY_STATUS', 'True', 'Do you want to accept SECPay payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant ID', 'MODULE_PAYMENT_SECPAY_MERCHANT_ID', 'secpay', 'Merchant ID to use for the SECPay service', '6', '2', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_SECPAY_CURRENCY', 'Any Currency', 'The currency to use for credit card transactions', '6', '3', 'tep_cfg_select_option(array(\'Any Currency\', \'Default Currency\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_SECPAY_TEST_STATUS', 'Always Successful', 'Transaction mode to use for the SECPay service', '6', '4', 'tep_cfg_select_option(array(\'Always Successful\', \'Always Fail\', \'Production\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_SECPAY_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '5', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_SECPAY_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '6', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_SECPAY_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '7', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Digest Key', 'MODULE_PAYMENT_SECPAY_DIGEST_KEY', 'secpay', 'Key to use for the digest functionality', '6', '8', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable SECpay Module', 'MODULE_PAYMENT_SECPAY_STATUS', 'True', 'Do you want to accept SECPay payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant ID', 'MODULE_PAYMENT_SECPAY_MERCHANT_ID', 'secpay', 'Merchant ID to use for the SECPay service', '6', '2', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_SECPAY_CURRENCY', 'Any Currency', 'The currency to use for credit card transactions', '6', '3', 'tep_cfg_select_option(array(\'Any Currency\', \'Default Currency\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_SECPAY_TEST_STATUS', 'Always Successful', 'Transaction mode to use for the SECPay service', '6', '4', 'tep_cfg_select_option(array(\'Always Successful\', \'Always Fail\', \'Production\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_SECPAY_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '5', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_SECPAY_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '6', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_SECPAY_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '7', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Digest Key', 'MODULE_PAYMENT_SECPAY_DIGEST_KEY', 'secpay', 'Key to use for the digest functionality', '6', '8', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
function keys() {
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.9</small></center>
</body></html>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click