orderconfig.cgi 100644 25223 144 34001 6650253113 12111 0ustar rgauser#!/usr/local/bin/perl # ============================= # Merchant OrderForm v1.4 January 1999 # Written by RGA@IO.COM _____ http://www.io.com/~rga/scripts/ # DISCLAIMER______________________________________________________________________________ # By opening and configuring this for your server and application you thereby assume any and all responsibility # for the use and outcomes of this program. Please read the documentation on configurations, so that no surprises # in calculations occur. The math has been carefully checked, but if you do not clearly understand the settings # and how they create different calculations, then you may get undesired results. Test your installation thoroughly. # WEB-WARE______________________________________________________________________________ # Please do not distribute this script, as it is not a free-ware version. Please direct any non registered users # of this script to the author's Web Site listed above for details on how to obtain a registered copy of this script. # INSTALLATION____________________________________________________________________________ # The documentation included in this script package should answer all but some very rare questions regarding # installation, usage, features, and limitations. If you're having a problem getting the script to run, it is very likely # that your situation is discussed in the documentation. Especially, consult the FAQ and CGI installation tips. # This is the CONFIGURATION FILE, defines coinfiguration settings for the three processing files # This file must be located in the CGI-BIN along with the 3 SCRIPT files, 2 DAT files, and 3 DB files. # DEFINE THESE VARIABLES FOR YOUR APPLICATION AND SERVER # Switches to TURN ON / OFF functions # TAX VARIABLES AND CONFIGS $use_tax = 0; # turn on (1) off (0) the Tax computations # If use_tax turned on then state pattern matching is enabled by default # turning on the all_tax switch overrides state pattern matching $all_tax = 0; # turn on (1) off (0) tax computation for All invoices # use_tax must be turned on for this to work $all_rate = 0.055; # default rate if all_tax set and no state taxrates defined # will seek to match for < taxrates > first, then default to this rate # associative array to match state to tax and set rate # the keys must match results of your drop down menu for shipping state # you must define at least one match unless using default all_tax rate # set this to < taxrates = () > if no individual state tax rates will be used # Example taxing 3 States -- %taxrates = ('TX',0.0625,'CO',0.03,'OK',0.0825); %taxrates = ('CO',0.03); $tax_before = 0; # tax is computed before (1) or after (0) S&H totals @exceptions = ('DE','MT','NH','NJ'); # exceptions to tax_before rule ( reverses rule for these states ) # triggers only if state is taxable or all_tax enabled # exceptions() for NONE # DISCOUNT VARIABLES AND CONFIGS $use_discount = 0; # turn on (1) off (0) the Discount computations # overrides all other discount settings $repeat_discount = 1; # repeat discount (1) each num/amt interval for rate # a one time discount (0) anything over num/amt for rate # no discout is computed with this switch off (0) $num_discount = 0; # apply discount at each / or after N number of products $amt_discount = 1; # apply discount at each / or after N dollar amount of purchases # IMPORTANT: only one of these switches may have a value > 0 # discount computations will NOT trigger if both are > 0 $min_discount = 2; # apply a minimum discount (N), or do not apply (0), dollar amount $max_discount = 0; # apply a maximum discount (N), or do not apply (0), dollar amount $rate_discount = 0.1; # dollar amount of discount to be applied by rules above # HANDLING VARIABLES AND CONFIGS $use_handling = 0; # turn on (1) off (0) the Handling Charge computations # overrides all other handling charge settings # no handling charges happen with this switch off (0) $repeat_handling = 1; # repeating the computation (1), or one-time computation (0) $num_handling =0; # apply the handling charge at this interval for number of products $amt_handling = 1; # apply the handling charge at this interval for amount of purchase # IMPORTANT: only one of these switches may have a value > 0 # handling computations will NOT trigger if both are > 0 $min_handling = 0; # apply a minimum (N) charge, or no minimum applies (0), dollar amount $max_handling = 0; # apply a maximum (N) charge, or no maximum applies (0), dollar amount $rate_handling = .05; # dollar amount of handling charge to be applied by rules above # SHIPPING CONFIGURATIONS - METHODS SETTINGS $use_ship = 0; # turn on (1) off (0) the Shipping computations $use_country = 0; # turn on (1) off (0) Automatic out of country adjustments # uses the shipping destination country to match to same country # if this feature is off, all rates are the same whether in or out of the country # if this feature is on, you must set "rate_Fstandard" and "rate_Fexpress" below $match_country = "USA"; # exact name of the Merchant country in drop down list # used only for automatic country matching $use_rates = 0; # enable (1) disable (0) customer choice for express or standard shipping methods # You must enable at least one rate configuration, either this customer choice option # or one of the default methods below ( use_standard or use_express ) # enabling this switch overrides the default methods below ( use_standard or use_express ) # Messages for standard / express shipping methods ( if enabled for customer ) # These messages will not display unless "use_rates" is enabled (1) $msg_standard = "Standard Shipping 4 to 5 days regular mail"; $msg_express = "Express Shipping Federal Express 2 day delivery"; $use_standard = 0; # enable (1) disable (0) standard shipping rates as default rates $use_express = 0; # enable (1) disable (0) express shipping rates as default rates # IMPORTANT: only one of these can be enabled # if both are enabled then no computations occur unless customer choice is enabled # SHIPPING CONFIGURATIONS - GLOBAL SETTINGS # Important: to use global as the default computations you MUST disable "use_items" $repeat_shipping = 1; # repeating the computation (1) or a one time charge (0) $num_shipping = 0; # apply computation to this increment of shipcode values ( weight codes ) $amt_shipping = 0.01; # apply computation to this increment of dollar value # IMPORTANT: only one of these switches may have a value > 0 # shipping computations will NOT trigger if both are > 0 $min_standard = 0; # dollar amount for minimum standard shipping charge, or none applies (0) $max_standard = 0; # dollar amount (N) for maximum standard shipping charge, or none applies (0) $rate_standard = 0.001; # dollar amount to be applied by rules above for standard charges $min_express = 12.95; # dollar amount for minimum express shipping charge, or none applies (0) $max_express = 0; # dollar amount for maximum express shipping charge, or none applies (0) $rate_express = 0.002; # dollar amount to be applied by rules above for express charges $min_Fstandard = 6.5; # dollar amount for minimum foriegn standard shipping charge, or none applies (0) $max_Fstandard = 0; # dollar amount for maximum foriegn standard shipping charge, or none applies (0) $rate_Fstandard = 0.003; # dollar amount to be applied by rules above for foreign standard charges $min_Fexpress = 22.95; # dollar amount for minimum foreign express shipping charge, or none applies (0) $max_Fexpress = 0; # dollar amount for maximum foreign express shipping charge, or none applies (0) $rate_Fexpress = 0.004; # dollar amount to be applied by rules above for foreign express charges # SHIPPING CONFIGURATIONS - INDIVIDUAL ITEM CODE SETTINGS $use_items = 0; # enable (N) or disable (0) using the ship code setting feature # Note: N is the number of ship codes in your system # and N must match the number of individually defined arrays for your ship code settings # you must define 12 settings for each of the ship codes in your system # consult the diagram in the documentation for how this works # If you're getting an error, please double and triple check the item arrays you made # I have thoroughly tested the routines that process these definition arrays @items1 = (0,0,0.15,0,0,0.25,0,0,0.25,0,0,0.45); # settings for ship code 1 @items2 = (0,0,0.25,0,0,0.35,0,0,0.25,0,0,0.55); # settings for ship code 2 @items3 = (0,0,0.35,0,0,0.45,0,0,0.35,0,0,0.65); # settings for ship code 3 @items4 = (0,0,0.45,0,0,0.55,0,0,0.45,0,0,0.75); # settings for ship code 4 # IMPORTANT NOTE: When using this individual ship code definition system, any settings you # have for Minimum / Maximum in the GLOBAL settings above, will apply to overall shipping # charges for the method that has settings. If you don't want "overall" global Minimum / Maximum # settings to apply, then you need to set all those settings to zero. # ENABLING CUSTOM FIELDS $use_fields = 0; # turn on (1) or off (0) custom fields usage # what is the Title Heading for custom field section ? $title_fields = "Custom information displays here"; # identify names and title names for your custom fields @custom_names = ('one','two','three','four','five','six'); @custom_titles = ('Field One','Field Two','Field Three','Field Four','Field Five','Field Six'); # what custom fields to include on customer mail # enable (1) position element or disable (0) that position field from list above @customer_fields = ( 1,1,1,1,1,1 ); # IMPORTANT NOTE: The 3 "custom" arrays above Must have identical number of elements # OTHER SWITCH FUNCTIONS $special_ship = 0; # Hidden special shipping support # Note: this feature is for customizing support only $check_validate = 0; # turn on (1) or off (0) the check information validation rules # enabling this assumes that you are using Online Checking # must be enabled if using "cyber permission" for Online Checking $show_check = 1; # Display the check info even if not validated, whatever is filled out # Disabling check_validate assumes that Online Checking is NOT being used $cyber_check = 0; # Enables (1) or disables (0) "cyber permission" radio buttons # Requires user to enter their "cyber permission" before final processing # Checks CC and Online checking only - use check_validate for checking # Else automatically checks for CC $redirect_url = "../index.html"; # Location to redirect if approval fails $redirect_name = "Your Home WebSite Page"; # Name for the redirection page $lock = 0; # enable (1) or disable (0) the file locking feature $log_file = 0; # enable (1) or disable (0) invoice logging to file $rdb_file = 0; # enable (1) or disable (0) invoice+orders data logging in RDB import files $mail_info = 1; # include (1) exclude (0) sensative information in email invoice to merchant # the customer email notice never gets the sensative information # RETURN LINK SETTINGS # this is the Merchant Name appearing throughout the screens - appears as a link back to your main page # use an image reference if you want, or you can just use a name "My Site Name" $site_name = "\"Your"; $plain_name = "Your WebSite Name Here"; # plain text site name $base_url = "../"; # This is the HTTP base pathway to your Web site # It is only used for a link back to your main page # Must end with the "/" marker $main_filename = "anydirectory/index.html"; # This is the name of the file you want to return to # and path from the base_url if needed # Don't start this with a "/" marker # MERCHANT INFORMATION $on_attributes = ""; # HTML begin tag for Merchant Address appearing below name $off_attributes = ""; # HTML end tag for Merchant Address appearing below name $site_address = "PO Box 2001"; # Merchant address $site_city = "Austin"; # Merchant city $site_state = "Texas"; # Merchant state $site_zip = "77777"; # Merchant zip code $site_phone = "512.444.4444"; # Merchant phone number $site_fax = "512.444.1212"; # Merchant fax number # FILE LOCATIONS # It's easiest to just put all the files in your CGI-BIN # Put the Front End HTML OrderForm anywhere and point it to the first script $cgi_count = "ordercount14.cgi"; # Address of count script $cgi_final = "orderfinal14.cgi"; # Address for final script # This is the absolute path for writing to the Log File # Just put the filename if you put DAT and script files in your cgi-bin # And read the part about security in the readme file .. $logfile_path = "orderlog.dat"; # This is the absolute path for writing to the Invoice Number file # Just put the filename if you put DAT and script files in your cgi-bin $number_path = "ordernumber.dat"; # This is the absolute path for writing to the RDMS file $rdb_main = "ordermain.rdb"; # This is the absolute path for writing to the RDMS file $rdb_orders = "orderorders.rdb"; # This is the absolute path for writing to the RDMS file $rdb_custom = "ordercustom.rdb"; # This is the character to use as a delimiter in the RDBMS ASCII import files $delimit = "~"; # MERCHANT and CUSTOMER MAIL OPTIONS # This is a return Web address that is placed in the customer email confirmation $site_location = "http://www.yourdomain.com"; $merchantmail = 0; # enable (1) disable (0) mailing the Merchant a copy of the order invoice $customermail = 0; # enable (1) disable (0) sending the Customer an email receipt $mailprog = '/usr/sbin/sendmail'; # Server location of mail program $myemail = 'yourname@domain.com'; # Merchant email address # THIS IS THE END OF CONFIGURATIONS # ============================== # Merchant OrderForm v1.4 November 1999 # Written by RGA@IO.COM _____ http://www.io.com/~rga/scripts/ ordercount14.cgi 100644 25223 144 114734 6650253106 12177 0ustar rgauser#!/usr/local/bin/perl # ============================= # Merchant OrderForm v1.4 January 1999 # Written by RGA@IO.COM _____ http://www.io.com/~rga/scripts/ # DISCLAIMER______________________________________________________________________________ # By opening and configuring this for your server and application you thereby assume any and all responsibility # for the use and outcomes of this program. Please read the documentation on configurations, so that no surprises # in calculations occur. The math has been carefully checked, but if you do not clearly understand the settings # and how they create different calculations, then you may get undesired results. Test your installation thoroughly. # WEB-WARE______________________________________________________________________________ # Please do not distribute this script, as it is not a free-ware version. Please direct any non registered users # of this script to the author's Web Site listed above for details on how to obtain a registered copy of this script. # INSTALLATION____________________________________________________________________________ # The documentation included in this script package should answer all but some very rare questions regarding # installation, usage, features, and limitations. If you're having a problem getting the script to run, it is very likely # that your situation is discussed in the documentation. Especially, consult the FAQ and CGI installation tips. # Make sure you have the correct name for the CONFIG file here. require 'orderconfig.cgi'; # Get Input - load orders matching quantity to product @orders = (); $Nrecords = 0; $qnty_num = 1; read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $ITM (@pairs) { ($name, $value) = split(/=/, $ITM); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/<([^>]|\n)*>//g; $value =~ s///g; $FORM{$name} = $value; # increment quantity - product filenmes $qnty_check = "quantity_"; $qnty_check .= $qnty_num; $prod_check = "product_"; $prod_check .= "$qnty_num"; # identify quantity value for this increment if ($name eq "$qnty_check") { # find the product data for this increment foreach $QNM (@pairs) { ($name1, $value1) = split(/=/, $QNM); $value1 =~ tr/+/ /; $value1 =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value1 =~ s/<([^>]|\n)*>//g; $value1 =~ s///g; if ($name1 eq "$prod_check") { $product_line = $value1; } } # join quantity and product and load orders if ( $value < 1 ) { $load_line = 0; } else { $load_line = int( $value ); } $load_line .= "----"; $load_line .= "$product_line"; $orders[$Nrecords] = $load_line; $Nrecords ++; $qnty_num++; } } # define switches $includetax = $FORM{'includetax'}; $unit_tax = $FORM{'unit_tax'}; $reversetax = $FORM{'reversetax'}; $sendcheck = $FORM{'sendcheck'}; $includecountry = $FORM{'includecountry'}; $shiptype = $FORM{'shiptype'}; $state = $FORM{'state'}; $show_check = $FORM{'show_check'}; # Get the Date @months = ('January','February','March','April','May','June','July','August','September','October','November','December'); @days = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); ($mday,$mon,$year,$wday) = (localtime(time))[3,4,5,6]; $year += 1900; $date = "$days[$wday], $months[$mon] $mday, $year"; # Return a PREVIEW INVOICE page print "Content-type: text/html\n\n"; print "Previewing order for $FORM{'realname'}\n"; print ""; print "
"; print "
\n"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "
"; print "$site_name Order Preview.$date
"; print "$on_attributes$site_address$off_attributes"; print "Ship to:
"; print "$on_attributes$site_city, $site_state   $site_zip$off_attributes"; print "$FORM{'realname'}
"; print "Ph $on_attributes$site_phone$off_attributes"; print "$FORM{'address'}
"; print "Fx $on_attributes$site_fax$off_attributes"; print "$FORM{'city'}, $FORM{'state'}   $FORM{'zip'}
"; print ""; print ""; print ""; print ""; print ""; print ""; print "
 
