osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Order amount not carrying over to payment processor

This is a discussion on Order amount not carrying over to payment processor within the osCMax v2 Features Discussion forums, part of the osCMax v2.0 Forums category; Hi, I'm hoping someone might be able to help here. My payment processor gave me a module to add to ...



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Features Discussion

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Reply

 

LinkBack Thread Tools
  #1  
Old 06-18-2009, 01:27 AM
New Member
 
Join Date: Jan 2009
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
shona324 is on a distinguished road
Default Order amount not carrying over to payment processor

Hi, I'm hoping someone might be able to help here.

My payment processor gave me a module to add to my site but it doesn't seem to be carrying the order amount over and is trying to charge 0.00 to the customers card. I'll post the code below in the hope that someone might be able to see what's causing the problem.

Thanks in advance.


<?php
/**
* OptimalPayments Firepay Extension for OS Commerce 2.2 & PHP 5
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* It is available through the world-wide-web at this URL:
* Open Source Initiative OSI - The Open Software License 3.0:Licensing | Open Source Initiative
**
* @module firepay
* @author Collins Harper ()We Build Brands Online | Collins Harper | CollinsHarper.com)
* @copyright Copyright (c) 2008 Optimal Payments (Online Credit Card Merchant Account, Accept Credit / Debit Card Payment, Electronic Checks Payment Processing Services, Secure Payment Gateway)
* @license Open Source Initiative OSI - The Open Software License 3.0:Licensing | Open Source Initiative Open Software License (OSL 3.0)
*/

class optimalpayments {


function optimalpayments() {
global $order;

$this->code = 'optimalpayments';
$this->title = MODULE_PAYMENT_OPTIMALPAYMENTS_TEXT_TITLE;
$this->description = MODULE_PAYMENT_OPTIMALPAYMENTS_TEXT_DESCRIPTION;
$this->enabled = ((MODULE_PAYMENT_OPTIMALPAYMENTS_STATUS == 'True') ? true : false);
$this->sort_order = MODULE_PAYMENT_OPTIMALPAYMENTS_SORT_ORDER;

if ((int)MODULE_PAYMENT_OPTIMALPAYMENTS_ORDER_STATUS_ ID > 0)
$this->order_status = MODULE_PAYMENT_OPTIMALPAYMENTS_ORDER_STATUS_ID;

if (is_object($order)) $this->update_status();

$this->form_action_url = FILENAME_CHECKOUT_PROCESS;

}

// class methods
function update_status() {
global $order;

if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_OPTIMALPAYMENTS_ZONE > 0) ) {
$check_flag = false;
$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_OPTIMALPAYMENTS_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) {
$check_flag = true;
break;
} elseif ($check['zone_id'] == $order->billing['zone_id']) {
$check_flag = true;
break;
}
}

if ($check_flag == false) {
$this->enabled = false;
}
}
}


function javascript_validation() {
$js = ' if (payment_value == "' . $this->code . '") {' . "n" .
' var number = document.checkout_payment.optimalpayments_cc_numbe r.value;' . "n" .
' var cvd = document.checkout_payment.optimalpayments_cvd_numb er.value;'. "n".
' if ( number == "" || number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "n" .
' error_message = error_message + "' . MODULE_PAYMENT_OPTIMALPAYMENTS_TEXT_JS_CC_NUMBER . '";' . "n" .
' error = 1;' . "n" .
' }' . "n" .
' if (cvd == "" || cvd.length < 3 ) {'."n".
' error_message = error_message + "CVD Number not input or number of digits incorrect";'."n".
' error = 1;'. "n".
' }' . "n".
// need CC exp date validation here

' }' . "n";

return $js;
}


function selection() {
global $order;

for ($i=1; $i<13; $i++) {
$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000)));
}

