# Perl Support File
# WebStore Order Form Variables
# Variables used by all scripts: /Web_store/ws_global.setup
# File Permissions: 644 -rw-r--r--
# NOTE: If you change the filename of this file, change the value of
# $form_files{XX}[0] in outlet.setup to reflect the file's new name.
# XX equals the array index in %form_files for this order form.
############################################################################
# Demo.OrderForm.Surepay.Check.setup #
#==========================================================================#
# Copyright (c) 1996 - 2002, RDC Software #
# WebStore@ratite.com http://www.ratite.com/Perl/WebStore.shtml #
# Version: 4.15.00 Date: 01/01/2002 #
# #
# Full copyright notice can be found in the following files for the #
# listed license type: #
# #
# Single User License: /Docs/Copyright_SingleUser.html #
# Server License: /Docs/Copyright_Server.html #
# #
# This copyright notification can not be altered or removed from this file.#
#==========================================================================#
# Backslash all @ signs --> \@ <-- Perl 5 compatibility. #
# Variables containing @ signs must be enclosed in " (double quotes). #
# #
# All other variables are enclosed in ' (single quotes). #
# #
# If the value you store in a variable enclosed in single quotes requires #
# the use of a single quote, backslash the imbedded single quote. #
############################################################################
#--------------------------------------------------------------------------#
# Demonstration Order Form: Surepay Check Payment
#--------------------------------------------------------------------------#
# $merchant_file is the merchant configuration file for the real-time payment
# processor you are using, defined in the store setup file, outlet.setup.
$merchant_file = 'merchant.surepay.cfg' if !defined($merchant_file) || $merchant_file !~ /surepay/i;
# Set color attributes to match Surepay's current color scheme.
$header_bkg_clr = '#5D0E7C'; # Maroon
$header_fnt_clr = '#FFFFFF'; # White
$dsc_hr_bkg_clr = '#DCDCDC'; # Lightgray
$dsc_hr_fnt_clr = '#5D0E7C'; # Maroon
$data_bkg_clr = '';
$data_fnt_clr = '';
$modify_bkg_clr = '';
$modify_fnt_clr = '';
$border_bkg_clr = '';
$border_bkg_clr = qq! BGCOLOR="$border_bkg_clr"! if $border_bkg_clr ne '';
$data_bkg_clr = qq! BGCOLOR="$data_bkg_clr"! if $data_bkg_clr ne '';
$dsc_hr_bkg_clr = qq! BGCOLOR="$dsc_hr_bkg_clr"! if $dsc_hr_bkg_clr ne '';
$header_bkg_clr = qq! BGCOLOR="$header_bkg_clr"! if $header_bkg_clr ne '';
$modify_bkg_clr = qq! BGCOLOR="$modify_bkg_clr"! if $modify_bkg_clr ne '';
$data_fnt_clr = qq! COLOR="$data_fnt_clr"! if $data_fnt_clr ne '';
$dsc_hr_fnt_clr = qq! COLOR="$dsc_hr_fnt_clr"! if $dsc_hr_fnt_clr ne '';
$header_fnt_clr = qq! COLOR="$header_fnt_clr"! if $header_fnt_clr ne '';
$modify_fnt_clr = qq! COLOR="$modify_fnt_clr"! if $modify_fnt_clr ne '';
$dh_fnt_tag = "";
$dt_fnt_tag = "";
$hr_fnt_tag = "";
$hrd_fnt_tag = "";
$md_fnt_tag = "";
$nc_fnt_tag = "";
$smdt_fnt_tag = "";
$error_bkg_clr = ' BGCOLOR="#000000"';
$error_fnt_clr = ' COLOR="#FFFF00"';
$error_fnt_tag = "";
# Determine the use of frames to set table widths in $OrderForm{0}.
# $frameset_file is defined in outlet.setup.
# $use_ssl is defined in ws_global.setup.
# When $use_ssl = '3', WebStore TARGETS _top and and exits frames.
# Using frames
if ($frameset_file && $use_ssl ne '3') {
# 95% for vertical frames, 575 for horizontal frames
$Form0_4 = '95%'; # Table width: Page header
$Form0_5 = '500'; # Table width: Section headers
}
# Not using frames
else {
$Form0_4 = '575'; # Table width: Page header
$Form0_5 = '500'; # Table width: Section headers
}
# Develop drop down select of order forms defined in %form_files of the
# store's setup file.
# Print $Form0_3 in $OrderForm{0}[3] (below).
# $Form0_3 = '' when only one order form is defined in %form_files.
# No additional HTML is added to $OrderForm{0}[3].
$Form0_3 = &form_links($in{'formfile'});
$Form0_3 = "\n\t
$SPACE
".
"\n\t
$nc_fnt_tagThis form is for Check Payment of orders placed by US citizens.
".
"\n\t
${nc_fnt_tag}Alternative Payment Methods:
".
"\n\t
$nc_fnt_tag$Form0_3
"
if $Form0_3;
# %OrderForm is a hash of arrays listing all form input fields for
# WebStore's order form.
# Refer to /Docs/OrderForm.html for %OrderForm configuration details.
%OrderForm = (
# Field 0: Form Page Header
'0' => ['center', $global_page_title.' - Check Payment Order Form',
# '0' => ['center', 'RDC Software - Check Payment Order Form', # Same as above
# Comments below page header
'center',
qq!
${nc_fnt_tag}Orders are processed within one business day of receipt.
${nc_fnt_tag}Fields marked Required must be completed before
submitting your order.
!],
'31' => ['chkBank', 'Bank Name', 'text', 'SIZE="35" MAXLENGTH="100" VALUE="First State Bank"', 'R'],
# '31C' => [],
'32' => ['chkRouteNum1', 'Bank Routing Number', 'text', 'SIZE="25" MAXLENGTH="30" VALUE="123456780"', 'R'],
# '33' => ['chkRouteNum2', 'Routing Number Again', 'text', 'SIZE="25" MAXLENGTH="30"', 'R'],
# '33C' => [],
'34' => ['chkAccountNum1', 'Bank Account Number', 'text', 'SIZE="25" MAXLENGTH="30" VALUE="439085000"', 'R'],
# '35' => ['chkAccountNum2', 'Account Number Again', 'text', 'SIZE="25" MAXLENGTH="30"', 'R'],
# '35C' => [],
'36' => ['chkCheckNum', 'Check Number', 'text', 'SIZE="25" MAXLENGTH="30" VALUE="1001"', 'R',
'After issuing this check number to us, tear the check out of your checkbook and dispose of it.'],
'37' => ['ccBusiness', 'Business Account', 'select', 'Yes:SELECTED~No', 'R'],
'38' => ['chkDrvLic', q~Driver's License~, 'text', 'SIZE="25" MAXLENGTH="30" VALUE="477-77-7777"', 'R'],
'39' => ['chkDrvLicState', q~Driver's State~, 'select', 'SELECTED~53', 'R'],
'39C' => [],
'40C' => ['left',
qq!
To test the Surepay processing server in this demo, use
Bank Routing Number - 123456780
Bank Account Number - 439085000
Check Number - 1001
WebStore performs checks on fields containing data at the time of submission.
!],
'50H' => ['center', 'Shipping Address',
'left',
'
Please enter your shipping address if different
than the address you entered in the Billing Address section.
If you enter information in any field between Name and
Phone, all fields must be completed.
Address 2 and Shipping Instructions fields are always optional.
'],
'51' => ['shpName', 'Name', 'text', 'SIZE="35" MAXLENGTH="100"'],
'52' => ['shpAddr1', 'Address 1', 'text', 'SIZE="35" MAXLENGTH="100"'],
'53' => ['shpAddr2', 'Address 2', 'text', 'SIZE="35" MAXLENGTH="100"', 'Optional'],
# '54' => ['shpAddr3', 'Address 3', 'text', 'SIZE="35" MAXLENGTH="100"', 'Optional'],
'55' => ['shpCity', 'City', 'text', 'SIZE="35" MAXLENGTH="100"'],
'56' => ['shpState', 'State', 'select', '', 'US citizens only'],
'57' => ['shpCountry', 'Country', 'select', ''],
'58' => ['shpZip', 'Zip/Postal Code', 'text', 'SIZE="25" MAXLENGTH="30"'],
'59' => ['shpPhone', 'Phone', 'text', 'SIZE="25" MAXLENGTH="30"'],
'60' => ['shpIns', 'Shipping Instructions', 'textarea', 'ROWS="6" COLS="50" WRAP=PHYSICAL', 'Optional'],
# '90H' => ['center', 'Submit Your Order'],
'91' => ['debug', 'Diagnostic Mode', 'checkbox', 'Turn on diagnostic mode'],
'92C' => ['left',
q~
Turning on Diagnostic Mode will print additional information at the bottom of this
form and at the bottom of the Confirmation of Order page.
~],
'93S' => ['center',
'
'
],
); # DO NOT REMOVE - terminates %OrderForm
# @opt_shipping is a list of the KEYS in %OrderForm which correspond to the
# optionally required shipping fields. If any field listed in @opt_shipping
# is completed by the client, all fields listed in @opt_shipping must be
# completed.
@opt_shipping = ('51', '52', '55', '56', '57', '58', '59');
# @credit_card is a list of the KEYS in %OrderForm which correspond to all
# required credit card fields. @credit_card is used for switching credit card
# fields from "Required" to "Optional" for fax orders.
@credit_card = ();
# $Countries is a colon delimited listing of country KEYS from %countries in
# outlet.state_country.setup used to limit the countries printed to the country
# drop down select field in the Billing Address section of %OrderForm (above).
# Processors such as Authorize.Net only accept checks drawn on US banks.
# Set $Countries = '319' to limit the country field to the United States.
# Setting $Countries = '' prints all countries listed in %countries in
# outlet.state_country.setup to the country drop down select field.
$Countries = '319'; # United states
# $shpCountries is a colon delimited listing of country KEYS from %countries
# in outlet.state_country.setup used to limit the countries printed to the
# shpCountry drop down select field in the Shipping Address section of
# %OrderForm (above). The shpCountry array is defined as $OrderForm{57}.
# Setting $shpCountries = '' prints all countries listed in %countries in
# outlet.state_country.setup to the shpCountry drop down select field.
$shpCountries = '';
# Section header rows (xxH) are printed using one of the following color
# combinations for the row's background color and font color.
# Setting $header_colors = '0' uses $header_bkg_clr for the row's
# background color and $header_fnt_clr for the row's font color.
# Setting $header_colors = '1' uses $dsc_hr_bkg_clr for the row's
# background color and $dsc_hr_fnt_clr for the row's font color.
# Setting $header_colors = '2' uses $data_bkg_clr for the row's
# background color and $data_fnt_clr for the row's font color.
# Setting $header_colors = '3' uses $modify_bkg_clr for the row's
# background color and $modify_fnt_clr for the row's font color.
# Setting $header_colors = '' disables header background color and
# header font color. Colors default to
and
# attributes.
# $header_colors defaults to '' for values other than 0, 1, 2, or 3.
# $header_bkg_clr, $header_fnt_clr, $dsc_hr_bkg_clr, $dsc_hr_fnt_clr,
# $data_bkg_clr, $data_fnt_clr, $modify_bkg_clr, and $modify_fnt_clr
# are defined in outlet.setup.
$header_colors = '0';
#--------------------------------------------------------------------------#
# Subroutines: Display Additional HTML
#--------------------------------------------------------------------------#
# If $pre_form = 1, preface the order form with the contents of
# sub pre_form_html. Design the HTML code, copy and paste it below the
# PRINTED FROM: hidden comment line in sub pre_form_html.
# Setting $pre_form = '' disables access to
# sub pre_form_html. Nothing is printed at the top of the order form.
$pre_form = '1'; # 1 = Access sub pre_form_html
sub pre_form_html {
# Images must be placed in the /Graphics sub-directory and must be
# referenced using $graphics_url:
#
# WebStore sets the value of $graphics_url based on the use of SSL.
my $a = '';
if ($in{'debug'}) {
$a = '
Diagnostic Mode is enabled, printing additional information at
the bottom of this form and the Confirmation of Order page.'
}
else {
$a = '
Enable Diagnostic Mode to print additional information at
the bottom of this form and the Confirmation of Order page.'
}
print qq!
<\!-- PRINTED FROM: sub pre_form_html in $form_file -->
Surepay test server responses for e-Check
orders will return Authorized in this demo regardless of the order's total.
$a
!; # DO NOT REMOVE - terminates "print qq!" command above
# Access sub pre_view_modify_html in outlet.setup
&pre_view_modify_html if $pre_view_modify eq '2';
if (!$in{'c_file'} && !$in{'chkForm'} && !$in{'faxOrder'} && !$in{'chgShip'}) {
my $file = $libr_directory.'/'.'Demo.form_input.cfg';
if (-e $file) {
&read_open($file);
while () {
s/^\s+//;
next if /^$|^#/;
s/#.*//; s/\s+$//;
my ($a,$b) = split(/\s+/,$_,2);
next if defined($in{$a}) && defined($in{'name_vals'}) && $in{'name_vals'} =~ /\|*$a\|*/;
$b =~ s/\s+/ /g;
$in{$a} = $b if $a && (!defined($in{$a}) || $in{$a} !~ /\S+/);
}
close(FILE);
}
}
} # DO NOT REMOVE - End of sub pre_form_html
#-----------------------------------------------#
# If $form_trailer = 1, append the order form with the contents of
# sub form_trailer_html. Design the HTML code, copy and paste it below the
# PRINTED FROM: hidden comment line in sub form_trailer_html.
# Setting $form_trailer = '' disables access to
# sub form_trailer_html. Nothing is printed at the bottom of the order form.
$form_trailer = '1'; # 1 = Access sub form_trailer_html
sub form_trailer_html {
# Images must be placed in the /Graphics sub-directory and must be
# referenced using $graphics_url:
#
# WebStore sets the value of $graphics_url based on the use of SSL.
print qq!
<\!-- PRINTED FROM: sub form_trailer_html in $form_file -->
!; # DO NOT REMOVE - terminates "print qq!" command above
} # DO NOT REMOVE - End of sub form_trailer_html
# Undefine variables used only in this file.
# The WebStore script and it's program libraries never use uppercase and
# _ (underscore) in a variable name.
foreach ($Form0_3, $Form0_4, $Form0_5) { undef $_ if defined($_) }
1; # DO NOT REMOVE
# End of file