1."; print "Review your order and total amount.
 "; print "Check your ordered items, quantities, and total price before you submit for final processing. "; print "Use your browser back button to make any needed changes to this page. "; print "When this invoice is accurate click the "Final Processing" button below.
"; print ""; print ""; if ( $sendcheck ) { if ( $check_validate ) { print ""; } else { print ""; } } else { if ($FORM{'cardtype'} eq "visa") {$type = "Visa Card";} if ($FORM{'cardtype'} eq "mastercard") {$type = "Master Card";} if ($FORM{'cardtype'} eq "amex") {$type = "American Express Card";} if ($FORM{'cardtype'} eq "novus") {$type = "Discover Card";} print ""; } print "
 
"; print "Paying by Online Checking for "; print "$FORM{'checkname'} through $FORM{'checkbank'}.
"; print "You will be paying by Check"; print " or Money Order.
"; print "You will be paying by $type account for "; print "$FORM{'cardholder'}.
"; # Format the items in the array into a table of items ordered print " \n"; print ""; print ""; print ""; print ""; print ""; print "\n\n"; # PUT ORDERS IN TABLE ROWS foreach $order (@orders) { ( $quantity, $item, $description, $price, $ship ) = split(/----/, $order); # print it in the tables unless quantities zeroed out unless ($quantity == 0) { print ""; print " \n"; print " \n"; print " \n"; # subtotal applies if ( $quantity > 1 ) { print " \n"; } else { print " \n"; } print ""; # print the hidden values for final processing, eliminate zeroed out items print "\n\n"; } # sub total quantities greater than 1 if ( $quantity > 1 ) { $sub_price = ( $quantity * $price ); $sub_price = sprintf "%.2f", $sub_price; $sub_price = commify( $sub_price ); print ""; print ""; print " \n"; print " \n"; print ""; $price = ( $quantity * $price ); } # zero out quantities changed to zero for cummulative totals if ($quantity == 0) { $price = 0; } # total simple shipping ship codes unless ( $use_items ) { unless ( $quantity == 0 ) { $count_ship += ( $quantity * $ship ); } } # Keep cummulative totals $count_price += $price; $count_quantity += $quantity; $zero_check += $quantity; } print "
QtyItem NameDescriptionPrice
$quantity$item $description  \$ $price
 "; print "Sub Total \($quantity\) of $item at \$ $price each\$ $sub_price
\n\n"; $count_price = sprintf "%.2f", $count_price; # CALCULATE DISCOUNT $discount = 0; $show_discount = 0; if ( $use_discount ) { if ( $num_discount && !$amt_discount ) { if ( $repeat_discount ) { unless ( $count_quantity < $num_discount ) { $repeats = int ( $count_quantity / $num_discount ); $discount = ( $repeats * $rate_discount ); $show_discount++; } } else { if ( $count_quantity >= $num_discount ) { $discount = $rate_discount; $show_discount++; } } } elsif ( $amt_discount && !$num_discount ) { if ( $repeat_discount ) { unless ( $count_price < $amt_discount ) { $repeats = int ( $count_price / $amt_discount ); $discount = ( $repeats * $rate_discount ); $show_discount++; } } else { if ( $count_price >= $amt_discount ) { $discount = $rate_discount; $show_discount++; } } } if ( $discount < $min_discount ) { $discount = $min_discount; $show_discount++; } elsif ( $max_discount > 0 ) { if ( $discount > $max_discount ) { $discount = $max_discount; $show_discount++; } } } $discount = sprintf "%.2f", $discount; $sub_discount = ( $count_price - $discount ); $sub_discount = sprintf "%.2f", $sub_discount; # CALCULATE HANDLING $repeats = 0; $handling = 0; $show_handling = 0; if ( $use_handling ) { if ( $num_handling && !$amt_handling ) { if ( $repeat_handling ) { unless ( $count_quantity < $num_handling ) { $repeats = int ( $count_quantity / $num_handling ); $handling = ( $repeats * $rate_handling ); $show_handling++; } } else { if ( $count_quantity >= $num_handling ) { $handling = $rate_handling; $show_handling++; } } } elsif ( $amt_handling && !$num_handling ) { if ( $repeat_handling ) { unless ( $sub_discount < $amt_handling ) { $repeats = int ( $sub_discount / $amt_handling ); $handling = ( $repeats * $rate_handling ); $show_handling++; } } else { if ( $sub_discount >= $amt_handling ) { $handling = $rate_handling; $show_handling++; } } } if ( $handling < $min_handling ) { $handling = $min_handling; $show_handling++; } elsif ( $max_handling > 0 ) { if ( $handling > $max_handling ) { $handling = $max_handling; $show_handling++; } } } $handling = sprintf "%.2f", $handling; # CALCULATE SHIPPING $repeats = 0; $shipping = 0; $show_shipping = 0; if ( $use_ship ) { if ( $use_rates ) { if ( $shiptype eq "standard" ) { if ( $use_country && !$includecountry ) { $rate_shipping = $rate_Fstandard; $min_shipping = $min_Fstandard; $max_shipping = $max_Fstandard; $method = "Standard Foreign"; $rate_code = 8; $min_code = 6; $max_code = 7; } else { $rate_shipping = $rate_standard; $min_shipping = $min_standard; $max_shipping = $max_standard; $method = "Standard"; $rate_code = 2; $min_code = 0; $max_code = 1; } } elsif ( $shiptype eq "express" ) { if ( $use_country && !$includecountry ) { $rate_shipping = $rate_Fexpress; $min_shipping = $min_Fexpress; $max_shipping = $max_Fexpress; $method = "Express Foreign"; $rate_code = 11; $min_code = 9; $max_code = 10; } else { $rate_shipping = $rate_express; $min_shipping = $min_express; $max_shipping = $max_express; $method = "Express"; $rate_code = 5; $min_code = 3; $max_code = 4; } } } else { if ( $use_standard && !$use_express ) { if ( $use_country && !$includecountry ) { $rate_shipping = $rate_Fstandard; $min_shipping = $min_Fstandard; $max_shipping = $max_Fstandard; $method = "Standard Foreign"; $rate_code = 8; $min_code = 6; $max_code = 7; } else { $rate_shipping = $rate_standard; $min_shipping = $min_standard; $max_shipping = $max_standard; $method = "Standard"; $rate_code = 2; $min_code = 0; $max_code = 1; } } elsif ( $use_express && !$use_standard ) { if ( $use_country && !$includecountry ) { $rate_shipping = $rate_Fexpress; $min_shipping = $min_Fexpress; $max_shipping = $max_Fexpress; $method = "Express Foreign"; $rate_code = 11; $min_code = 9; $max_code = 10; } else { $rate_shipping = $rate_express; $min_shipping = $min_express; $max_shipping = $max_express; $method = "Express"; $rate_code = 5; $min_code = 3; $max_code = 4; } } } # end of use_rates method finding routines if ( $special_ship ) { # CUSTOM SHIPPING COMPUTATIONS NOTES # CUSTOM SHIPPING COMPUTATIONS NOTES # The resulting code MUST produce a final shipping amount variable -- $shipping # If any charges then $show_shipping is positive ( triggering display ) # Remember to have $use_ship enabled in the configuration file # Remember to set $special_ship enabled in the configuration file # You can make use of ALL THE VARIABLES TO THIS POINT # THESE RATES ARE SET BY CONFIGS OR PREVIOUS ROUTINES # includecountry -- triggers different country shipping rate ( if enabled ) # rate_shipping -- from previous routine # min_shipping -- from previous routine # max_shipping -- from previous routine # method -- from previous routine # THESE RATES REFERENCE THE < USE ITEMS ARRAYS > # Based on how the choices emerge from the above routines # rate_code -- Sets the rate for whatever item array is referenced ( N ) # min_code -- Sets the rate for whatever item array is referenced ( N ) # max_code -- Sets the rate for whatever item array is referenced ( N ) # shiptype -- method carried from previous script or configuration defaults # TOTALS FOR PRICE, QUANTITY, SHIPPING CODES, SUB TOTALS # count_price -- total amount of products ( Dollar Amount ) # sub_discount -- count_price - discount ( Dollar Amount ) # count_quantity -- total quantity of products ( Number ) # count_ship -- totals of shipcodes ( Number ) # CUSTOM SHIPPING COMPUTATIONS START # CUSTOM SHIPPING COMPUTATIONS START # CUSTOM SHIPPING COMPUTATIONS END # CUSTOM SHIPPING COMPUTATIONS END # compute shipping charges based on individual item settings } elsif ( $use_items ) { @summary = (); $N = 1; while ( $N <= $use_items ) { # load definitions for N shipcode $name = "items$N"; @definitions = @$name; # compute for N ship codes in orders foreach $order ( @orders ) { ( $quantity, $item, $description, $price, $ship ) = split(/----/, $order); if ( $quantity > 0 && $ship == $N ) { $summary[$N-1] += ( $definitions[$rate_code] * $quantity ); } } # min / max adjustments to N shipcode totals unless ( $summary[$N-1] == 0 ) { if ( $summary[$N-1] < $definitions[$min_code] ) { $summary[$N-1] = $definitions[$min_code]; } elsif ( $definitions[$max_code] > 0 && $summary[$N-1] > $definitions[$max_code] ) { $summary[$N-1] = $definitions[$max_code]; } } $N++; } # loop for a total of summary data $N = 1; while ( $N <= $use_items ) { $shipping += $summary[$N-1]; $N++; } # set to show line in display if there are charges if ( $shipping > 0 ) { $show_shipping++ } # use global settings for Minimum / Maximum if set if ( $shipping < $min_shipping ) { $shipping = $min_shipping; } elsif ( $max_shipping > 0 ) { if ( $shipping > $max_shipping ) { $shipping = $max_shipping; } } # this is where the global computations occur, if use_items not enabled, this defaults } else { if ( $num_shipping && !$amt_shipping ) { if ( $repeat_shipping ) { unless ( $count_ship < $num_shipping ) { $repeats = ( $count_ship / $num_shipping ); $shipping = ( $repeats * $rate_shipping ); $show_shipping++; } } else { if ( $count_ship >= $num_shipping ) { $shipping = $rate_shipping; $show_shipping++; } } } elsif ( $amt_shipping && !$num_shipping ) { if ( $repeat_shipping ) { unless ( $sub_discount < $amt_shipping ) { $repeats = ( $sub_discount / $amt_shipping ); $shipping = ( $repeats * $rate_shipping ); $show_shipping++; } } else { if ( $sub_discount >= $amt_shipping ) { $shipping = $rate_shipping; $show_shipping++; } } } if ( $shipping < $min_shipping ) { $shipping = $min_shipping; $show_shipping++; } elsif ( $max_shipping > 0 ) { if ( $shipping > $max_shipping ) { $shipping = $max_shipping; $show_shipping++; } } } # end of shipping computations, whether (special), (items) or (global) branch } # end the use_ship routine, overall branch # which results in a usable value for $shipping = charges $shipping = sprintf "%.2f", $shipping; # CALCULATE TAX $sales_tax = 0; $show_before = 0; $show_after = 0; $sub_after = 0; if ( $includetax ) { $PCtax = ( $unit_tax * 100 ); if ( $tax_before && !$reversetax || !$tax_before && $reversetax ) { $show_before++; $sales_tax = ( $sub_discount * $unit_tax ); } if ( $tax_before && $reversetax || !$tax_before && !$reversetax ) { $show_after++; $sub_after = ( $sub_discount + $handling + $shipping ); $sales_tax = ( $sub_after * $unit_tax ); } } $sales_tax = sprintf "%.2f", $sales_tax; $sub_after = sprintf "%.2f", $sub_after; # ZEROED OUT PRODUCTS if ( $zero_check == 0 ) { $discount = 0; $sub_discount = 0; $sub_after = 0; $sales_tax = 0; $handling = 0; $shipping = 0; } # CALCULATE TOTALS / FORMAT $grand_total = ( $sub_discount + $sales_tax + $handling + $shipping ); $grand_total = sprintf "%.2f", $grand_total; # format the math to commas $count_quantity = commify($count_quantity); $count_price = commify($count_price); $discount = commify($discount); $sub_discount = commify($sub_discount); $sales_tax = commify($sales_tax); $sub_after = commify($sub_after); $handling = commify($handling); $shipping = commify($shipping); $grand_total = commify($grand_total); # PRINT TOTALS print " \n"; # totals for products print ""; print "\n"; # print discount amount if ( $show_discount ) { print ""; print "\n"; print ""; print "\n"; } # display tax before if ( $show_before ) { print "\n"; } # print handling amount if ( $show_handling ) { print ""; print "\n"; } # print shipping charges if ( $show_shipping ) { print ""; print "\n"; } # display tax after if ( $show_after ) { if ( $show_handling && $show_shipping ) { print ""; print "\n"; print "\n"; } elsif ( $show_handling && !$show_shipping ) { print ""; print "\n"; print "\n"; } elsif ( !$show_handling && $show_shipping ) { print ""; print "\n"; print "\n"; } elsif ( !$show_handling && !$show_shipping ) { if ( $show_discount ) { print "\n"; } else { print "\n"; } } } # print adjusted total, final amount, paying by card / check if ( $sendcheck ) { if ($zero_check == 0) { print ""; print "\n"; } else { if ( $check_validate ) { print ""; print "\n"; } else { print ""; print "\n"; } } } else { if ($zero_check == 0) { print ""; print "\n"; } else { print ""; print "\n"; } } print "
"; print "Total price for $count_quantity Products ordered ---->\$ $count_price
"; print "A Discount is being applied to your purchases ---->\$ -$discount
"; print "Adjusted Sub Total after discount applied ---->\$ $sub_discount
"; print "$PCtax\% Sales Tax applies to this purchase ---->"; print "\$ $sales_tax
"; print "A Handling fee is being applied to this invoice ---->\$ $handling
"; print "$method shipping charges for this invoice ---->\$ $shipping
"; print "Adjusted Sub Total with shipping & handling ---->\$ $sub_after
"; print "$PCtax\% Sales Tax applied to Sub Total with S&H ---->"; print "\$ $sales_tax
"; print "Adjusted Sub Total with handling charges ---->\$ $sub_after
"; print "$PCtax\% Sales Tax applied to Sub Total with handling ---->"; print "\$ $sales_tax
"; print "Adjusted Sub Total with shipping charges ---->\$ $sub_after
"; print "$PCtax\% Sales Tax applied to Sub Total with shipping ---->"; print "\$ $sales_tax
"; print "$PCtax\% Sales Tax applied to Sub Total ---->"; print "\$ $sales_tax
"; print "$PCtax\% Sales Tax applied to Purchase Total ---->"; print "\$ $sales_tax
"; print "All quantities changed to zero - "; print "Must Enter Quantities ---->\$ $grand_total
"; print "Total Amount to be paid by "; print "$FORM{'checkbank'} check---->\$ $grand_total
"; print "Total Amount to be paid by check or money order ---->\$ $grand_total
"; print "All quantities changed to zero - "; print "Must Enter Quantities ---->\$ $grand_total
"; print "Total Amount to be paid by $type ---->\$ $grand_total
\n"; # END TOTALS PRINTING # Testing variables # print "