$today = getdate();
for ($i=$today['year']; $i < $today['year']+10; $i++) {
$expires_year[] = array('id' => strftime('%y',mktime(0,0,0,1,1,$i)), 'text' => strftime('%Y',mktime(0,0,0,1,1,$i)));
}
$selection = array('id' => $this->code,
'module' => $this->title,
'fields' => array(
array('title' => MODULE_PAYMENT_OPTIMALPAYMENTS_TEXT_CREDIT_CARD_NU MBER,
'field' => tep_draw_input_field('optimalpayments_cc_number')) ,
///evan added thte following on August 26 2003
array('title' => 'CVD <span style="font-size:10">(3 digit security number<br> on the back of your card)</span>',
'field'=> tep_draw_input_field('optimalpayments_cvd_number') ),
///evan added ends
array('title' => MODULE_PAYMENT_OPTIMALPAYMENTS_TEXT_CREDIT_CARD_EX PIRES,
'field' => tep_draw_pull_down_menu('optimalpayments_cc_expire s_month', $expires_month) . '&nbsp;' . tep_draw_pull_down_menu('optimalpayments_cc_expire s_year', $expires_year))));

return $selection;
}

function pre_confirmation_check() {
global $HTTP_POST_VARS;
include(DIR_WS_CLASSES . 'cc_validation.php');

$cc_validation = new cc_validation();
$result = $cc_validation->validate($HTTP_POST_VARS['optimalpayments_cc_number'], $HTTP_POST_VARS['optimalpayments_cc_expires_month'], $HTTP_POST_VARS['optimalpayments_cc_expires_year']);
$error = '';
switch ($result) {
case -1:
$error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4));
break;
case -2:
case -3:
case -4:
$error = TEXT_CCVAL_ERROR_INVALID_DATE;
break;
case false:
$error = TEXT_CCVAL_ERROR_INVALID_NUMBER;
break;
}

if ( ($result == false) || ($result < 1) ) {
$payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&optimalpayments_cc_owner=' . urlencode($HTTP_POST_VARS['optimalpayments_cc_owner']) . '&optimalpayments_cc_expires_month=' . $HTTP_POST_VARS['optimalpayments_cc_expires_month'] . '&optimalpayments_cc_expires_year=' . $HTTP_POST_VARS['optimalpayments_cc_expires_year'];

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYME NT, $payment_error_return, 'SSL', true, false));
}

$this->cc_card_type = $cc_validation->cc_type;
$this->cc_card_number = $cc_validation->cc_number;
$this->cc_expiry_month = $cc_validation->cc_expiry_month;
$this->cc_expiry_year = $cc_validation->cc_expiry_year;
}

function confirmation() {
global $HTTP_POST_VARS;

$confirmation = array('title' => $this->title . ': ' . $this->cc_card_type,
'fields' => array(array('title' => MODULE_PAYMENT_OPTIMALPAYMENTS_TEXT_CREDIT_CARD_OW NER,
'field' => $HTTP_POST_VARS['optimalpayments_cc_owner']),
array('title' => MODULE_PAYMENT_OPTIMALPAYMENTS_TEXT_CREDIT_CARD_NU MBER,
'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - ) . substr($this->cc_card_number, -4)),
array('title' => 'CVD Number',
'field' => $HTTP_POST_VARS['optimalpayments_cvd_number']),
array('title' => MODULE_PAYMENT_OPTIMALPAYMENTS_TEXT_CREDIT_CARD_EX PIRES,
'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['optimalpayments_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['optimalpayments_cc_expires_year'])))));

return $confirmation;
}

