Jump to content

ticketthing

Members
  • Content count

    53
  • Joined

  • Last visited

Everything posted by ticketthing

  1. Hi. I have set up a coupon that offers free shipping. I set it up that way in the coupon admin. It is not working. It looks like it is working, and the total is showing up without shipping, but it is charging the customer's charge card with shipping. i am using an EFS payment module. My Order Total Module is set to Subtotal 1 Shipping 2 Tax 3 Discount Coupons 740 Gift Voucheers 9 Total 900 This passes the correct value to Paypal but not to EFS. Here is the EFS Module. Thanks. $form_data = array( Method => MODULE_PAYMENT_EFSNET_METHOD, StoreID => MODULE_PAYMENT_EFSNET_STOREID, StoreKey => MODULE_PAYMENT_EFSNET_STOREKEY, ApplicationID => 'EFSNet OSCommerce v1.1.0', ReferenceNumber => $customer_id, TransactionAmount => number_format($order->info['total'], 2), SalesTaxAmount => number_format($order->info['tax'], 2), AccountNumber => $_POST['efsnet_cc_number'], ExpirationMonth => $_POST['efsnet_cc_expires_month'], ExpirationYear => $_POST['efsnet_cc_expires_year'], BillingName => urlencode($_POST['efsnet_cc_owner']), BillingAddress => $order->customer['street_address'], BillingCity => $order->customer['city'], BillingState => $order->customer['state'], BillingPostalCode => $order->customer['postcode'], BillingCountry => $order->customer['country']['title'], BillingPhone => $order->customer['telephone'], BillingEmail => $order->customer['email_address'], ShippingName => urlencode($order->delivery['firstname']." ".$order->delivery['lastname']), ShippingAddress => $order->delivery['street_address'], ShippingCity => $order->delivery['city'], ShippingState => $order->delivery['state'], ShippingPostalCode => $order->delivery['postcode'], ShippingCountry => $order->delivery['country']['title'], ClientIPAddress => $_SERVER['REMOTE_ADDR'] ); Many Thanks.
  2. Hi. I have set up a coupon that offers free shipping. I set it up that way in the coupon admin. It is not working. It looks like it is working, and the total is showing up without shipping, but it is charging the customer's charge card with shipping. i am using an EFS payment module. My Order Total Module is set to Subtotal 1 Shipping 2 Tax 3 Discount Coupons 740 Gift Voucheers 9 Total 900 Many Thanks.
  3. hi. i am considering this contribution. i would love to see it in action. can someone please share a store that has this implemented? pm maybe. many thanks.
  4. ticketthing

    Wonderful Contibution

    http://www.oscommerce.com/community/contributions,1517 i had a few calls that were related to the need to click the update button. This contribution nails is. many, many thanks!
  5. ticketthing

    this month +1

    hi. this is probably simple. i need for the calendar to open to october or month(now) +1. thanks. randy ticketthing.com
  6. ticketthing

    Efsnet

    hi. i have been pulling my hair out over this EFS gateway thing. i have many clients that want to use this. i even changed ISPs over this thing to have cURL avaialbe. the current contribution for EFS does not work. Here it is: <?php /* $Id: efsnet.php,v 1.0 2003/08/03 17:25:43 JohnNelson Exp $ osCommerce 2.2, Open Source E-Commerce Solutions EFSnet Named Pair Connection Last Update: 08/03/03 Author: John Nelson Email: info@phpmage.com This class is based off of the authorize.net payment module. If anything does not work, or any updates are made to improve it's behavior, please email me any changes or questions you may have. DISCLAIMER: This code is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. */ class efsnet { // class constructor function efsnet() { global $order; $this->code = 'efsnet'; $this->title = MODULE_PAYMENT_EFSNET_TEXT_TITLE; $this->description = MODULE_PAYMENT_EFSNET_TEXT_DESCRIPTION; $this->enabled = ((MODULE_PAYMENT_EFSNET_STATUS == 'True') ? true : false); $this->sort_order = MODULE_PAYMENT_EFSNET_SORT_ORDER; if ((int)MODULE_PAYMENT_EFSNET_ORDER_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_EFSNET_ORDER_STATUS_ID; } if (is_object($order)) $this->update_status(); } 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['efsnet_cc_number'], $HTTP_POST_VARS['efsnet_cc_expires_month'], $HTTP_POST_VARS['efsnet_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) . '&efsnet_cc_owner=' . urlencode($HTTP_POST_VARS['efsnet_cc_owner']) . '&efsnet_cc_expires_month=' . $HTTP_POST_VARS['efsnet_cc_expires_month'] . '&efsnet_cc_expires_year=' . $HTTP_POST_VARS['efsnet_cc_expires_year']; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $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 update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_EFSNET_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_EFSNET_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 cc_owner = document.checkout_payment.efsnet_cc_owner.value;' . "\n" . ' var cc_number = document.checkout_payment.efsnet_cc_number.value;' . "\n" . ' if (cc_owner == "" || cc_owner.length < ' . CC_OWNER_MIN_LENGTH . ') {' . "\n" . ' error_message = error_message + "' . MODULE_PAYMENT_EFSNET_TEXT_JS_CC_OWNER . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n" . ' if (cc_number == "" || cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "\n" . ' error_message = error_message + "' . MODULE_PAYMENT_EFSNET_TEXT_JS_CC_NUMBER . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n" . ' }' . "\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_EFSNET_TEXT_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('efsnet_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_EFSNET_TEXT_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('efsnet_cc_number')), array('title' => MODULE_PAYMENT_EFSNET_TEXT_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('efsnet_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('efsnet_cc_expires_year', $expires_year)))); return $selection; } function confirmation() { global $order; } function process_button() { global $HTTP_SERVER_VARS, $order, $customer_id; // place credit card variables into the form for the transact method foreach($_POST as $var => $val) echo '<input type="hidden" name="'.$var.'" value="'.$val.'">'."\r\n"; } // this function is ran before the order is processed function before_process() { global $order; $result = $this->transact(); if ($result['ResponseCode'] == '00') return; if ($result['ResponseCode'] == '0') return; if (($result['ResponseCode'] != '0')||($result['ResponseCode'] != '00')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_EFSNET_TEXT_DECLINED_MESSAGE.$result['ResultMessage'].$result['data'].print_r($order->info, true)), 'SSL', true, false)); } // Any other ResponseCode is an error as well tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_EFSNET_TEXT_ERROR_MESSAGE.$result['ResultMessage'].$result['data'].print_r($order->info, true)), 'SSL', true, false)); return $result(); } function after_process() { global $order; } function get_error() { global $HTTP_GET_VARS; $error = array('title' => MODULE_PAYMENT_EFSNET_TEXT_ERROR, 'error' => stripslashes(urldecode($HTTP_GET_VARS['error']))); return $error; } // execute the transaction function transact() { global $HTTP_SERVER_VARS, $order, $customer_id; unset($form_data); $form_data = array( Method => MODULE_PAYMENT_EFSNET_METHOD, StoreID => MODULE_PAYMENT_EFSNET_STOREID, StoreKey => MODULE_PAYMENT_EFSNET_STOREKEY, ApplicationID => 'EFSNet OSCommerce Method', ReferenceNumber => $customer_id, TransactionAmount => number_format($order->info['total'], 2), SalesTaxAmount => number_format($order->info['tax'], 2), AccountNumber => $_POST['efsnet_cc_number'], ExpirationMonth => $_POST['efsnet_cc_expires_month'], ExpirationYear => $_POST['efsnet_cc_expires_month'], BillingName => urlencode($_POST['efsnet_cc_owner']), BillingAddress => $order->customer['street_address'], BillingCity => $order->customer['city'], BillingState => $order->customer['state'], BillingPostalCode => $order->customer['postcode'], BillingCountry => $order->customer['country']['title'], BillingPhone => $order->customer['telephone'], BillingEmail => $order->customer['email_address'], ShippingName => urlencode($order->delivery['firstname']." ".$order->delivery['lastname']), ShippingAddress => $order->delivery['street_address'], ShippingCity => $order->delivery['city'], ShippingState => $order->delivery['state'], ShippingPostalCode => $order->delivery['postcode'], ShippingCountry => $order->delivery['country']['title'], ClientIPAddress => $_SERVER['REMOTE_ADDR'] ); // concatenate order information variables to $data while(list($key, $value) = each($form_data)) { $data .= $key . '=' . urlencode(ereg_replace(',', '', $value)) . '&'; } // take the last & out for the string $data = substr($data, 0, -1); unset($response); // Post order info data to EFSNet, make sure you have curl installed //BEGIN PHP_CURL.DLL CODE - Author: Peter Drake - 4/29/03 //Use for Win32 or Unix-type systems with php-curl.dll // Get a CURL handle $curl_handle = curl_init (); // Tell CURL the URL of the CGI if (MODULE_PAYMENT_EFSNET_TESTMODE == 'Test') curl_setopt ($curl_handle, CURLOPT_URL, "https://testefsnet.concordebiz.com/EFSnet.dll"); else curl_setopt ($curl_handle, CURLOPT_URL, "https://efsnet.concordebiz.com/efsnet.dll"); // This section sets various options. See http://www.php.net/manual/en/function.curl-setopt.php // for more details curl_setopt ($curl_handle, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($curl_handle, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($curl_handle, CURLOPT_POST, 1); curl_setopt ($curl_handle, CURLOPT_POSTFIELDS, $data); //randy added this per forum post curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, 0); // Perform the POST and get the data returned by the server. $response = curl_exec ($curl_handle) or die ("There has been an error connecting to EFSNet."); // Close the CURL handle curl_close ($curl_handle); $details = explode("&", $response); foreach($details as $row) { $tmp = explode("=",$row); $result[$tmp[0]] = $tmp[1]; } unset($tmp); $result['data'] = $data; return $result; //END PHP_CURL.DLL CODE } // check to see if this module is installed already function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_EFSNET_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } // install the module 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 EFSnet Module', 'MODULE_PAYMENT_EFSNET_STATUS', 'True', 'Do you want to accept EFSNet 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 Username', 'MODULE_PAYMENT_EFSNET_STOREID', 'testing', 'The StoreID used for the EFSNet 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 ('Transaction Key', 'MODULE_PAYMENT_EFSNET_STOREKEY', 'Test', 'Store Key used for encrypting 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_EFSNET_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_EFSNET_METHOD', 'CreditCardCharge', 'Transaction method used for processing orders', '6', '0', 'tep_cfg_select_option(array(\'CreditCardCharge\',\'CreditCardAuthorize\'), ', 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_EFSNET_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_EFSNET_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_EFSNET_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())"); } // remove the module function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } // keys that this module installs into the configuration database function keys() { return array('MODULE_PAYMENT_EFSNET_STATUS', 'MODULE_PAYMENT_EFSNET_STOREID', 'MODULE_PAYMENT_EFSNET_STOREKEY', 'MODULE_PAYMENT_EFSNET_TESTMODE', 'MODULE_PAYMENT_EFSNET_METHOD', 'MODULE_PAYMENT_EFSNET_ZONE', 'MODULE_PAYMENT_EFSNET_ORDER_STATUS_ID', 'MODULE_PAYMENT_EFSNET_SORT_ORDER'); } } ?> now, i got an email from a tech guy at EFS with this sample code that he says works. <? # PHP - cURL - EFSnet Sample code (CGI-POST) $PostURL = "https://testefsnet.concordebiz.com/EFSnet.dll"; $ch = curl_init(); $aryPost['Method'] = "SystemCheck"; $aryPost['StoreID'] = "Your Store ID"; $aryPost['StoreKey'] = "Your Store Key"; $aryPost['ApplicationID'] = "EFSnet PHP sample (CGI-Post)"; # Build Post Data if (is_array($aryPost)) { foreach($aryPost as $Token => $Value) $PostData .= "$Token=$Value&"; } curl_setopt($ch, CURLOPT_URL, $PostURL); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $PostData); $result = curl_exec($ch); curl_close($ch); # Parse the results $aryResult = array(); $aryTemp = explode("&", $result); # work through each TokenPair foreach($aryTemp as $tokenpair) { list($token, $value) = explode("=", $tokenpair); $aryResult[$token] = urldecode($value); } unset($aryTemp); echo "Post Data:<br>$PostData<br><br>"; echo "Raw Result:<br><b>$result</b><br><br>"; echo "ResponseCode: <b>{$aryResult['ResponseCode']}</b><br>"; echo "ResultCode: <b>{$aryResult['ResultCode']}</b><br>"; echo "ResultMessage: <b>" . $aryResult['ResultMessage'] . "</b><br>"; ?> ============================ i do not know how to integrate that into the existing module. can anyone help? many thanks. -randy
  7. hi again. i am selling tickets on behalf of small theatres. most theatres have a student/military/etc. discount. i will deal with these in attributes. now then, i need to limit coupon usage to "General Admission" attributed products only. you cannot combine discounts. another great mod would be to set the number of products ordered against the coupon. my theatres could sell "Frequent Flyer" passes taht would allow a 25% discount that could be used for 10 seats. TIA.
  8. hi. first, this is a GREAT mod. first time around, i installed it to the letter and then forgot to turn it on in admin. duhhh.... anyway, this is really going to please my customers -- small theatre owners. most of you are familiar with a "last minute tix" type of thing. if i could offer a coupon for items or categories that would only work between say 7PM and 7:45PM, that would be amazing. i looked at the functions of this.... i see where it checks date. now, how to modify so that it first checks to see if this is a date or time coupon, then check date or time accordingly, then process.... TIA!
  9. ticketthing

    error in doc -- credit - gift voucher

    i did figure out the anomoly in the document. but, first time around, i forgot to turn the thing on in payment modules. man, i am stoked. this is perfect. many thanks to authors. meant no disrespect. :::: happy dance!!! ::::
  10. on page 4 it says to edit catalog/english.php there is no such file. i tried this once and it did not work. i think i need some custom help. this one is hard.
  11. ticketthing

    attributes and coupons

    OK. Here goes. I am running a ticket booth on-line for small artistic venues. I am planning to install the Attribute Sorter and Copier. Most shows have Regular, Student/Senior and SAG discounts, etc. I must also install coupons... show specials, comps, subscriptions, etc. The deal is that a coupon can ONLY be used on a regular price ticket. So, i cannot use a 50% off coupon with an attribute that is -$3.00 for Senior price. Before I do all of this, does anyone have any pointers? Should the coupon mod check the attribute? Can the attribute have a coupon property? If someone has been down a similiar path, I would sure love to hear from you. Mille Grazie. -Randy
  12. ticketthing

    Event Calender

    hi. i have installed 26 events for a month. when i click on the "sep" button, to display all events... all good. it shows five and then there are links to more. but the links do not work. keeps going to december ("no events found").... the status bar looks good, but the links are bad. i tried looking at code... could not spot anything. in the meanwhile, i set the options for events per page to 50. i would like to have the 5 per page if we could fix this. million thanks!
  13. ticketthing

    Event Calender

    this is a great addition to my store. www.ticketthing.com/6thatpenn/catalog really sweet! -randy
  14. ticketthing

    NEW! Complete Order Editing Tool!

    yes, this is what i need. all that would make it perfect would be that if it would change the quantities available in the database. very important for small theatres. thanks.
  15. ticketthing

    NEW! Complete Order Editing Tool!

    hi. i installed this and it is great! i am making a ticket portal for small theatres. what i need is the ability to change the night of performance: someone calls and sez that i cannot make it tonight, but i would like to go next Thursday. The current tool adds the new night, but it does not update the current night to 0 and add to the quantities... any ideas? thanks.
  16. ticketthing

    coolMenu

    Hello from San Diego. I did install the menu and i do like it. Some issues that i cannot figure out. See: http://ticketthing.com/6thatpenn/catalog/ I cannot seem to figure out how to contol the height of the box. As it is, it is too high. Also, is it possible to have all of the products "fly out"? For my store, that might be cool. i would like to see how it looks. and would that take them directly to the product? many thanks. Randy Rovang
  17. ticketthing

    EFSnet Payment Module

    yes, i could use it. efs seems to have a great rate. 2.35%. that flat out beats everyone that i have researched. i want to be able to offer the most economical gateway/cc fees to my clients and if there is a gateway out there that works, i am very stoked. and thus will be my clients. many thanks! randy
×