"; # print "Testing Variables
"; # print "SC1 = $SC1
"; # print "SC2 = $SC2
"; # print "SC3 = $SC3
"; # print "SC4 = $SC4
"; # print "SCtotal = $SCtotal
"; # print "DEFINITIONS = "; # print @definitions; # print "
SUMMARY = "; # print @summary; # print "
"; # print "summary0 = $summary[0]
"; # print "summary1 = $summary[1]
"; # print "summary2 = $summary[2]
"; # print "summary3 = $summary[3]
"; # print "count_price = $count_price
"; # print "count_quantity = $count_quantity
"; # print "sendcheck = $sendcheck
"; # print "show_check = $show_check
"; # print "zero_check = $zero_check

"; # print "num_discount = $num_discount
"; # print "amt_discount = $amt_discount
"; # print "repeats = $repeats
"; # print "discount = $discount
"; # print "sub_discount = $sub_discount

"; # print "includetax = $includetax
"; # print "reversetax = $reversetax
"; # print "unit_tax = $unit_tax
"; # print "show_before = $show_before
"; # print "show_after = $show_after
"; # print "sales_tax = $sales_tax

"; # print "num_handling = $num_handling
"; # print "amt_handling = $amt_handling
"; # print "repeats = $repeats
"; # print "handling = $handling

"; # print "count_ship = $count_ship
"; # print "includecountry = $includecountry
"; # print "shiptype = $shiptype
"; # print "num_shipping = $num_shipping
"; # print "amt_shipping = $amt_shipping
"; # print "min_shipping = $min_shipping
"; # print "max_shipping = $max_shipping
"; # print "rate_shipping = $rate_shipping
"; # print "method = $method
"; # print "shipping = $shipping

"; # print "grand_total = $grand_total
"; # print "

"; # Testing Variables # If all orders zeroed out if ($zero_check == 0) { print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "
 
2."; print "Please select quantities before ordering.
 "; print "You must select at least one of any item on the preceeding page for a valid order. "; print "Use your browser back button to select quantities of the items you want to purchase. "; print "Nothing has been billed or processed at this point.
 
\n"; } else { # ASSIGN vars for permission if ( $sendcheck ) { if ( $check_validate ) { ($approvetype,$approvename,$approvebank) = ("Checking",$FORM{'checkname'},$FORM{'checkbank'}); } else { $noapprove++; } } else { ($approvetype,$approvename) = ($type,$FORM{'cardholder'}); } if ( $cyber_check && !$noapprove ) { print ""; print ""; print ""; print ""; print ""; print "\n"; print ""; print ""; print ""; print ""; print ""; print ""; print "
 
2."; print "Approval and final processing.
 "; print "Your approval is required before this order can be processed. "; print "Check Yes to authorize "; print "$plain_name "; print "to draft the designated account, and then click the "Final Processing" "; print "button. Or use your browser back button to change something in your order. "; print "You can also leave this page at any time to abort your order. "; print "
 
 "; print ""; print ""; print ""; print "
"; print ""; print " Yes, I authorize $plain_name to draft the "; print "$approvetype account -
 "; if ( $approvebank ) { print "At $approvebank for "; } else { print "For "; } print "$approvename in the amount of \$ $grand_total.
"; print "
 
"; print " 
 
\n\n"; } else { print ""; print ""; print ""; print ""; print ""; print "\n"; print ""; print ""; print ""; print "
 
2."; print "Submit this preview for final processing.
 "; print "When you click the "Final Processing" button your order will be processed as "; print "shown in this preview. Use your browser back button if you need to change something in "; print "your order. Nothing will be billed or processed unless you click the button below."; print "

And, thanks for shopping at "; print "$site_name
"; print "
 
"; print " 
 
\n\n"; } } # set up hidden variables if using custom fields if ( $use_fields ) { $N = @custom_names; $K = 1; while ( $K <= $N ) { if ( $FORM{$custom_names[$K-1]} ) { print " \n"; } $K++; } } # set hidden values to final processing print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print "\n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print "\n"; print "\n"; print "\n"; print "\n"; print ""; print ""; print ""; print ""; print "
"; print "Shipping to $FORM{'realname'} in $FORM{'city'}, $FORM{'state'}, $FORM{'country'}
Copyright © "; print "$site_name"; print " All rights reserved. 1999
"; print "
"; print ""; print "Merchant OrderForm v1.4 written and produced by RGA"; print "
"; print "
"; print "\n"; # commify routine sub commify { local $_ = shift; 1 while s/^(-?\d+)(\d{3})/$1,$2/; return $_; } # Merchant OrderForm v1.4 January 1999 # Written by RGA@IO.COM _____ http://www.io.com/~rga/scripts/ordercustom.rdb 100644 25223 144 0 6650253077 12064 0ustar rgauserorderfinal14.cgi 100644 25223 144 145201 7033522345 12131 0ustar rgauser#!/usr/local/bin/perl # ============================= # Merchant OrderForm v1.4 January 1999 # Written by RGA@IO.COM _____ http://www.io.com/~rga/scripts/ # DISCLAIMER______________________________________________________________________________ # By opening and configuring this for your server and application you thereby assume any and all responsibility # for the use and outcomes of this program. Please read the documentation on configurations, so that no surprises # in calculations occur. The math has been carefully checked, but if you do not clearly understand the settings # and how they create different calculations, then you may get undesired results. Test your installation thoroughly. # WEB-WARE______________________________________________________________________________ # Please do not distribute this script, as it is not a free-ware version. Please direct any non registered users # of this script to the author's Web Site listed above for details on how to obtain a registered copy of this script. # INSTALLATION____________________________________________________________________________ # The documentation included in this script package should answer all but some very rare questions regarding # installation, usage, features, and limitations. If you're having a problem getting the script to run, it is very likely # that your situation is discussed in the documentation. Especially, consult the FAQ and CGI installation tips. # Make sure you have the correct name for the CONFIG file here. require 'orderconfig.cgi'; # get input and load orders @orders = (); $Nrecords = 0; read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/<([^>]|\n)*>//g; $value =~ s///g; if ($name eq "order") { $orders[$Nrecords] = $value; $Nrecords ++; } $FORM{$name} = $value; } # reassign parsed input $approved = $FORM{'approved'}; $noapprove = $FORM{'noapprove'}; $approvetype = $FORM{'approvetype'}; $approvename = $FORM{'approvename'}; $approvebank = $FORM{'approvebank'}; $sendcheck = $FORM{'sendcheck'}; $show_check = $FORM{'show_check'}; $includetax = $FORM{'includetax'}; $unit_tax = $FORM{'unit_tax'}; $reversetax = $FORM{'reversetax'}; $sales_tax = $FORM{'sales_tax'}; $show_before = $FORM{'show_before'}; $show_after = $FORM{'show_after'}; $sub_after = $FORM{'sub_after'}; $includecountry = $FORM{'includecountry'}; $discount = $FORM{'discount'}; $show_discount = $FORM{'show_discount'}; $sub_discount = $FORM{'sub_discount'}; $handling = $FORM{'handling'}; $show_handling = $FORM{'show_handling'}; $shiptype = $FORM{'shiptype'}; $shipping = $FORM{'shipping'}; $show_shipping = $FORM{'show_shipping'}; $method = $FORM{'method'}; $grand_total = $FORM{'grand_total'}; $checkname = $FORM{'checkname'}; $checkbank = $FORM{'checkbank'}; $checknumber = $FORM{'checknumber'}; $checkroute = $FORM{'checkroute'}; $checkaccount = $FORM{'checkaccount'}; $cardtype = $FORM{'cardtype'}; $cardnumber = $FORM{'cardnumber'}; $cardyear = $FORM{'cardyear'}; $cardmonth = $FORM{'cardmonth'}; $cardholder = $FORM{'cardholder'}; $realname = $FORM{'realname'}; $address = $FORM{'address'}; $city = $FORM{'city'}; $zip = $FORM{'zip'}; $state = $FORM{'state'}; $country = $FORM{'country'}; $custname = $FORM{'custname'}; $custaddress = $FORM{'custaddress'}; $custcity = $FORM{'custcity'}; $custzip = $FORM{'custzip'}; $custstate = $FORM{'custstate'}; $custcountry = $FORM{'custcountry'}; $mailname = $FORM{'mailname'}; $phone = $FORM{'phone'}; $fax = $FORM{'fax'}; $comments = $FORM{'comments'}; # get the date @months = ('January','February','March','April','May','June','July','August','September','October','November','December'); @days = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); ($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6]; $year += 1900; $date = "$days[$wday], $months[$mon] $mday, $year"; $time = "$hour:$min:$sec"; # FINAL APPROVAL if ( $cyber_check ) { if ( $approved eq "redirect" ) { &redirect; } else { if ( $noapprove || $approved ) { &dofinal; } else { &nofinal; } } } else { &dofinal; } # REDIRECT sub redirect { print "Location: $redirect_url\n\n"; } # NOT APPROVED sub nofinal { print "Content-type: text/html\n\n"; print "APPROVAL FAILED\n"; print ""; print "
"; print "
\n"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "
"; print "$site_name Approval Not Received$date
"; print "$on_attributes$site_address$off_attributes"; print "Ship to:
"; print "$on_attributes$site_city, $site_state   $site_zip$off_attributes"; print "$FORM{'realname'}
"; print "Ph $on_attributes$site_phone$off_attributes"; print "$FORM{'address'}
"; print "Fx $on_attributes$site_fax$off_attributes"; print "$FORM{'city'}, $FORM{'state'}   $FORM{'zip'}
\n\n"; # RESUBMIT print ""; print ""; print ""; print ""; print ""; print "\n"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "
 