function process_button() {
global $HTTP_SERVER_VARS, $HTTP_POST_VARS, $order, $customer_id, $currency;

if($currency == 'CAD')
{
if(LANGUAGE_CURRENCY == 'CAD')
{
$pamount = round($order->info['total'],2);
}
else
{
$currencyc_query = tep_db_query("select value from " . TABLE_CURRENCIES . " where code = '" . $currency . "'");
$currencyc = tep_db_fetch_array($currencyc_query);

$ccr = round($currencyc['value'],2);

$pamount = round(($order->info['total'] * $ccr),2) ;
}
}
elseif($currency == 'USD')
{
if(LANGUAGE_CURRENCY == 'USD')
{
$pamount = round($order->info['total'],2);
}
else
{
$currencyc_query = tep_db_query("select value from " . TABLE_CURRENCIES . " where code = '" . $currency . "'");
$currencyc = tep_db_fetch_array($currencyc_query);

$ccr = round($currencyc['value'],2);

$pamount = round(($order->info['total'] * $ccr),2);
}
}

$bstate = $order->billing['state'];
if($order->billing['country']['iso_code_2'] == 'CA' || $order->billing['country']['iso_code_2'] == 'US')
$bstate = tep_get_zone_code($order->billing['country']['id'], $order->billing['zone_id'],0);

$sstate = $order->delivery['state'];
if($order->delivery['country']['iso_code_2'] == 'CA' || $order->delivery['country']['zone_id'] == 'US')
$sstate = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'],0);

$process_button_string = // unique transaction id number:
tep_draw_hidden_field('firepay[merchantRefNum]', $customer_id . '-' . date('Ymdhis')) .
tep_draw_hidden_field('firepay[cardNum]', $this->cc_card_number) .
// This really is not necesary to pass
// tep_draw_hidden_field('firepay[cardType]', $this->optimalpayments_cardType()) .
tep_draw_hidden_field('firepay[cvd]', $HTTP_POST_VARS['optimalpayments_cvd_number']).
tep_draw_hidden_field('firepay[month]', $this->cc_expiry_month) .
tep_draw_hidden_field('firepay[year]', $this->cc_expiry_year) .
tep_draw_hidden_field('firepay[cvdIndicator]', '1'). //indicates cvd is provided
tep_draw_hidden_field('firepay[amount]', sprintf("%01.2f",$pamount)) .
tep_draw_hidden_field('firepay[cardPayMethod]', 'WEB') .
// billing info:
tep_draw_hidden_field('firepay[billingfirstName]', $order->billing['firstname']) .
tep_draw_hidden_field('firepay[billinglastName]', $order->billing['lastname']) .
tep_draw_hidden_field('firepay[billingstreet]', $order->billing['street_address']) .
tep_draw_hidden_field('firepay[billingstreet2]', $order->billing['street_address2']) .
tep_draw_hidden_field('firepay[billingcity]', $order->billing['city']) .
tep_draw_hidden_field('firepay[billingregion]', $bstate) .
tep_draw_hidden_field('firepay[billingzip]', $order->billing['postcode']) .
tep_draw_hidden_field('firepay[billingcountry]', $order->billing['country']['iso_code_2']) .
tep_draw_hidden_field('firepay[billingphone]', $order->customer['telephone']) .
tep_draw_hidden_field('firepay[billingemail]', $order->customer['email_address']) .

tep_draw_hidden_field('firepay[shippingfirstName]', $order->delivery['firstname']) .
tep_draw_hidden_field('firepay[shippinglastName]', $order->delivery['lastname']) .
tep_draw_hidden_field('firepay[shippingstreet]', $order->delivery['street_address']) .
tep_draw_hidden_field('firepay[shippingstreet2]', $order->delivery['street_address2']) .
tep_draw_hidden_field('firepay[shippingcity]', $order->delivery['city']) .
tep_draw_hidden_field('firepay[shippingregion]', $sstate) .
tep_draw_hidden_field('firepay[shippingzip]', $order->delivery['postcode']) .
tep_draw_hidden_field('firepay[shippingcountry]', $order->delivery['country']['iso_code_2'])
;

$process_button_string .= tep_draw_hidden_field(tep_session_name(), tep_session_id());
//die(print_r($order,1));
return $process_button_string;
}