"; print "*"; print "Approval required for Final Processing
 "; print "
  • Your authorization is required before this order can be processed.
    "; print "
  • You can return to the previous page with your browser back button."; print "
  • You can also leave this page at any time to abort your order.
"; print "
 
 "; print ""; print ""; print ""; print "
"; print ""; print " YES, I authorize $plain_name to draft the "; print "$approvetype account -
 "; if ( $approvebank ) { print "At $approvebank for "; } else { print "For "; } print "$approvename in the amount of \$ $grand_total.
"; print "
 
 "; print ""; print ""; print "
"; print ""; print " NO, I do not authorize any drafts from my accounts.
"; print " This selection aborts your order and returns to "; print "$redirect_name.\n\n"; print "
"; print "
 
"; print " 
 
\n\n"; # PRINT HIDDEN VARS FOR ORDERS foreach $order (@orders) { ( $quantity, $item, $description, $price, $ship ) = split(/----/, $order); print "\n"; } # PRINT HIDDEN VARS FOR CUSTOM FIELDS if ( $use_fields ) { $N = @custom_names; $K = 1; while ( $K <= $N ) { if ( $FORM{$custom_names[$K-1]} ) { print " \n"; } $K++; } } # PRINT HIDDEN VARIABLES = 50 print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print "\n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print "\n"; print "\n"; print "\n"; print "\n"; # PAGE BOTTOM print ""; print ""; print "
"; print "$FORM{'realname'} $FORM{'phone'}
"; print "$FORM{'address'} | $FORM{'city'}, $FORM{'state'} $FORM{'zip'} "; print "| $FORM{'country'}
Copyright © "; print "$site_name"; print " All rights reserved. 1999
"; print "
"; print ""; print "Merchant OrderForm v1.4 written and produced by RGA"; print "
"; print ""; print "
"; print "\n"; } # End NOT APPROVED # APPROVED FINAL PROCESSING sub dofinal { $PCtax = ( $unit_tax * 100 ); # INVOICE NUMBER unless (open (NUMBER, "$number_path")) { print "Content-type: text/html\n\n"; print "File Processing Error !"; print ""; print "
"; print ""; print " "; print ""; print ""; print ""; print ""; print ""; print "
"; print ""; print "$site_name "; print "file processing error !
"; print "There has been an essential file error attempting to open an invoice data file on the server."; print "
  • $number_path
 
"; print "No billing information has been processed at this point.
 
$date
Please notify $plain_name of this error $myemail
"; print ""; die } $num = ; close (NUMBER); $num++; # reset invoice number unless (open (NUMBER, ">$number_path")) { print "Content-type: text/html\n\n"; print "File Processing Error !"; print ""; print "
"; print ""; print " "; print ""; print ""; print ""; print ""; print ""; print "
"; print ""; print "$site_name "; print "file processing error !
"; print "There has been an essential file error attempting to open an invoice data file on the server."; print "
  • $number_path
 
"; print "No billing information has been processed at this point.
 
$date
Please notify $plain_name of this error $myemail
"; print ""; die } if ( $lock ) { flock (NUMBER, 2); } print NUMBER "$num"; if ( $lock ) { flock (NUMBER, 8); } close (NUMBER); # return the FINAL INVOICE print "Content-type: text/html\n\n"; print "$plain_name Invoice $num for $FORM{'realname'}\n"; print ""; print "
"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "
"; print "$site_name Invoice \# $num$date
"; print "$on_attributes$site_address$off_attributes"; print "Ship to:
"; print "$on_attributes$site_city, $site_state   $site_zip$off_attributes"; print "$FORM{'realname'}
"; print "Ph $on_attributes$site_phone$off_attributes"; print "$FORM{'address'}
"; print "Fx $on_attributes$site_fax$off_attributes"; print "$FORM{'city'}, $FORM{'state'}   $FORM{'zip'}
"; print ""; print ""; if ( $sendcheck ) { if ( $check_validate ) { print ""; print ""; print ""; } else { print ""; print ""; } } else { print ""; print ""; print ""; } print "
 
"; print "Print this invoice from your computer for your records.
"; print "The $FORM{'checkbank'} account for $FORM{'checkname'} "; print "will be billed for this order.
 
"; print "Please print and mail this invoice with your Check"; print " or Money Order.
 
"; print "Print this invoice from your computer for your records.
"; if ($FORM{'cardtype'} eq "visa") {$type = "Visa Card";} if ($FORM{'cardtype'} eq "mastercard") {$type = "Master Card";} if ($FORM{'cardtype'} eq "amex") {$type = "American Express Card";} if ($FORM{'cardtype'} eq "novus") {$type = "Discover Card";} print "The $type account for "; print "$FORM{'cardholder'} will be billed for this order.
 
"; # Format the items in the array into a table of items ordered print " \n"; print ""; print ""; print ""; print ""; print ""; print "\n\n"; # PUT ORDERS IN TABLE ROWS foreach $order (@orders) { ( $quantity, $item, $description, $price, $ship ) = split(/----/, $order); # print orders in display tables print ""; print " \n"; print " \n"; print " \n"; # subtotal applies if ( $quantity > 1 ) { print " \n"; } else { print " \n"; } print ""; # sub total quantities greater than 1 if ( $quantity > 1 ) { $sub_price = ( $quantity * $price ); $sub_price = sprintf "%.2f", $sub_price; $sub_price = commify( $sub_price ); print ""; print ""; print " \n"; print " \n"; print ""; $price = ( $quantity * $price ); } # Keep cummulative totals $count_price += $price; $count_quantity += $quantity; $zero_check += $quantity; } print "
QtyItem NameDescriptionPrice
$quantity$item $description  \$ $price
 "; print "Sub Total \($quantity\) of $item at \$ $price each\$ $sub_price
\n\n"; # format quantity / price totals $count_price = sprintf "%.2f", $count_price; $count_price = commify($count_price); $count_quantity = commify($count_quantity); # PRINT TOTALS print " \n"; # totals for products print ""; print "\n"; # print discount amount if ( $show_discount ) { print ""; print "\n"; print ""; print "\n"; } # display tax before if ( $show_before ) { print "\n"; } # print handling amount if ( $show_handling ) { print ""; print "\n"; } # print shipping charges if ( $show_shipping ) { print ""; print "\n"; } # display tax after if ( $show_after ) { if ( $show_handling && $show_shipping ) { print ""; print "\n"; print "\n"; } elsif ( $show_handling && !$show_shipping ) { print ""; print "\n"; print "\n"; } elsif ( !$show_handling && $show_shipping ) { print ""; print "\n"; print "\n"; } elsif ( !$show_handling && !$show_shipping ) { if ( $show_discount ) { print "\n"; } else { print "\n"; } } } # print adjusted total, final amount, paying by card / check if ( $sendcheck ) { if ( $check_validate ) { print ""; print "\n"; } else { print ""; print "\n"; } } else { print ""; print "\n"; } print "
"; print "Total price for $count_quantity Products ordered ---->\$ $count_price
"; print "A Discount is being applied to your purchases ---->\$ -$discount
"; print "Adjusted Sub Total after discount applied ---->\$ $sub_discount
"; print "$PCtax\% Sales Tax applies to this purchase ---->"; print "\$ $sales_tax
"; print "A Handling fee is being applied to this invoice ---->\$ $handling
"; print "$method shipping charges for this invoice ---->\$ $shipping
"; print "Adjusted Sub Total with shipping & handling ---->\$ $sub_after
"; print "$PCtax\% Sales Tax applied to Sub Total with S&H ---->"; print "\$ $sales_tax
"; print "Adjusted Sub Total with handling charges ---->\$ $sub_after
"; print "$PCtax\% Sales Tax applied to Sub Total with handling ---->"; print "\$ $sales_tax
"; print "Adjusted Sub Total with shipping charges ---->\$ $sub_after
"; print "$PCtax\% Sales Tax applied to Sub Total with shipping ---->"; print "\$ $sales_tax
"; print "$PCtax\% Sales Tax applied to Sub Total ---->"; print "\$ $sales_tax
"; print "$PCtax\% Sales Tax applied to Purchase Total ---->"; print "\$ $sales_tax
"; print "Total Amount to be paid by "; print "$FORM{'checkbank'} check---->\$ $grand_total
"; print "Total Amount to be paid by check or money order ---->\$ $grand_total
"; print "Total Amount to be paid by $type ---->\$ $grand_total
\n"; # PAGE BOTTOM print ""; print ""; if ( $sendcheck ) { if ( $check_validate ) { print ""; } else { print ""; } } else { print ""; } print ""; print ""; print "
 
"; print "Your order has been processed. The order amount will be billed through Online Checking "; print "for $FORM{'checkname'} with $FORM{'checkbank'}. If you have questions you can write us at the "; print "$plain_name "; print "address listed above, or you can email us at $myemail. "; print "

And, thanks for shopping at "; print "$site_name
"; print "Your order has been processed. Please mail your check or money order to the "; print "$plain_name "; print "address listed above. If you have questions you can email us at "; print "$myemail. "; print "

And, thanks for shopping at "; print "$site_name
"; print "Your order has been processed. The order amount will be billed to "; print "the $type account for $FORM{'cardholder'}. If you have questions you can write us at the "; print "$plain_name "; print "address listed above, or you can email us at $myemail. "; print "

And, thanks for shopping at "; print "$site_name
 
"; print "$FORM{'realname'} $num-$FORM{'phone'}
"; print "$FORM{'address'} | $FORM{'city'}, $FORM{'state'} $FORM{'zip'} "; print "| $FORM{'country'}
Copyright © "; print "$site_name"; print " All rights reserved. 1999
"; print "
"; print ""; print "Merchant OrderForm v1.4 written and produced by RGA"; print "
"; print "
"; print "\n"; # LOG FILE if ( $log_file ) { unless (open (LOGFILE, ">>$logfile_path")) { print "Content-type: text/html\n\n"; print "File Processing Error !"; print ""; print "
"; print ""; print ""; print "
 