function before_process() {
global $HTTP_POST_VARS, $currency, $order;

// transaction info:

if (MODULE_PAYMENT_OPTIMALPAYMENTS_OPERATION=='Paymen t') $optimalpayments_transaction_type = "ccPurchase";
else $optimalpayments_transaction_type = "ccAuthorize";

$optimalpayments_input = (array)$HTTP_POST_VARS['firepay'] + (array)$optimalpayments_account_info;
$xml_bits = $this->_build_request($optimalpayments_input,$optimalpay ments_transaction_type);
$optimalpayments_output = $this->_post_request($xml_bits,$optimalpayments_transact ion_type);

if ($optimalpayments_output['decision'] == 'ACCEPTED') {
// order comment of auth / trans ID
if(strlen($order->info['comments']))
$order->info['comments'] .= "nn";
$order->info['comments'] .= "confirmationNumber: ".$optimalpayments_output['confirmationNumber']."nn";
if(strlen($optimalpayments_output['authCode']))
$order->info['comments'] .= "authCode: ".$optimalpayments_output['authCode']."nn";
$order->info['comments'] .= "TXType: ".$optimalpayments_transaction_type."nn";


return;
} else if ($optimalpayments_output['decision'] == 'DECLINED') tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYME NT, 'error_message=' . urlencode($xml_bits) . urlencode($optimalpayments_output['description']), 'SSL', true, false));
else tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYME NT, 'error_message=' . urlencode($xml_bits). urlencode(print_r($optimalpayments_output,true)).u rlencode(MODULE_PAYMENT_OPTIMALPAYMENTS_TEXT_ERROR _MESSAGE) , 'SSL', true, false));
}

function _build_request($fpinput,$txMode) {


// if we were to build switiching for request types the XML code changes slightly
//PAYMENT_ACTION_AUTH || PAYMENT_ACTION_AUTH_CAPTURE
$start_xml_Type = "<ccAuthRequestV1 xmlns="http://www.optimalpayments.com/creditcard/xmlschema/v1" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.optimalpayments.com/creditcard/xmlschema/v1">n";
$end_xml_Type = "</ccAuthRequestV1>";
//PAYMENT_ACTION_SETTLE || PAYMENT_ACTION_CREDIT
// $start_xml_Type = "<ccPostAuthRequestV1 xmlns="http://www.optimalpayments.com/creditcard/xmlschema/v1" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.optimalpayments.com/creditcard/xmlschema/v1">n";
// $end_xml_Type = "</ccPostAuthRequestV1>";
//PAYMENT_ACTION_CANCEL_SETTLE || PAYMENT_ACTION_CANCEL_CREDIT || PAYMENT_ACTION_CANCEL_PAYMENT
// $start_xml_Type = "<ccCancelRequestV1 xmlns="http://www.optimalpayments.com/creditcard/xmlschema/v1" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.optimalpayments.com/creditcard/xmlschema/v1">n";
// $end_xml_Type = "</ccCancelRequestV1>";


$bstreet2 = '';
if($fpinput['billingstreet2'])
$bstreet2 = "<street2>".$fpinput['billingstreet2']."</street2>n";
$sstreet2 = '';
if($fpinput['shippingstreet2'])
$sstreet2 = "<street2>".$fpinput['shippingstreet2']."</street2>n";


$txnRequest = "<?xml version="1.0" encoding="UTF-8"?>n";
$txnRequest .= $start_xml_Type;
$txnRequest .= "<merchantAccount>n";
$txnRequest .= "<accountNum>".MODULE_PAYMENT_OPTIMALPAYMENTS_ACCO UNT."</accountNum>n";
$txnRequest .= "<storeID>".MODULE_PAYMENT_OPTIMALPAYMENTS_USERNAM E."</storeID>n";
$txnRequest .= "<storePwd>".MODULE_PAYMENT_OPTIMALPAYMENTS_PASSWO RD."</storePwd>n";
$txnRequest .= "</merchantAccount>n";
// if we could process refunds / cancels we would pass this infermation in somehow
// $txnRequest .= "<confirmationNumber>".$txRefid."</confirmationNumber>n";


$txnRequest .= "<merchantRefNum>".$fpinput['merchantRefNum']."</merchantRefNum>n";
$txnRequest .= "<amount>".$fpinput['amount']."</amount>n";

$txnRequest .= "<card>n";
$txnRequest .= "<cardNum>".$fpinput['cardNum']."</cardNum>n";
$txnRequest .= "<cardExpiry>n<month>".$fpinput['month']."</month>n<year>".$fpinput['year']."</year>n</cardExpiry>n";
// We dont really use these
//$txnRequest .= "<cardType>".$cardType."</cardType>n";
$txnRequest .= "<cvdIndicator>1</cvdIndicator>n";
$txnRequest .= "<cvd>".$fpinput['cvd']."</cvd>n";
$txnRequest .= "</card>n";
$txnRequest .= "<billingDetails>n";
$txnRequest .= "<cardPayMethod>".$fpinput['cardPayMethod']."</cardPayMethod>n";
$txnRequest .= "<firstName>".$fpinput['billingfirstName']."</firstName>n";
$txnRequest .= "<lastName>".$fpinput['billinglastName']."</lastName>n";
$txnRequest .= "<street>".$fpinput['billingstreet']."</street>n";
$txnRequest .= $bstreet2;
$txnRequest .= "<city>".$fpinput['billingcity']."</city>n";
$txnRequest .= "<region>".$fpinput['billingregion']."</region>n";
$txnRequest .= "<country>".$fpinput['billingcountry']."</country>n";
$txnRequest .= "<zip>".$fpinput['billingzip']."</zip>n";
$txnRequest .= "<phone>".$fpinput['billingtelephone']."</phone>n";
$txnRequest .= "<email>".$fpinput['billingemail']."</email>n";
$txnRequest .= "</billingDetails>n";

if($fpinput['shippingfirstName'] && $fpinput['shippingcountry']) {
$txnRequest .= "<shippingDetails>n";
// $txnRequest .= "<carrier>FEX</carrier>n";
/// $txnRequest .= "<shipMethod>T</shipMethod>n";
$txnRequest .= "<firstName>".$fpinput['shippingfirstName']."</firstName>n";
$txnRequest .= "<lastName>".$fpinput['shippinglastName']."</lastName>n";
$txnRequest .= "<street>".$fpinput['shippingstreet']."</street>n";
$txnRequest .= $sstreet2;
$txnRequest .= "<city>".$fpinput['shippingcity']."</city>n";
$txnRequest .= "<region>".$fpinput['shippingregion']."</region>n";
$txnRequest .= "<country>".$fpinput['shippingcountry']."</country>n";
$txnRequest .= "<zip>".$fpinput['shippingzip']."</zip>n";
//$txnRequest .= "<phone>".$fpinput['shippingtelephone']."</phone>n";
//$txnRequest .= "<email>".$fpinput['shippingemail']."</email>n";
$txnRequest .= "</shippingDetails>n";
}
$txnRequest .= $end_xml_Type;

return $txnRequest;
}