"; print "Note: Logfile processing error.
"; print ""; print "There has been a file error attempting to open the log file on the server.
"; print "$logfile_path
"; print ""; print "Please notify $plain_name $myemail "; print " of this error.
\n"; die } if ( $lock ) { flock (LOGFILE, 2); } ($mday,$mon,$year) = (localtime(time))[3,4,5]; $mon+=1; # printing to Log File print LOGFILE "INVOICE ================================== $num-$phone\n"; print LOGFILE " Invoice Number: $num\n"; print LOGFILE " Unique Invoice Number: $num-$phone\n"; print LOGFILE " Date Time: $date | $time\n"; if ( $sendcheck ) { if ( $check_validate || $show_check ) { if ( $check_validate ) { print LOGFILE " Payment Type: Online Checking\n"; } else { print LOGFILE " Payment Type: Sending Check or Money Order\n"; } if ( $FORM{'checkname'} ) { print LOGFILE " Account Name: $checkname\n"; } if ( $FORM{'checkbank'} ) { print LOGFILE " Account Bank: $checkbank\n"; } if ( $FORM{'checknumber'} ) { print LOGFILE " Check Number: $checknumber\n"; } if ( $FORM{'checkroute'} ) { print LOGFILE " Bank Routing Number: $checkroute\n"; } if ( $FORM{'checkaccount'} ) { print LOGFILE " Account Number: $checkaccount\n"; } } else { print LOGFILE " Payment Type: Sending Check or Money Order\n"; } } else { print LOGFILE " Payment Type: $type\n"; print LOGFILE " Card Holder: $cardholder\n"; print LOGFILE " Card Number: $cardnumber\n"; print LOGFILE " Expiration Date: $cardmonth/$cardyear\n"; } print LOGFILE " Products Ordered: $count_quantity\n"; print LOGFILE " Products Total: \$ $count_price\n"; if ( $show_discount ) { print LOGFILE " Discount Applied: \$ - $discount\n"; print LOGFILE " SubTotal After Discount: \$ $sub_discount\n"; } if ( $show_before ) { print LOGFILE " $PCtax\% Sales Tax: \$ $sales_tax\n"; } if ( $show_handling ) { print LOGFILE " Handling Charges: \$ $handling\n"; } if ( $show_shipping ) { print LOGFILE " Shipping Charges: \$ $shipping\n"; } if ( $show_after ) { print LOGFILE " $PCtax\% Sales Tax: \$ $sales_tax\n"; } print LOGFILE " Total Invoice Amount: \$ $grand_total\n"; if ( $method ) { print LOGFILE " Shipping Method: $method\n\n"; } else { if ( $use_standard ) { print LOGFILE " Shipping Method: Standard\n\n"; } elsif ( $use_express ) { print LOGFILE " Shipping Method: Express\n\n"; } else { print LOGFILE " Shipping Method: Default\n\n"; } } print LOGFILE " Ship To _________________________________________\n"; print LOGFILE " $realname\n"; print LOGFILE " $address\n"; print LOGFILE " $city, $state, $zip, $country\n\n"; print LOGFILE " Contact _________________________________________\n"; if ( $custname ) { print LOGFILE " $custname\n"; } if ( $custaddress ) { print LOGFILE " $custaddress\n"; } if ( $custcity || $custstate || $custzip || $custcountry ) { print LOGFILE " "; if ( $custcity ) { print LOGFILE "$custcity, "; } if ( $custstate ) { print LOGFILE "$custstate "; } if ( $custzip ) { print LOGFILE "$custzip "; } if ( $custcountry ) { print LOGFILE "$custcountry "; } print LOGFILE "\n"; } if ( $mailname ) { print LOGFILE " Email: $mailname\n"; } if ( $fax ) { print LOGFILE " Fax: $fax\n"; } print LOGFILE " Phone: $phone\n\n"; print LOGFILE "Quantity ========== Product ========== Price \n"; foreach $order ( @orders ) { ( $quantity, $item, $description, $price, $ship ) = split(/----/, $order); if ( $quantity > 1 ) { $sub_price = ( $quantity * $price ); $sub_price = sprintf "%.2f", $sub_price; $sub_price = commify( $sub_price ); print LOGFILE " [ $quantity ] $item [ $sub_price ]\n"; } else { print LOGFILE " [ $quantity ] $item [ $price ]\n"; } } print LOGFILE "\n"; if ( $comments ) { print LOGFILE "Special instructions or information:\n$comments\n\n"; } # custom fields logging if ( $use_fields ) { $N = @custom_names; $K = 1; print LOGFILE "$title_fields:\n"; while ( $K <= $N ) { if ( $FORM{$custom_names[$K-1]} ) { print LOGFILE "$custom_titles[$K-1]: $FORM{$custom_names[$K-1]}\n"; } $K++; } print LOGFILE "\n"; } if ( $lock ) { flock (LOGFILE, 8); } close(LOGFILE); } # MERCHANT EMAIL if ( $merchantmail ) { ($mday,$mon,$year) = (localtime(time))[3,4,5]; $mon+=1; open (MYMAIL, "|$mailprog -t") || die "Can't open $mailprog!\n"; print MYMAIL "To: $myemail\n"; if ( $mailname ) { print MYMAIL "From: $mailname\n"; } print MYMAIL "Subject: $plain_name Invoice # $num\n\n"; print MYMAIL "$plain_name Invoice # $num-$phone\n"; print MYMAIL "$date\n\n"; print MYMAIL " * Invoice Number: $num\n"; print MYMAIL " * Unique Invoice Number: $num-$phone\n"; print MYMAIL " * Date Time: $mon-$mday-$year | $time\n"; if ( $sendcheck ) { if ( $check_validate || $show_check ) { if ( $check_validate ) { print MYMAIL " * Payment Type: Online Checking\n"; } else { print MYMAIL " * Payment Type: Sending Check or Money Order\n"; } if ( $FORM{'checkname'} ) { print MYMAIL " * Account Name: $checkname\n"; } if ( $FORM{'checkbank'} ) { print MYMAIL " * Account Bank: $checkbank\n"; } if ( $FORM{'checknumber'} ) { print MYMAIL " * Check Number: $checknumber\n"; } if ( $mail_info ) { if ( $FORM{'checkroute'} ) { print MYMAIL " * Bank Routing Number: $checkroute\n"; } if ( $FORM{'checkaccount'} ) { print MYMAIL " * Account Number: $checkaccount\n"; } } } else { print MYMAIL " * Payment Type: Sending Check or Money Order\n"; } } else { print MYMAIL " * Payment Type: $type\n"; print MYMAIL " * Card Holder: $cardholder\n"; if ( $mail_info ) { print MYMAIL " * Card Number: $cardnumber\n"; print MYMAIL " * Expiration Date: $cardmonth/$cardyear\n"; } } print MYMAIL " * Products Ordered: $count_quantity\n"; print MYMAIL " * Products Total: \$ $count_price\n"; if ( $show_discount ) { print MYMAIL " * Discount Applied: \$ - $discount\n"; print MYMAIL " * SubTotal After Discount: \$ $sub_discount\n"; } if ( $show_before ) { print MYMAIL " * $PCtax\% Sales Tax: \$ $sales_tax\n"; } if ( $show_handling ) { print MYMAIL " * Handling Charges: \$ $handling\n"; } if ( $show_shipping ) { print MYMAIL " * Shipping Charges: \$ $shipping\n"; } if ( $show_after ) { print MYMAIL " * $PCtax\% Sales Tax: \$ $sales_tax\n"; } print MYMAIL " * Total Invoice Amount: \$ $grand_total\n"; if ( $method ) { print MYMAIL " * Shipping Method: $method\n\n"; } else { if ( $use_standard ) { print MYMAIL " * Shipping Method: Standard\n\n"; } elsif ( $use_express ) { print MYMAIL " * Shipping Method: Express\n\n"; } else { print MYMAIL " * Shipping Method: Default\n\n"; } } print MYMAIL " * Ship To:\n"; print MYMAIL " * $realname\n"; print MYMAIL " * $address\n"; print MYMAIL " * $city, $state, $zip, $country\n\n"; print MYMAIL " * Contact Information:\n"; if ( $custname ) { print MYMAIL " * $custname\n"; } if ( $custaddress ) { print MYMAIL " * $custaddress\n"; } if ( $custcity || $custstate || $custzip || $custcountry ) { print MYMAIL " * "; if ( $custcity ) { print MYMAIL "$custcity, "; } if ( $custstate ) { print MYMAIL "$custstate "; } if ( $custzip ) { print MYMAIL "$custzip "; } if ( $custcountry ) { print MYMAIL "$custcountry "; } print MYMAIL "\n"; } if ( $mailname ) { print MYMAIL " * Email: $mailname\n"; } if ( $fax ) { print MYMAIL " * Fax: $fax\n"; } print MYMAIL " * Phone: $phone\n\n"; print MYMAIL " ** Products Ordered:\n"; foreach $order ( @orders ) { ( $quantity, $item, $description, $price, $ship ) = split(/----/, $order); if ( $quantity > 1 ) { $sub_price = ( $quantity * $price ); $sub_price = sprintf "%.2f", $sub_price; $sub_price = commify( $sub_price ); print MYMAIL " ** [ $quantity ] $item [ $sub_price ]\n"; } else { print MYMAIL " ** [ $quantity ] $item [ $price ]\n"; } } print MYMAIL "\n"; if ( $comments ) { print MYMAIL "Special Instructions:\n$comments\n\n"; } # custom fields if ( $use_fields ) { $N = @custom_names; $K = 1; print MYMAIL "$title_fields:\n"; while ( $K <= $N ) { if ( $FORM{$custom_names[$K-1]} ) { print MYMAIL " * $custom_titles[$K-1]: $FORM{$custom_names[$K-1]}\n"; } $K++; } print MYMAIL "\n"; } print MYMAIL "\n"; close (MYMAIL); } # CUSTOMER EMAIL if ( $customermail && $mailname ) { ($mday,$mon,$year) = (localtime(time))[3,4,5]; $mon+=1; open (MAIL, "|$mailprog -t") || die "Can't open $mailprog!\n"; print MAIL "To: $mailname\n"; print MAIL "From: $myemail\n"; print MAIL "Subject: $plain_name Order\n"; print MAIL "$date.\n"; print MAIL "Your $plain_name Order is on the Way !\n\n"; if ( $cardholder ) { print MAIL "Thank You $cardholder for your $plain_name order.\n\n"; } elsif ( $checkname ) { print MAIL "Thank You $checkname for your $plain_name order.\n\n"; } else { print MAIL "Thank You $realname for your $plain_name order.\n\n"; } print MAIL "If you have questions about your order, \n"; print MAIL "You can email $plain_name at $myemail.\n"; print MAIL "Or you can drop by the $plain_name Web Site at:\n\n"; print MAIL " * $site_location\n\n"; print MAIL "Thanks again, for your interest in our quality products.\n\n"; print MAIL "Your Order Information _______________\n"; print MAIL " * Invoice Number: $num\n"; print MAIL " * Unique ID Number: $num-$phone\n"; print MAIL " * Date Time: $mon-$mday-$year | $time\n"; if ( $sendcheck ) { if ( $check_validate || $show_check ) { if ( $check_validate ) { print MAIL " * Payment Type: Online Checking\n"; } else { print MAIL " * Payment Type: Sending Check or Money Order\n"; } if ( $FORM{'checkname'} ) { print MAIL " * Account Name: $checkname\n"; } if ( $FORM{'checkbank'} ) { print MAIL " * Account Bank: $checkbank\n"; } if ( $FORM{'checknumber'} ) { print MAIL " * Check Number: $checknumber\n"; } } else { print MAIL " * Payment Type: Sending Check or Money Order\n"; } } else { print MAIL " * Payment Type: $type\n"; print MAIL " * Card Holder: $cardholder\n"; } print MAIL " * Products Ordered: $count_quantity\n"; print MAIL " * Products Total: \$ $count_price\n"; if ( $show_discount ) { print MAIL " * Discount Applied: \$ - $discount\n"; print MAIL " * SubTotal After Discount: \$ $sub_discount\n"; } if ( $show_before ) { print MAIL " * $PCtax\% Sales Tax: \$ $sales_tax\n"; } if ( $show_handling ) { print MAIL " * Handling Charges: \$ $handling\n"; } if ( $show_shipping ) { print MAIL " * Shipping Charges: \$ $shipping\n"; } if ( $show_after ) { print MAIL " * $PCtax\% Sales Tax: \$ $sales_tax\n"; } print MAIL " * Total Invoice Amount: \$ $grand_total\n"; if ( $method ) { print MAIL " * Shipping Method: $method\n\n"; } else { if ( $use_standard ) { print MAIL " * Shipping Method: Standard\n\n"; } elsif ( $use_express ) { print MAIL " * Shipping Method: Express\n\n"; } else { print MAIL " * Shipping Method: Default\n\n"; } } print MAIL " * Shipping To:\n"; print MAIL " * $realname\n"; print MAIL " * $address\n"; print MAIL " * $city, $state, $zip, $country\n\n"; print MAIL " * Your Contact Information:\n"; if ( $custname ) { print MAIL " * $custname\n"; } if ( $custaddress ) { print MAIL " * $custaddress\n"; } if ( $custcity || $custstate || $custzip || $custcountry ) { print MAIL " * "; if ( $custcity ) { print MAIL "$custcity, "; } if ( $custstate ) { print MAIL "$custstate "; } if ( $custzip ) { print MAIL "$custzip "; } if ( $custcountry ) { print MAIL "$custcountry "; } print MAIL "\n"; } if ( $fax ) { print MAIL " * Fax: $fax\n"; } print MAIL " * Phone: $phone\n\n"; print MAIL " ** Products Ordered:\n"; foreach $order ( @orders ) { ( $quantity, $item, $description, $price, $ship ) = split(/----/, $order); if ( $quantity > 1 ) { $sub_price = ( $quantity * $price ); $sub_price = sprintf "%.2f", $sub_price; $sub_price = commify( $sub_price ); print MAIL " ** [ $quantity ] $item [ $sub_price ]\n"; } else { print MAIL " ** [ $quantity ] $item [ $price ]\n"; } } print MAIL "\n"; if ( $comments ) { print MAIL "Special Instructions:\n$comments\n\n"; } # custom fields if ( $use_fields ) { $N = @custom_names; $K = 1; print MAIL "$title_fields:\n"; while ( $K <= $N ) { if ( $FORM{$custom_names[$K-1]} ) { if ( $customer_fields[$K-1] ) { print MAIL " * $custom_titles[$K-1]: $FORM{$custom_names[$K-1]}\n"; } } $K++; } print MAIL "\n"; } print MAIL "\n"; print MAIL "$plain_name\n"; print MAIL "$site_location\n"; print MAIL "$myemail\n\n"; close (MAIL); } # RDB FILE LOGGING if ( $rdb_file ) { # delete formatting from numbers $count_quantity =~ tr/,//d; $count_price =~ tr/,//d; $discount =~ tr/,//d; $sub_discount =~ tr/,//d; $sales_tax =~ tr/,//d; $handling =~ tr/,//d; $shipping =~ tr/,//d; $grand_total =~ tr/,//d; unless (open (MAIN, ">>$rdb_main")) { print "Content-type: text/html\n\n"; print "File Processing Error !"; print ""; print "
"; print ""; print ""; print "
 