function _post_request($xml_bits,$txMode) {

$results = array();
if (MODULE_PAYMENT_OPTIMALPAYMENTS_TESTMODE=="Product ion")
$url = "https://webservices.optimalpayments.com/creditcardWS/CreditCardServlet/v1";
else
$url = "https://webservices.test.optimalpayments.com/creditcardWS/CreditCardServlet/v1";

$ch = curl_init();
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,"&txnMode=".$txMode."&txnReques t=".urlencode($xml_bits));
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

$rresult = curl_exec($ch);
$result = array();

if (curl_errno($ch)) {
$result['description'] = "Sorry, we had an internal processing issue, please call customer support!".curl_error($ch);
$result['decision'] = "ERROR";
} else {
curl_close($ch);

// Parse the XML object
// stupid namespace hax0r, yeah I know there is a "nicer" way to do this,, but this is much more entertaining!
$rresult = str_replace("xmlns=","a=",$rresult);

$xmlObj = simplexml_load_string($rresult);

$xpath = $xmlObj->xpath('decision');
$result['decision'] = ($xpath !== FALSE && isset($xpath[0])) ? (string)$xpath[0] : '';
$xpath = $xmlObj->xpath('confirmationNumber');
$result['confirmationNumber'] = ($xpath !== FALSE && isset($xpath[0])) ? (string)$xpath[0] : '';

$xpath = $xmlObj->xpath('code');
$result['code'] = ($xpath !== FALSE && isset($xpath[0])) ? (string)$xpath[0] : '';
$xpath = $xmlObj->xpath('description');
$result['description'] = ($xpath !== FALSE && isset($xpath[0])) ? (string)$xpath[0] : '';
$xpath = $xmlObj->xpath('authCode');
$result['authCode'] = ($xpath !== FALSE && isset($xpath[0])) ? (string)$xpath[0] : '';
$xpath = $xmlObj->xpath('avsResponse');
$result['avsResponse'] = ($xpath !== FALSE && isset($xpath[0])) ? (string)$xpath[0] : '';
$xpath = $xmlObj->xpath('cvdResponse');
$result['cvdResponse'] = ($xpath !== FALSE && isset($xpath[0])) ? (string)$xpath[0] : '';

}

return $result;
}



function after_process() {
return false;
}

function get_error() {
global $HTTP_GET_VARS;

$error = array('title' => MODULE_PAYMENT_OPTIMALPAYMENTS_TEXT_ERROR,
'error' => stripslashes(urldecode($HTTP_GET_VARS['error'])));

return $error;
}

function check() {
if (!isset($this->_check)) {
$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_OPTIMALPAYMENTS_STATUS'");
$this->_check = tep_db_num_rows($check_query);
}
return $this->_check;
}

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 FirePay Module', 'MODULE_PAYMENT_OPTIMALPAYMENTS_STATUS', 'True', 'Do you want to accept Optimal Payments / FirePay 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 ('Account Number', 'MODULE_PAYMENT_OPTIMALPAYMENTS_ACCOUNT', 'testing', 'CAD - Your FirePay / SFCommerce Account Number', '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 ('Username', 'MODULE_PAYMENT_OPTIMALPAYMENTS_USERNAME', 'testing', 'CAD - The merchant username provided by the FirePay or SFCommerce service', '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 ('Password', 'MODULE_PAYMENT_OPTIMALPAYMENTS_PASSWORD', 'Test', 'CAD - The merchant password provided by the FirePay or SFCommerce 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_OPTIMALPAYMENTS_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 Type', 'MODULE_PAYMENT_OPTIMALPAYMENTS_OPERATION', 'Authorization', 'What type of transaction should be used?', '6', '0', 'tep_cfg_select_option(array('Authorization', 'Payment'), ', 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_OPTIMALPAYMENTS_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_OPTIMALPAYMENTS_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_OPTIMALPAYMENTS_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())");
}

function remove() {
tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}

function keys() {
return array('MODULE_PAYMENT_OPTIMALPAYMENTS_STATUS', 'MODULE_PAYMENT_OPTIMALPAYMENTS_ACCOUNT', 'MODULE_PAYMENT_OPTIMALPAYMENTS_USERNAME', 'MODULE_PAYMENT_OPTIMALPAYMENTS_PASSWORD',
'MODULE_PAYMENT_OPTIMALPAYMENTS_TESTMODE', 'MODULE_PAYMENT_OPTIMALPAYMENTS_OPERATION', 'MODULE_PAYMENT_OPTIMALPAYMENTS_ZONE', 'MODULE_PAYMENT_OPTIMALPAYMENTS_ORDER_STATUS_ID', 'MODULE_PAYMENT_OPTIMALPAYMENTS_SORT_ORDER');
}

}
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 06-18-2009, 06:43 AM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 2,681
Thanks: 12
Thanked 214 Times in 196 Posts
Rep Power: 20
jpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud of
Default Re: Order amount not carrying over to payment processor

Not sure which one the above is ---but check out:

osCommerce Community Add-Ons
osCommerce Community Add-Ons
osCommerce Community Add-Ons
osCommerce Community Add-Ons
__________________
JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
Try out our osCMax at: Live Catalog Demo
Limited access Admin: Live Admin Demo
Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Minimum Order Amount michael_s New osCommerce Contributions 0 03-19-2008 03:20 PM
Minimum Order Amount michael_s New osCommerce Contributions 1 11-01-2007 07:03 PM
Minimum Order Amount michael_s New osCommerce Contributions 0 09-23-2007 01:25 AM
Order total amount problems klk osCommerce 2.2 Installation Help 0 05-27-2005 08:11 AM
Minimum Order Amount jgkiefer osCMax v1.7 Discussion 3 03-05-2004 09:47 AM


All times are GMT -8. The time now is 02:23 PM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design