"; print "Note: RDBMS file processing error.
"; print ""; print "There has been a file error attempting to open the RDBMS file on the server.
"; print "$rdb_main
"; print ""; print "Please notify $plain_name $myemail "; print " of this error.
\n"; die } if ( $lock ) { flock (MAIN, 2); } unless (open (ORDERS, ">>$rdb_orders")) { print "Content-type: text/html\n\n"; print "File Processing Error !"; print ""; print "
"; print ""; print ""; print "
 
"; print "Note: RDBMS file processing error.
"; print ""; print "There has been a file error attempting to open the RDBMS file on the server.
"; print "$rdb_orders
"; print ""; print "Please notify $plain_name $myemail "; print " of this error.
\n"; die } if ( $lock ) { flock (ORDERS, 2); } if ( $use_fields ) { unless (open (CUSTOM, ">>$rdb_custom")) { print "Content-type: text/html\n\n"; print "File Processing Error !"; print ""; print "
"; print ""; print ""; print "
 
"; print "Note: RDBMS file processing error.
"; print ""; print "There has been a file error attempting to open the RDBMS file on the server.
"; print "$rdb_custom
"; print ""; print "Please notify $plain_name $myemail "; print " of this error.
\n"; die } } if ( $use_fields ) { if ( $lock ) { flock (CUSTOM, 2); } } ($mday,$mon,$year) = (localtime(time))[3,4,5]; $mon+=1; print MAIN "$num$delimit$num-$phone$delimit$mon-$mday-$year$delimit$time$delimit"; if ( $sendcheck ) { if ( $check_validate ) { print MAIN "Online Checking$delimit"; } else { print MAIN "Check-Money Order$delimit"; } } else { print MAIN "$type$delimit"; } print MAIN "$checkname$delimit$checkbank$delimit$checknumber$delimit$checkroute$delimit$checkaccount$delimit"; print MAIN "$cardholder$delimit$cardnumber$delimit$cardmonth-$cardyear$delimit"; print MAIN "$count_quantity$delimit$count_price$delimit$discount$delimit$sub_discount$delimit$sales_tax$delimit"; print MAIN "$handling$delimit$shipping$delimit$grand_total$delimit"; if ( $method ) { print MAIN "$method$delimit"; } else { if ( $use_standard ) { print MAIN "Standard$delimit"; } elsif ( $use_express ) { print MAIN "Express$delimit"; } else { print MAIN "Default$delimit"; } } print MAIN "$realname$delimit$address$delimit$city$delimit$state$delimit$zip$delimit$country$delimit"; print MAIN "$custname$delimit$custaddress$delimit$custcity$delimit$custstate$delimit$custzip$delimit$custcountry$delimit"; print MAIN "$mailname$delimit$fax$delimit$phone"; print MAIN "\n"; foreach $order ( @orders ) { ( $quantity, $item, $description, $price, $ship ) = split(/----/, $order); print ORDERS "$num$delimit$num-$phone$delimit$quantity$delimit$item$delimit$description$delimit$price$delimit$ship\n"; } # custom fields if ( $use_fields ) { $N = @custom_names; $K = 1; print CUSTOM "$num$delimit$num-$phone$delimit"; while ( $K <= $N ) { print CUSTOM "$FORM{$custom_names[$K-1]}"; if ( $K < $N ) { print CUSTOM "$delimit"; } if ( $K == $N ) { print CUSTOM "\n"; } $K++; } } if ( $lock ) { flock (MAIN, 8); } close(MAIN); if ( $lock ) { flock (ORDERS, 8); } close(ORDERS); if ( $use_fields ) { if ( $lock ) { flock (CUSTOM, 8); } close(CUSTOM); } } } # End APPROVED FINAL PROCESSING # commify routine sub commify { local $_ = shift; 1 while s/^(-?\d+)(\d{3})/$1,$2/; return $_; } # Merchant OrderForm v1.4 January 1999 # Written by RGA@IO.COM _____ http://www.io.com/~rga/scripts/ orderform14.cgi 100644 25223 144 115326 6650253067 12016 0ustar rgauser#!/usr/local/bin/perl # ============================= # Merchant OrderForm v1.4 January 1999 # Written by RGA@IO.COM _____ http://www.io.com/~rga/scripts/ # DISCLAIMER______________________________________________________________________________ # By opening and configuring this for your server and application you thereby assume any and all responsibility # for the use and outcomes of this program. Please read the documentation on configurations, so that no surprises # in calculations occur. The math has been carefully checked, but if you do not clearly understand the settings # and how they create different calculations, then you may get undesired results. Test your installation thoroughly. # WEB-WARE______________________________________________________________________________ # Please do not distribute this script, as it is not a free-ware version. Please direct any non registered users # of this script to the author's Web Site listed above for details on how to obtain a registered copy of this script. # INSTALLATION____________________________________________________________________________ # The documentation included in this script package should answer all but some very rare questions regarding # installation, usage, features, and limitations. If you're having a problem getting the script to run, it is very likely # that your situation is discussed in the documentation. Especially, consult the FAQ and CGI installation tips. # Credit card verification sub routine written by CC-Verify script for Visa, MasterCard, Amex and Novus Cards # Written 29 June 1996 by Spider (spider@servtech.com) http://w3works.com. # Make sure you have the correct name for the CONFIG file here. require 'orderconfig.cgi'; # Get Input - load orders @orders = (); $Nrecords = 0; read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/<([^>]|\n)*>//g; $value =~ s///g; if ($name eq "sendcheck" && $value eq "yes") { $CKsendcheck++ } if ($name eq "order") { $orders[$Nrecords] = $value; $Nrecords++; } $FORM{$name} = $value; } # assign variables $state = $FORM{'state'}; if ( $show_check ) { $show_check = 0; if ( $FORM{'checkname'} ) { $show_check++ } if ( $FORM{'checkbank'} ) { $show_check++ } if ( $FORM{'checknumber'} ) { $show_check++ } if ( $FORM{'checkroute'} ) { $show_check++ } if ( $FORM{'checkaccount'} ) { $show_check++ } } # Get the Date @months = ('January','February','March','April','May','June','July','August','September','October','November','December'); @days = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); ($mday,$mon,$year,$wday) = (localtime(time))[3,4,5,6]; $year += 1900; $date = "$days[$wday], $months[$mon] $mday, $year"; # match country for domestic / foreigh shipping configs if ( $match_country eq $FORM{'country'} ) { $includecountry++ } # CONFIGURE TAX if ( $use_tax ) { # find state - set rate for all or state while ( ( $sub, $val ) = each ( %taxrates ) ) { if ( $sub eq $state ) { ( $Rn, $unit_tax ) = ( 1, $val ) } } if ( $all_tax ) { $includetax++; unless ( $Rn ) { $unit_tax = $all_rate } } elsif ( $Rn ) { $includetax++; } # find exceptions to before / after rule if ( @exceptions ) { foreach $except ( @exceptions ) { if ( $except eq $state ) { $reversetax++ } } } } # VALIDATION RULES FOR FORM INPUT # Note: when validation patterns change here they need to change in no sale subroutine also unless ( length ( $FORM{'realname'} ) > 2 ) { $CK++ } unless ( length ( $FORM{'address'} ) > 6 ) { $CK++ } unless ( length ( $FORM{'city'} ) > 2 ) { $CK++ } unless ( length ( $FORM{'state'} ) > 1 ) { $CK++ } unless ( length ( $FORM{'country'} ) > 1 ) { $CK++ } unless ( length ( $FORM{'zip'} ) > 4 ) { $CK++ } unless ( length ( $FORM{'phone'} ) > 6 ) { $CK++ } # validation rules for on line checking information if ( $check_validate && $CKsendcheck ) { unless ( length ( $FORM{'checkname'} ) > 2 ) { $CK++ } unless ( length ( $FORM{'checkbank'} ) > 2 ) { $CK++ } unless ( length ( $FORM{'checknumber'} ) > 2 ) { $CK++ } unless ( (length ( $FORM{'checkroute'} ) == 8 ) || (length ( $FORM{'checkroute'} ) == 9 ) ) { $CK++ } unless ( length ( $FORM{'checkaccount'} ) > 3 ) { $CK++ } } # validate check or credit card unless ($FORM{'sendcheck'}) { unless ( length ( $FORM{'cardholder'} ) > 2 ) { $CKholder++ } # return a good (1) or bad (0) card verification $CKcard = &check_card; } # Determine incomplete input subroutine applicable if ( !$Nrecords || $CK ) { &return_nosale; } elsif ($CKsendcheck && $FORM{'cardnumber'} || $CKsendcheck && $FORM{'cardholder'} ) { &return_nosale; } elsif (!$CKsendcheck && !$FORM{'cardnumber'} || !$CKsendcheck && !$FORM{'cardholder'}) { &return_nosale; } elsif (!$CKsendcheck && $CKcard == 0 || !$CKsendcheck && $CKholder) { &return_nosale; } else { &return_order } # Return the SELECT QUANTITIES page sub return_order { print "Content-type: text/html\n\n"; print "$FORM{'realname'} Select Quantities - Verify Information\n"; print ""; print "
"; print "
\n"; print ""; print ""; # DISPLAY TABLE OF PRODUCTS SELECTED $nextnum++; print ""; print ""; print ""; print " "; print ""; print ""; print ""; print ""; print ""; print "
"; print "$site_name "; print "Selected items and ordering information.
 
$nextnum."; print "Select the quantity for each item.
  "; print "Make any changes to quantities in the box(s) below, and "; print "then review the other ordering information you submitted. "; print "Use your browser back button to make any needed changes to this page. When "; print "this page is accurate click on the "Preview Invoice" button below to "; print "show a preview of your order with total cost.
 
$date
"; if ($Nrecords == 1) { print "$FORM{'realname'} has selected 1 item for ordering"; } else { print "$FORM{'realname'} has selected $Nrecords items for ordering."; } print "
 
"; # Format the items in the array into a table of items ordered print " \n"; print ""; print ""; print ""; print ""; print ""; print "\n\n"; # populate orders in table / store hidden input foreach $order (@orders) { ($item, $description, $price, $ship) = split (/----/,$order); ++$increment; print "\n\n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print ""; } print "
QtyItem NameDescriptionPrice each
\n"; print "$item $description \$ $price
\n\n"; print " \n"; print ""; print ""; print ""; print "
 
"; print "Shipping and Billing Information
 
"; print " \n"; # DISPLAY PAYMENT INFORMATION $nextnum++; print ""; print ""; if ($CKsendcheck) { if ( $check_validate || $show_check ) { print ""; print "\n"; } else { print ""; print "\n"; } } else { if ($FORM{'cardtype'} eq "visa") {$type = "Visa Card";} if ($FORM{'cardtype'} eq "mastercard") {$type = "Master Card";} if ($FORM{'cardtype'} eq "amex") {$type = "American Express Card";} if ($FORM{'cardtype'} eq "novus") {$type = "Discover Card";} print ""; print ""; print ""; print ""; print ""; print "\n"; print ""; print "\n"; print ""; print "\n"; print ""; print "\n"; # DISPLAY TAX AND SHIPPING DETAILS if ( $includetax || $use_ship && $use_country && !$includecountry ) { $nextnum++; print ""; print ""; print ""; print ""; print "\n"; } # DISPLAY SHIPPING METHOD SELECTION if ( $use_ship && $use_rates ) { $nextnum++; print ""; print ""; print ""; print ""; print "\n"; } # DISPLAY OTHER CUSTOMER INFORMATION $nextnum++; print ""; print ""; print ""; if ( $FORM{'custname'} ) { print ""; print "\n"; } if ( $FORM{'custaddress'} ) { print ""; print "\n"; } if ( $FORM{'custcity'} || $FORM{'custstate'} || $FORM{'custzip'} ) { print ""; print "\n"; } if ( $FORM{'custcountry'} ) { print ""; print "\n"; } print ""; print "\n"; if ($FORM{'fax'}) { print ""; print "\n"; } print ""; print "\n"; print ""; # DISPLAY COMMENTS SECTION if ($FORM{'comments'}) { $nextnum++; print ""; print ""; print ""; print "\n"; print ""; } # DISPLAY CUSTOM FIELDS if ( $use_fields ) { $nextnum++; print ""; print ""; print ""; print "\n"; print ""; } # DISPLAY CONTINUE INSTRUCTIONS $nextnum++; print ""; print ""; print ""; print "\n"; print ""; print ""; print ""; print "
$nextnum."; print "Verify payment method.
 "; if ( $check_validate ) { print "Using Checking account "; print "for $FORM{'checkname'}
"; } else { if ( $FORM{'checkname'} ) { print "Payment by check or money order "; print "for $FORM{'checkname'}
"; } else { print "You have selected payment by check or money order.
"; } } if ( $FORM{'checkbank'} ) { print "Bank Name: $FORM{'checkbank'}
"; } if ( $FORM{'checknumber'} ) { print "Check Number: $FORM{'checknumber'}
"; } if ( $FORM{'checkroute'} ) { print "Bank Routing Number: $FORM{'checkroute'}
"; } if ( $FORM{'checkaccount'} ) { print "Checking Account Number: $FORM{'checkaccount'}"; } print "
 "; print "You have selected payment by check or money order.
 "; print "Using $type account "; print "for $FORM{'cardholder'}
"; print "Number: $FORM{'cardnumber'}
Expiration Date: $FORM{'cardmonth'}\-$FORM{'cardyear'}"; } # DISPLAY SHIPPING DESTINATION $nextnum++; print "
 
$nextnum."; print "Verify shipping destination.
 "; print "$FORM{'realname'}
 "; print "$FORM{'address'}
 "; print "$FORM{'city'}, $FORM{'state'}   $FORM{'zip'}
 "; print "$FORM{'country'}
 
$nextnum."; print "Shipping destination details.
 "; if ( $includetax ) { $PCTax = ( $unit_tax * 100 ); print "A $PCTax\% Sales Tax will be applied for this destination.
"; } if ( $use_ship && $use_country && !$includecountry ) { print "A Foreign Shipping Charge will be applied for this destination"; } print "
 
$nextnum."; print "Please select shipping method.
 "; print "$msg_standard
"; print "$msg_express"; print "
 
$nextnum."; print "Verify other information.
 "; print "$FORM{'custname'}
 "; print "$FORM{'custaddress'}
  "; if ( $FORM{'custcity'} ) { print "$FORM{'custcity'}, "; } if ( $FORM{'custstate'} ) { print "$FORM{'custstate'} "; } if ( $FORM{'custzip'} ) { print "$FORM{'custzip'}"; } print "
 "; print "$FORM{'custcountry'}
 "; print "Phone: $FORM{'phone'}
 "; print "Fax: $FORM{'fax'}
 "; print "Email "; print "
 
$nextnum."; print "Special instructions or additional information.
 "; print "$FORM{'comments'}
 
$nextnum."; print "$title_fields.
 \n\n"; # display and pass through custom fields $N = @custom_names; $K = 1; while ( $K <= $N ) { if ( $FORM{$custom_names[$K-1]} ) { print "$custom_titles[$K-1]: $FORM{$custom_names[$K-1]}
\n"; print " \n\n"; } $K++; } print "
 
$nextnum."; print "Submit this page for an invoice preview.
 "; print "When you click the "Preview Invoice" button you will be shown a preview "; print "of your order. Nothing is processed or billed until you preview your order."; print "The button on this page does not process any billing.
 
"; print " 
 
\n\n"; # LOAD HIDDEN VARIABLES print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; # sending the "shipping method" express / standard as radio button, parsed at next process # the name=shiptype and value=express / value=standard print "
"; print "
"; print "Copyright © "; print "$site_name"; print " All rights reserved. 1999
"; print "
"; print ""; print "Merchant OrderForm v1.4 written and produced by RGA"; print "
"; print "
"; print "\n"; } # Return No Sale sub return_nosale { print "Content-type: text/html\n\n"; print "Incomplete ordering information submitted\n"; print ""; print "
"; print ""; print ""; print ""; print ""; print ""; print ""; print "
"; print "$site_name "; print "Ordering information incomplete.
"; print "This order cannot be processed due to missing information. "; print "Please use your browser back button to complete the needed information "; print "before proceeding with your order.
 
$date
"; print "The following information is missing from your order.
"; # begin missing info display print "
"; print ""; print "
    "; # display if no items chosen unless ($Nrecords > 0) {print "
  • No "; print "items have been checked for ordering \n";} # display payment contradiction or card verification error if ($CKsendcheck && $FORM{'cardnumber'} || $CKsendcheck && $FORM{'cardholder'}) { print "
  • Method of payment is unclear "; print "
      "; print "
    • Both send by check is enabled "; if ($FORM{'cardnumber'}) {print "
    • and"; print " the card number has input.\n";} if ($FORM{'cardholder'}) {print "
    • and"; print " the card holder's name has input.\n";} print "
    "; } elsif (!$CKsendcheck && !$FORM{'cardnumber'} || !$CKsendcheck && !$FORM{'cardholder'}) { print "
  • Method of payment is not complete "; print "
      "; print "
    • Send by check is not enabled "; unless ($FORM{'cardnumber'}) {print "
    • but"; print " the card number is not complete.\n";} unless ($FORM{'cardholder'}) {print "
    • but"; print " the card holder's name is not complete.\n";} print "
    "; } elsif (!$CKsendcheck && $CKcard == 0 || !$CKsendcheck && $CKholder) { unless ( length ( $FORM{'cardholder'} ) > 2 ) { print "
  • Check the "; print "Card holder's name for completeness.\n";} if ($CKcard == 0) { if ($FORM{'cardtype'} eq "visa") {$type = "Visa Card";} if ($FORM{'cardtype'} eq "mastercard") {$type = "Master Card";} if ($FORM{'cardtype'} eq "amex") {$type = "American Express Card";} if ($FORM{'cardtype'} eq "novus") {$type = "Discover Card";} print "
  • The $type"; print " number $FORM{'cardnumber'}"; print "
    Cannot be verified. Please check for accuracy.\n"; } } # display missing check information if enabled if ( $check_validate && $CKsendcheck ) { unless ( length ( $FORM{'checkname'} ) > 2 ) { print "
  • Check the Checking Account Name "; print " for completeness.\n"; } unless ( length ( $FORM{'checkbank'} ) > 2 ) { print "
  • Check the Checking Account Bank Name "; print " for completeness.\n"; } unless ( length ( $FORM{'checknumber'} ) > 2 ) { print "
  • Check the "; print "Check Number for completeness.\n";} unless ( (length ( $FORM{'checkroute'} ) == 8 ) || (length ( $FORM{'checkroute'} ) == 9 ) ) { print "
  • Check the "; print "Bank Routing Number "; print " - 9 digits USA, 8 digits Canada.\n";} unless ( length ( $FORM{'checkaccount'} ) > 3 ) { print "
  • Check the "; print "Checking Account Number for completeness.\n";} } # display missing shipping information unless ( length ( $FORM{'realname'} ) > 2 ) { print "
  • Check the Shipping Name "; print " for completeness.\n"; } unless ( length ( $FORM{'address'} ) > 6 ) { print "
  • Check the "; print "Shipping Address for completeness.\n";} unless ( length ( $FORM{'city'} ) > 2 ) { print "
  • Check the "; print "Shipping City for completeness.\n";} unless ( length ( $FORM{'state'} ) > 1 ) { print "
  • Check the "; print "Shipping State for completeness.\n";} unless ( length ( $FORM{'country'} ) > 1 ) { print "
  • Check the "; print "Shipping Country for completeness.\n";} unless ( length ( $FORM{'zip'} ) > 4 ) { print "
  • Check the "; print "Shipping Postal Code for completeness.\n";} unless ( length ( $FORM{'phone'} ) > 6 ) { print "
  • Check the "; print "Phone number for completeness\n";} print "
"; print "
"; # display count test variables for debugging # print "$Nrecords - Nrecords - number of items ordered
"; # print "$CKsendcheck - CKsendcheck - sendcheck checked is 1
"; # print "$CKcard - CKcard -card number verification
"; # print "$CKholder - CKholder - card name missing
"; # print "$CK - CK - shipping info missing

"; # print "$reversetax - Reverse Tax - Reverse the before or after S&H
"; # print "$includetax - Include Tax - Include tax for this state or All
"; # print "$unit_tax - Unit Tax - The appropriate tax rate applied
"; # print "$Rn - Rn check - is State in Aarray
"; # print "$state = State var

"; print "
"; print "Copyright © "; print "$site_name"; print " All rights reserved. 1999
"; print "
"; print ""; print "Merchant OrderForm v1.4 written and produced by RGA"; print "
"; print "\n"; } # Credit card verification sub routine # Return a good (1) or bad (0) value to variable ($CKcard) for validation sub check_card { $cardnumber = $FORM{'cardnumber'}; # Remove any spaces or dashes in card number $cardnumber =~ s/ //g; $cardnumber =~ s/-//g; $length = length($cardnumber); # Make sure that only numbers exist if (!($cardnumber =~ /^[0-9]*$/)) { $CKvalid = 1; } # Verify correct length for each card type if ($FORM{'cardtype'} eq "visa") { &vlen; } if ($FORM{'cardtype'} eq "mastercard") { &mclen; } if ($FORM{'cardtype'} eq "amex") { &alen; } if ($FORM{'cardtype'} eq "novus") { &nlen; } sub vlen { unless (($length ==13) || ($length == 16)) {$CKvalid = 1;} } sub mclen { unless ($length == 16) {$CKvalid = 1;} } sub alen { unless ($length == 15) {$CKvalid = 1;} } sub nlen { unless ($length == 16) {$CKvalid = 1;} } # Verify via Mod 10 for each one if ($FORM{'cardtype'} eq "visa") { &vver; } if ($FORM{'cardtype'} eq "mastercard") { &ver16; } if ($FORM{'cardtype'} eq "amex") { &ver15; } if ($FORM{'cardtype'} eq "novus") { &ver16; } # pick one for Visa sub vver { if ($length == 13) { &ver13; } if ($length == 16) { &ver16; } } # For 13 digit cards sub ver13 { $cc0 = substr($cardnumber,0,1); $cc1 = substr($cardnumber,1,1); $cc2 = substr($cardnumber,2,1); $cc3 = substr($cardnumber,3,1); $cc4 = substr($cardnumber,4,1); $cc5 = substr($cardnumber,5,1); $cc6 = substr($cardnumber,6,1); $cc7 = substr($cardnumber,7,1); $cc8 = substr($cardnumber,8,1); $cc9 = substr($cardnumber,9,1); $cc10 = substr($cardnumber,10,1); $cc11 = substr($cardnumber,11,1); $cc12 = substr($cardnumber,12,1); $cc1a = $cc1 * 2; $cc3a = $cc3 * 2; $cc5a = $cc5 * 2; $cc7a = $cc7 * 2; $cc9a = $cc9 * 2; $cc11a = $cc11 * 2; if ($cc1a >= 10) { $cc1b = substr($cc1a,0,1); $cc1c = substr($cc1a,1,1); $cc1 = $cc1b+$cc1c; } else { $cc1 = $cc1a; } if ($cc3a >= 10) { $cc3b = substr($cc3a,0,1); $cc3c = substr($cc3a,1,1); $cc3 = $cc3b+$cc3c; } else { $cc3 = $cc3a; } if ($cc5a >= 10) { $cc5b = substr($cc5a,0,1); $cc5c = substr($cc5a,1,1); $cc5 = $cc5b+$cc5c; } else { $cc5 = $cc5a; } if ($cc7a >= 10) { $cc7b = substr($cc7a,0,1); $cc7c = substr($cc7a,1,1); $cc7 = $cc7b+$cc7c; } else { $cc7 = $cc7a; } if ($cc9a >= 10) { $cc9b = substr($cc9a,0,1); $cc9c = substr($cc9a,1,1); $cc9 = $cc9b+$cc9c; } else { $cc9 = $cc9a; } if ($cc11a >= 10) { $cc11b = substr($cc11a,0,1); $cc11c = substr($cc11a,1,1); $cc11 = $cc11b+$cc11c; } else { $cc11 = $cc11a; } $val = $cc0+$cc1+$cc2+$cc3+$cc4+$cc5+$cc6+$cc7+$cc8+$cc9+$cc10+$cc11+$cc12; if (substr($val,1,1) !=0 ) { $CKvalid = 1; } } # For 16 digit cards sub ver16 { $cc0 = substr($cardnumber,0,1); $cc1 = substr($cardnumber,1,1); $cc2 = substr($cardnumber,2,1); $cc3 = substr($cardnumber,3,1); $cc4 = substr($cardnumber,4,1); $cc5 = substr($cardnumber,5,1); $cc6 = substr($cardnumber,6,1); $cc7 = substr($cardnumber,7,1); $cc8 = substr($cardnumber,8,1); $cc9 = substr($cardnumber,9,1); $cc10 = substr($cardnumber,10,1); $cc11 = substr($cardnumber,11,1); $cc12 = substr($cardnumber,12,1); $cc13 = substr($cardnumber,13,1); $cc14 = substr($cardnumber,14,1); $cc15 = substr($cardnumber,15,1); $cc0a = $cc0 * 2; $cc2a = $cc2 * 2; $cc4a = $cc4 * 2; $cc6a = $cc6 * 2; $cc8a = $cc8 * 2; $cc10a = $cc10 * 2; $cc12a = $cc12 * 2; $cc14a = $cc14 * 2; if ($cc0a >= 10) { $cc0b = substr($cc0a,0,1); $cc0c = substr($cc0a,1,1); $cc0 = $cc0b+$cc0c; } else { $cc0 = $cc0a; } if ($cc2a >= 10) { $cc2b = substr($cc2a,0,1); $cc2c = substr($cc2a,1,1); $cc2 = $cc2b+$cc2c; } else { $cc2 = $cc2a; } if ($cc4a >= 10) { $cc4b = substr($cc4a,0,1); $cc4c = substr($cc4a,1,1); $cc4 = $cc4b+$cc4c; } else { $cc4 = $cc4a; } if ($cc6a >= 10) { $cc6b = substr($cc6a,0,1); $cc6c = substr($cc6a,1,1); $cc6 = $cc6b+$cc6c; } else { $cc6 = $cc6a; } if ($cc8a >= 10) { $cc8b = substr($cc8a,0,1); $cc8c = substr($cc8a,1,1); $cc8 = $cc8b+$cc8c; } else { $cc8 = $cc8a; } if ($cc10a >= 10) { $cc10b = substr($cc10a,0,1); $cc10c = substr($cc10a,1,1); $cc10 = $cc10b+$cc10c; } else { $cc10 = $cc10a; } if ($cc12a >= 10) { $cc12b = substr($cc12a,0,1); $cc12c = substr($cc12a,1,1); $cc12 = $cc12b+$cc12c; } else { $cc12 = $cc12a; } if ($cc14a >= 10) { $cc14b = substr($cc14a,0,1); $cc14c = substr($cc14a,1,1); $cc14 = $cc14b+$cc14c; } else { $cc14 = $cc14a; } $val = $cc0+$cc1+$cc2+$cc3+$cc4+$cc5+$cc6+$cc7+$cc8+$cc9+$cc10+$cc11+$cc12+$cc13+$cc14+$cc15; if (substr($val,1,1) !=0 ) { $CKvalid = 1; } } # For 15 digit (Amex) cards sub ver15 { $cc0 = substr($cardnumber,0,1); $cc1 = substr($cardnumber,1,1); $cc2 = substr($cardnumber,2,1); $cc3 = substr($cardnumber,3,1); $cc4 = substr($cardnumber,4,1); $cc5 = substr($cardnumber,5,1); $cc6 = substr($cardnumber,6,1); $cc7 = substr($cardnumber,7,1); $cc8 = substr($cardnumber,8,1); $cc9 = substr($cardnumber,9,1); $cc10 = substr($cardnumber,10,1); $cc11 = substr($cardnumber,11,1); $cc12 = substr($cardnumber,12,1); $cc13 = substr($cardnumber,13,1); $cc14 = substr($cardnumber,14,1); $cc1a = $cc1 * 2; $cc3a = $cc3 * 2; $cc5a = $cc5 * 2; $cc7a = $cc7 * 2; $cc9a = $cc9 * 2; $cc11a = $cc11 * 2; $cc13a = $cc13 * 2; if ($cc1a >= 10) { $cc1b = substr($cc1a,0,1); $cc1c = substr($cc1a,1,1); $cc1 = $cc1b+$cc1c; } else { $cc1 = $cc1a; } if ($cc3a >= 10) { $cc3b = substr($cc3a,0,1); $cc3c = substr($cc3a,1,1); $cc3 = $cc3b+$cc3c; } else { $cc3 = $cc3a; } if ($cc5a >= 10) { $cc5b = substr($cc5a,0,1); $cc5c = substr($cc5a,1,1); $cc5 = $cc5b+$cc5c; } else { $cc5 = $cc5a; } if ($cc7a >= 10) { $cc7b = substr($cc7a,0,1); $cc7c = substr($cc7a,1,1); $cc7 = $cc7b+$cc7c; } else { $cc7 = $cc7a; } if ($cc9a >= 10) { $cc9b = substr($cc9a,0,1); $cc9c = substr($cc9a,1,1); $cc9 = $cc9b+$cc9c; } else { $cc9 = $cc9a; } if ($cc11a >= 10) { $cc11b = substr($cc11a,0,1); $cc11c = substr($cc11a,1,1); $cc11 = $cc11b+$cc11c; } else { $cc11 = $cc11a; } if ($cc13a >= 10) { $cc13b = substr($cc13a,0,1); $cc13c = substr($cc13a,1,1); $cc13 = $cc13b+$cc13c; } else { $cc13 = $cc13a; } $val = $cc0+$cc1+$cc2+$cc3+$cc4+$cc5+$cc6+$cc7+$cc8+$cc9+$cc10+$cc11+$cc12+$cc13+$cc14; if (substr($val,1,1) !=0 ) { $CKvalid = 1; } } # assign the sub return value if ($CKvalid) { $CKcard = 0; } else { $CKcard = 1; } } # Merchant OrderForm v1.4 January 1999 # Written by RGA@IO.COM _____ http://www.io.com/~rga/scripts/ orderform14.html 100644 25223 144 57546 6650253044 12204 0ustar rgauser Your Web Site Name Here
Here's how to order from Your WebSite Name
 
1. Select the items that you wish to purchase.
  Check the boxes next to the items you wish to purchase. You can click on the item name to see a picture of the product. You will have a chance to preview your order summary before it is finally processed.
Item  Description  Price
Box Baseball Cards  24 Collectable Baseball Cards$ 8.95
Second Nature Books  Collection of 10 Children books$ 65.00
Each Day Poster # 1  Mountain scene inspiration poster$ 11.50
Each Day Poster # 34  Lake scene inspiration poster$ 11.50
Today In History v1.0  History archives web based software$ 21.65
New York Times  A monthly subscription to the NYT$ 19.25
Magic Box Gifts  A surprise gift box of potpourri$ 12.25
The Finish Line  An autobiography by Bill Waters$ 31.99
The Naked Kingdom  Hidden confessions by Monica L.$ 50.95
 
Shipping and Billing Information
 
2. Bill my credit card for these purchases.
  If you do not wish to make payment by credit card, then leave the card information blank and check the box to pay by check or money order. Otherwise, complete the card information to pay by credit card.
 
    Expiration Date
Card Number   /
Card Holder  
 
 
3. I'll send a check or money order for payment.
  If paying by check or money order, check the box above. You'll be able to print a final invoice for mailing or faxing. If using On-Line Checking, then complete the information below.
 
 
Account Holder's Name  
Name of the Bank  
Check Number  
Bank Routing Number  
Account Number  
 
 
4. What is the shipping destination ?
  Your WebSite Name purchases will be sent to the following person and location.
 
 
Name
Address
City State
Country Postal Code
 
 
5. Additional customer information.
  Please enter your customer information, including phone number and email address in case we need to clarify your order information. If the same as shipping destination, then just fill in Phone and Email.
 
 
Name
Address
City State
Country Postal Code
Phone Fax
Email
 
 
6. Special instructions and additional information.
  Please enter any special instructions or additional information about your order.
 
 
 
 
7. Proceed to the next screen to Select Quantities.
  When you click the "Select Quantities" button your chosen items will be listed and you can select quantities of each item if you want. Nothing is processed or billed until you preview your invoice. The buttons on this page do not process any billing.

And, thanks for shopping at Your WebSite Name Here.

 
    
Copyright © Your WebSite Name All rights reserved. 1999
Merchant OrderForm v1.4 written and produced by RGA
orderlog.dat 100644 25223 144 0 6650253055 11330 0ustar rgauserordermain.rdb 100644 25223 144 0 6650253061 11467 0ustar rgauserordernumber.dat 100644 25223 144 4 6650253055 12043 0ustar rgauser1000orderorders.rdb 100644 25223 144 0 6650253056 12045 0ustar rgauserordersample14.html 100644 25223 144 63322 6650253040 12503 0ustar rgauser Your WebSite Name Here
Here's how to order from Your WebSite Name
 
1. Select the items that you wish to purchase.
  Check the boxes next to the items you wish to purchase. You can click on the item name to see a picture of the product. You will have a chance to preview your order summary before it is finally processed.
Item  Description  Price
Box Baseball Cards  24 Collectable Baseball Cards$ 8.95
Second Nature Books  Collection of 10 Children books$ 65.00
Each Day Poster # 1  Mountain scene inspiration poster$ 11.50
Each Day Poster # 34  Lake scene inspiration poster$ 11.50
Today In History v1.0  History archives web based software$ 21.65
New York Times  A monthly subscription to the NYT$ 19.25
Magic Box Gifts  A surprise gift box of potpourri$ 12.25
The Finish Line  An autobiography by Bill Waters$ 31.99
The Naked Kingdom  Hidden confessions by Monica L.$ 50.95
 
Shipping and Billing Information
 
2. Bill my credit card for these purchases.
  If you do not wish to make payment by credit card, then leave the card information blank and check the box to pay by check or money order. Otherwise, complete the card information to pay by credit card.
 
    Expiration Date
Card Number   /
Card Holder  
 
 
3. I'll send a check or money order for payment.
  If paying by check or money order, check the box above. You'll be able to print a final invoice for mailing or faxing. If using On-Line Checking, then complete the information below.
 
 
Account Holder's Name  
Name of the Bank  
Check Number  
Bank Routing Number  
Account Number  
 
 
4. What is the shipping destination ?
  Your WebSite Name purchases will be sent to the following person and location.
 
 
Name
Address
City State
Country Postal Code
 
 
5. Additional customer information.
  Please enter your customer information, including phone number and email address in case we need to clarify your order information. If the same as shipping destination, then just fill in Phone and Email.
 
 
Name
Address
City State
Country Postal Code
Phone Fax
Email
 
 
6. Special instructions and additional information.
  Please enter any special instructions or additional information about your order.
 
 
 
 
7. Example custom field section.
 
 
Custom Field One  
Custom Field Two  
Custom Field Three  
Custom Field Four  
Custom Field Five  
Custom Field Six  
 
 
8. Proceed to the next screen to Select Quantities.
  When you click the "Select Quantities" button your chosen items will be listed and you can select quantities of each item if you want. Nothing is processed or billed until you preview your invoice. The buttons on this page do not process any billing.

And, thanks for shopping at Your WebSite Name .

 
    
Copyright © Perl Scripts by RGA All rights reserved. 1999
Merchant OrderForm v1.4 written and produced by RGA
ordersample24.html 100644 25223 144 32070 6650253033 12502 0ustar rgauser Your WebSite Name Here
Here's how to order from Your WebSite Name
 
Ordering The World Famous Deluxe Set of Baseball Cards
Shipping and Billing Information
 
1. Please complete the following Check information.
 
 
Account Holder's Name  
Name of the Bank  
Check Number  
Bank Routing Number  
Account Number  
 
 
2. Please complete shipping and contact information.
  Your WebSite Name purchases will be sent to the following person and location.
 
 
Name
Address
City State
Country Postal Code
Phone Fax
Email
 
 
3. Proceed to the next screen to Select Quantity.
  Click the "Select Quantities" button to proceed with your order. Nothing is processed or billed until you preview your invoice. The buttons on this page do not process any billing.

And, thanks for shopping at Your WebSite Name.

 
    
Copyright © Your WebSite Name All rights reserved. 1999
Merchant OrderForm v1.4 written and produced by RGA
readme.txt 100644 25223 144 653 6650253107 11073 0ustar rgauser WELCOME to MERCHANT OrderForm v1.4 Written and produced by RGA@IO.COM Documentation prepared January 1999 http://www.io.com/~rga/scripts Complete documentation for MERCHANT OrderForm v1.4 is in this download package called: * Documentation.html It can be read with any Web browser from your local computer. Just unzip all files into one directory for now, and consult the documentation to get started. Happy Ordering !! scripts.jpg 100644 25223 144 4150 6634117573 11312 0ustar rgauserJFIFddAdobe ImageReadyDucky<Adobed       [ !1A"26QqB345a#$EuFVņ !AQ1a"2RCqBr#3 ?, ~}gJ_Z<ߑ,ziFhM[L8^i`iVuHD4Kf7Qx[FxH%>bhrCOϿyb vN0>zo󬑬lOiq[iR4ȈX>l[ dCrd8\W$Oڙg劭.ivgLz!eD'D#W ktLJ'sd [uZ=nܴ s1Ӭj͸kPtßQ{G~Kb4مam{?_0HPjp݄bbO%GXM 'b.fݴmԷDXrddD6"\x2Cs'A.Z+Ժ{?;?k o{}a"}U{SQ?8w&ߐ] $H-"-&Tol&SV3ongES,uh w7 jp[xFf9Ԍ-ٶaOeKRZPK5U]Kqj*~Wv:P-|+D3|N{qt:luFb:FMb`J$ۈ x9 cY&7E}ttQE[ӭR3FV/*:N)n^hQZ6*8vc}ڢZ虵أ?E HL}&['涬* ^"nMT6m֘7if&"xggۂ*n̽lCO BdzEQ@ziT*"`zݣą.qst TvSbÀD#%T JVKВٗRةLE:fK)ɦ_U |=̱C?aڔ\T.S-v,\EE&,$c&2YkکQq_E7aڒRkL\4 xäHJ'?:,7IpiJWPGˊjF9YgS03v. ]ϱ4Z z禌A;Oe&0gSIΔ\'v";#hw=;JeW5A?aڒv~6~õ%/ҾOv(vMYKumSJDd U\e0{IcFe‹_Y WxkJN/1 Box Baseball Cards


Baseball Cards

show2.html 100644 25223 144 235 6650253027 11022 0ustar rgauser Second Nature Books


Second Nature Books

show3.html 100644 25223 144 222 6650253053 11016 0ustar rgauser Poster # 1


Each Day Poster 1

show4.html 100644 25223 144 224 6650253052 11020 0ustar rgauser Poster # 34


Each Day Poster 34

show5.html 100644 25223 144 230 6650253051 11015 0ustar rgauser History v1.0


Today In History v1.0

show6.html 100644 25223 144 215 6650253047 11026 0ustar rgauser NY Times


New York Times

show7.html 100644 25223 144 221 6650253047 11024 0ustar rgauser Magic Gifts


Magic Box Gifts

show8.html 100644 25223 144 221 6650253046 11024 0ustar rgauser Finish Line


The Finish Line

show9.html 100644 25223 144 225 6650253054 11030 0ustar rgauser Naked Kingdom


The Naked Kingdom