Configurations Back End

Merchant OrderForm Web Based Shopping Cart System @ 2001
Documentation for Back End Configuration Settings <mofpay.conf>

Table of Contents | FAQ | Installation | Security Issues | Building Input Pages | Formatting
Configurations1 | Configurations2 | About Configurations | Troubleshooting | Customizing

These programs are protected by copyright and may not be resold or distributed. Please see the copyright notice for more information on your end user license for this program.

What's In This Document:

Use this as a reference for the settings in mofpay.conf. Settings are listed and explained in the order they appear in the mofpay.conf configuration file. We've also included a How Do I list for some of the frequently asked questions about settings. For beginners information on how to work with Perl configuration files, see Docs : AboutConfigurations.html.

Important: SSL required

The MOFcart Back End processing script handles all the operations for collecting Billing information like credit card number, checking account numbers, etc.

Security Warning: These operations should be installed under SSL (Secure Sockets Layers) if you are collecting sensitive information on the forms. SSL is provided by your server, not MOF. Ask your hosting provider the details on how to run cgi scripts under the SSL they provide.

We recommend that you use a hosting provider that is capable of providing SSL on the same server as your virtual web space. We recommend against using remote SSL services, since you will not be able to use a couple of MOF's features if the Front End is on one server and the Back End is across the globe on a separate server. Most shared SSL is on the same server as your main web space, where the hosting provider uses virtual mapping to your web site space and files. You'll need to contact them or consult their help pages on how they intend for you to map via SSL to your web space. They will provide you with the URL path to invoke the SSL and run your scripts and web pages through the SSL.

 

How Do I .. ?

 

Major sections in the mofpay.conf configuration file

  1. HOW TO HANDLE ERROR MESSAGES
  2. SECURITY SETTINGS
  3. FILE SETTINGS - FILE LOCATIONS
  4. EMPTYING THE CART
  5. FLATFILE DATABASE FILES
    5.5
    USING SERVER SIDE CREDIT CARD RETRIEVAL
  6. MySQL DATA STORAGE
  7. ARES v2.4 SETTINGS
  8. OUTPUT TEMPLATES
  9. MISCELLANEOUS SETTINGS
  10. CART SETTINGS
  11. MAILING MERCHANT
  12. MAILING CUSTOMER
  13. SAVE WEB COPY OF INVOICE
  14. BILLING INFORMATION FIELDS TO USE/VALIDATE
  15. RECEIPT TO FIELDS TO USE/VALIDATE
  16. COUNTRY/STATE LIST SETTINGS
  17. OTHER FEATURES
  18. POP-UP WINDOWS
  19. HOW THE PAYMENT METHODS WORK
  20. PAYMENT METHOD: MAILING OR FAXING
  21. PAYMENT METHOD: ON ACCOUNT
  22. PAYMENT METHOD: CALL FOR CC INFO
  23. PAYMENT METHOD: CREDIT CARDS
  24. PAYMENT METHOD: ONLINE CHECKING
  25. PAYMENT METHOD: COD
  26. PAYMENT METHOD: ALLOW DEPOSIT
  27. PAYMENT METHOD: CUSTOM GATEWAYS
  28. PAYMENT METHOD: PAYPAL

Note: The Formatting settings are in the Docs > Formatting.html

 

1. HOW TO HANDLE ERROR MESSAGES ? Sections LIst How Do I ?

Use: Allows you to switch between troubleshooting messages for installation feedback and customer friendly error messages when ready to go live

0 Troubleshooting mode only, messages are not customer friendly. If you are running in ?test mode set ERRORMODE to zero for troubleshooting tips and info.

Security Warning: you must always set ERRORMODE to 1 or 2 when ready to go live, else those operating the cart from the web can see all your troubleshooting information when they get an error.

1 Return a Generic customer friendly error message for all errors.
Does not redirect to moferrors.html or custom page
This message provides a Click Here to return to the site Link as defined in $ErrMsgLink

2 Redirect all Error messages to a custom page as defined in the $ErrMsgRedirect URL

$ERRORMODE = [0/1/2];
$ErrMsgLink = 'URL for Click Here to return to the site on ERRORMODE 1';
$ErrMsgRedirect = 'URL to custom Error page for ERRORMODE 2';

 

2. SECURITY SETTINGS Sections LIst How Do I ?

Use: Allows you to define exact domains to submit data to the cart, preventing anyone from submitting bogus data.

Security Warning: You must have this setting enabled and operating correctly to prevent any tampering with the cart. The MOF back end accepts POST only data by default, but you must enable @ALLOWED_DOMAINS, usually the same as in mof.conf, to prevent any off site posting to the back end.

Provides a list of valid domains that have permission to interact with the cart
@ALLOWED_DOMAINS = ('http://localhost');

A page from anywhere can submit INPUT data to your cart
@ALLOWED_DOMAINS = ();

SSL Note: Under some SSL installations, the cgi reffering_url is not present in the environment when mof.cgi is called from a process in mofpay.cgi.  It is not present at the server level of the cgi process, and therefore you will get a Domain Not Allowed message if attempting to use the "Edit Cart" option from the Billing information screen.

Disable both of these buttons in mofpay.conf so they do not allow a post back to the cart while on the Billing information page

$menu_viewcart_top = 0;
$menu_editcart_bottom
= 0;

 

3. FILE SETTINGS - FILE LOCATIONS Sections LIst How Do I ?

Use: Settings necessary for MOF's back end file operations.

Where are the two main scripts located ?
The next two settings are either single file names or URLs - not absolute paths

Where is the MOF Front End cart script ?
$programfile = 'mof.cgi';
$progormfile = 'http://www.yoursite.com/mcart/mof.cgi';

SSL Note: if the back end is running under SSL, then put in the complete HTTP URL for the programfile setting. This terminates the SSL session, and insures that front end cart operations are loaded under normal HTTP protocol again. If you don't do this the front end cart will end up running under the SSL connection, and triggering all sort of "page insecure" messages from the browser.

Where is the MOF Back End Payment processing script ?
- A simple filename should always work for this
$paymentfile = 'mofpay.cgi';
$pay-orntfile = 'http://www.yoursite.com/mcart/mofpay.cgi';
$pay-orntfile = 'https://secure.somesite.net/your/site/mofpay.cgi';

Lockfiles
0
disables file locking under Unix/Linux
1 enable file locking under UNIX/Linux
$lockfiles = 1
;

Important: Disable file locking under NT/Winxx. It only works with Unix/Linux. File locking prevents any problems when MOF uses common data files, like the invoice number sequence, and especially the ASCII database storage, and ARES, etc. So, you should always enable it when on UNIX/Linux servers.

Invoice Number file

The simple file name will do. Place the file along side the mofpay.cgi script
$numberfile = 'mofnumber.dat';

On NT/Winxx you may need the full path
$numberfile = 'c:\HTTPd\Cgi-Bin\mofnumber.dat';

Note: you can change the invoice numbering by editing the mofnumber.dat file. Just put in the starting number. If you are using ARES, or saving database information, then avoid resetting the invoice number.


4. EMPTYING THE CART Sections LIst How Do I ?

Use: Provides a way for MOF to empty a customer's cart items once checkout is complete and final Order confirmation screen is displayed.

Important: If you are running the MOF back end under SSL, then you cannot use a remote SSL service or this feature will not work. This feature requires that the MOF back end be able to connect and write to original scratch files created by the MOF front end script. We recommend that you use a hosting provider that is capable of providing SSL on the same server as your virtual web space.

0 disable this feature
1 enable this feature
$delete_cart_final = 1;

These settings should be identical to the same settings in mof.conf
$datadirectory = '/original/path/to/datadirectory/';
$data_extension = 'order';

How It Works

When checkout is finalized, MOF will delete the just purchased items from the customer's cart file. If the customer happens to quickly return to the store to purchase more items, they will be able to start over. If you disable this feature, or have remote SSL where it cannot work, then when the customer returns to the store, the items just purchased are still in the cart. Not too professional looking.

If you are having trouble making this feature work, try these tips:

  1. enable the SSL uid fix in mof.conf
    $set_ssl_chmod = 1;
  2. delete all the scratch files in your ../orderdata/ directory
  3. are $datadirectory settings identical in mof.conf and mofpay.conf
  4. make sure your SSL is not on a remote server
    (you may log in to two servers regular HTTP and SSL HTTPS)

 

5. FLATFILE DATABASE FILES Sections LIst How Do I ?

Use: This is an ASCII flatfile data logging PlugIn that stores all of MOF's output data to four flatfiles. It is a MOFcart companion program, available in the MOFcart developer's area for anyone licensed at the developer's level.

Caution: you cannot enable this function without first installing the PlugIn utility, else MOF will give you an error message.

The documentation for this PlugIn explains how to make the settings in mofpay.conf

1 enable ascii flatfile dB storage
0 disable this feature
$save_ascii_data = 0;

Name of PlugIn
The PlugIn script is placed in same directory as mofpay.cgi
$save_ascii_file = 'mofsavedb.pl';

Where are the ASCII dB data files

This will always be an absolute path and not a URL

$MOFINVOICES = '/path/to/datafiles/MOFINVOICES.DAT';
$MOFBILLING = '/path/to/datafiles/MOFBILLING.DAT';
$MOFORDERS = '/path/to/datafiles/MOFORDERS.DAT';
$MOFTEXT = '/path/to/datafiles/MOFTEXT.DAT';

 

5.5 USING SERVER SIDE CREDIT CARD RETRIEVAL Sections LIst How Do I ?

Use: This is an alternative to emailing the scrambled cc numbers. This plugin and instructions are available for Free Download at the MOF support area online:
How to keep the credit card numbers secure

Caution: you cannot enable this function without first installing the PlugIn utility, else MOF will give you an error message.

1 enable ascii flatfile dB storage
0 disable this feature
$save_cc_data = 1;

Name of PlugIn
The PlugIn script is placed in same directory as mofpay.cgi
$save_cc_file = 'mofsavecc.pl';

Where is the data file ?
This will always be an absolute path and not a URL
$MOFINFO = '/absolute/path/to/mofcc-data';



6. MySQL DATA STORAGE Sections LIst How Do I ?

Use: This is a MySQL data logging PlugIn that stores all of MOF's output data to a MySQL database. It is a MOFcart companion program, available in the MOFcart developer's area for anyone licensed at the developer's level.

Caution: you cannot enable this function without first installing the PlugIn utility, else MOF will give you an error message.

The documentation for this PlugIn explains how to make the settings in mofpay.conf

1 enable MySQL dB storage
0 disable this feature

$save_mysql_data = 1;

Name of PlugIn
The PlugIn script is placed in same directory as mofpay.cgi
$save_mysql_file = 'mofsqldb.pl';

Define database connectivity settings: Name, User, Pswd
$dbName = '';
$dbUser = '';
$dbPswd = '';

Note: there is no host setting. The PlugIn assumes you are running a MySQL Daemon on the same server as your web site

Security Warning: *Do not* use a non password protected database. There is more information about that in the PlugIns documentation. Also, make sure the mofpay.conf is completely secure from web access, since it will contain the user : pswd. For more information on this security issue see: Docs > SecurityIssues.html


7. ARES v2.4 SETTINGS Sections LIst How Do I ?

Use: ARES v2.4 (Affiliate Referral Earnings System) is a powerful companion affiliate program that runs exclusively with MOF. It is a fully automated, web based, two tier system that provides purchase tracking for affiliate earnings, representative earnings, customer discounts, real time sign-up, web based Admin, web based account management for affiliates, and more. It is an exclusive MOFcart companion program, available in the MOFcart developer's area for anyone licensed at the developer's level.

The best way to see it in operation is to sign up as an affiliate with MerchantPal.com services, where all MOFcart products are distributed. That will give you a tour of the system, and if you decide to actually use your affiliate links, you can earn real money.

You won't be able to access the Admin control panel, but you can view a complete set of the ARES v2.4 documentation here, which may give you an idea of how the Admin works

The ARES v2.4 installation docs explain how to make these settings in mofpay.conf

Note: the file paths and names should be identical to the settings in the ARES v2.4 configurations

$activityfile_path = '/path/to/activitylog.dat';
$infofile_path = '/path/to/infofile.dat';
$repinfo_path = '/path/to/repinfo.dat';

How to compute earnings

By default, affiliate earnings are computed on the gross amount (after any discounts) before any Tax and/or SH & I.

0 compute using GROSS amount, before any SH & I
1 compute using NET amount (total invoice), includes any SH & I and/or tax, etc.

$use_NETAMT = 0;

 

8. OUTPUT TEMPLATES Sections LIst How Do I ?

Use: Settings necessary for MOF's file operations. These templates allow you to custom design the look and feel of all the cart screens. For help on creating your own templates see: Docs > Formatting.html

MOF uses nine templates to present the various cart screens that you see in traveling through the cart: viewing the cart, validation messages, error messages, shipping info, order summary, billing info, order confirmation, invoice copy. The templates are standard HTML web pages, with a special insertion marker embedded as an HTML comment.

Where are the 3 templates for the Back End cart screens ?
Again, these next settings are always absolute paths - not a URL. These settings define your server's full path to the ../mofcart/ directory that contain MOF's template files. For help on absolute paths see: Docs > Installation.html

Note: UNIX/Linux the path opens with forward slash and ends with the filename.html
For NT you would typically start with Drive ID and end with filename.html
Do not use relative addressing in this ../ or ../../

Template for the Billing information screen
$payment_info_template = '/home/sites/site14/web/mofcart/mofbilling.html';

Template for the Order confirmation screen or Thank you for your order screen
$final_template = '/home/sites/site14/web/mofcart/mofconfirmation.html';

SSL Note : if you are using SSL (HTTPS) protocol for the Back End then all of the objects (images) embedded within the Billing information and Order confirmation templates need to be referenced via the HTTPS protocol, else you will get the message "non secure items loading." The surest way is to just use the full HTTPS URL in the image location.

Template for the saved Web copy of invoice page
$save_invoice_template = '/home/sites/site14/web/mofcart/mofinvoice.html';

Security warning: See warnings in Formatting.html if saving web copies of invoices

Note: The Web copy template is used to save a copy of the final invoice to the ../invoices/ directory on your web site.  It is an identical copy of the Order confirmation, however, all sensitive information has been deleted from it, like credit card numbers, checking account numbers, etc. It does not need to be stored in the HTTPS SSL location. If you do not enable this feature, then you do no need this template.

What is the Insertion Marker to look for ?
Note: this exact string must appear as an HTML comment in the location where you want MOF to mix dynamic output with the HTML template. MOF will grab the template defined above for a given function, and insert all its dynamic output where this marker is located in the template.

$insertion_marker = '<!--MOF-INPUT-AREA-->';


9. MISCELLANEOUS SETTINGS Sections LIst How Do I ?

Use: Some various settings for formatting date, time, currency, weight, delimiter

Note: These settings should be identical to the ones in mof.conf

GMT offset time in seconds:
5hrs AHEAD = 5X60X60 = 18000, 3.5hrs BEHIND = -3.5X60X60 = -12600
For a GMT offset reference see: Docs > GMT_offsets.txt
Put a zero to use your server's localtime
Example: Austin, Texas (summer) USA CST
$gmtPlusMinus = -18000;

Formatting the date-time line
0 date display off
1 Sunday, June 17, 2001
2 Sunday, June 17, 2001 8:29:41 AM
3 06/17/2001
4 06/17/2001 8:30:12 AM
$format_date = 2;

What to do with that long Order ID number ?
0 Do not show that long Order ID number in the cart screens
1 Go ahead and show that long Order ID number
$show_order_id = 0;

What currency symbol to use ?
$currency = '£';
$currency = '€';
$currency = '$';

What weight symbol to use ?
$weight = "lb";

What delimiter to use for product input field separation
Note: be careful about changing this and don't use MOF reserved characters :: or | or [ ]
Also don't use any string that has a common occurrence, like the comma
And don't use any special Perl characters either, like ; or || or {}
$delimit = "----";

What eMail address is listed on ERRORMODE 2 messages ?
$merchantmail = 'merchant@yourdomain.com';

 

10. CART SETTINGS Sections LIst How Do I ?

Use: How to handle zero amount orders, fractions, sub total display. These settings should be the same as in mof.conf

How to format the extra user input ?
0 No additional formatting
1 Make user input options separated by lines as <li> and /n
$makelist = 1;

Print a flag to identify taxable items ?
$identify_tax_items = "<font size=1 color=gray>tax</font>";

Allow Fractions
1
Allow fractions: (1.2) (0.1) as quantity input
0 Allow only integers, round to lowest integer if fraction entered
$allow_fractions = 0;

Note: When enabled, this setting will always trigger a sub total line for each item in the cart, so that computations will be correct. The product's original price as set in the input is always assumed to be one unit. Hence, apples input price is $ 0.35 (per pound), then someone can enter 0.5 of that item and the correct sub total will compute, purchasing 1/2 pound of apples.

List the Main Item in the sub total lines ?
1 Prints sub total lines: Sub Total 2 of The Item at $ 50.95 each
0 Prints sub total lines: Sub Total 2 ( $ 50.95 per unit )
$item_in_subline = 10;

Note: You may want to disable this if using HTML [pseudo tags] in the Item Field input. Otherwise, the HTML will show up in the sub total line, as in src images, etc.

Zero based invoice bypass

These settings tell MOF to prevent asking the customer for payment method, billing information, or receipt to information if the total invoice = $ 0.00. No payment is required, so you may not want to ask for it. This allows the validation to be bypassed as well.

1 Bypass Payment Method section is $ 0.00 total
0 Treat a zero based invoice as any other, ask for configured Payment Methods
$zb_no_method = 1;

1 Bypass billing/receipt name, addr, etc if $ 0.00 total
0 require billing/receipt fields as configured in mofpay.conf
$zb_no_billing = 1;
$zb_no_receipt = 1;

Note: if you want to bypass the Billing info screen completely for a $ 0.00 total invoice, then enable the $zp_passthrough setting in mof.conf. Otherwise, the customer will initially stop on the Billing information screen, and MOF will display any input configured, like the comments box, or cyber permission checkboxes.



11. MAILING MERCHANT Sections LIst How Do I ?

Use: Sends the order notice to the merchant via email

Security warning: if you are taking credit card or checking account numbers over the web, then you must enable the number scrambling. You also need the MOF cart back end set up under SSL. Also, make sure the mofpay.conf is completely secure from web access, since it will contain the secret codes. For help on securing the conf files see: Docs > SecurityIssues.html

Note: credit card numbers will not appear in the email notice until at least one of the scrambling codes below have been enabled.

Test cc number: VISA 4321 5678 9876 4321

If you're trying to test the cc number, you either must disable the cc validation or use a test number that passes the validation algorithms

Troubleshooting: if you are having problems getting the mail to send, then you may need to go into the actual mail PlugIn file and change the internal definitions. NT installations will need to do this for sure. See: Docs > Troubleshooting.html

0 do not send merchant notice
1 send merchant notice the order was placed
$mail_merchant_invoice = 1;

Name of mail PlugIn
$mail_merchant_file = 'merchant.mail';

Define email addresses to send notices to, may use multiple addresses
@mail_merchant_addr = (
    'one@firstmail.com',
    'two@secondmail.com'
);

Important: Make sure and use single quotes only when defining email addresses because the @ will trigger an error if double quotes are used to identify the string.

What return address to show on emails
$mail_return_addr = 'merchant-return-addr@domain.com';

Plain text business name for subject line and body, and URL
$mail_merchant_name = "Your Business Name Here";
$mail_site_url = 'http://www.domain-name.com';

Number scrambling

Set your secret code(s), numeric values only, between 1 - 4 digits
When both cc codes are zero, the cc number will not be included in the mail

Transpose the first 4 digits in the cc number
$code_cc_number_one = 0;

Transpose the second 4 digits in the cc number
$code_cc_number_two = 0;

Transpose the checking account number
$code_check_number = 0;

This is a way of scrambling the cc number as it goes out in the mail. The first code will be subtracted from the first 4 digits in the real cc number. The second code will be subtracted from the second 4 digits in the real cc number. The checking account code will be subtracted from the overall checking account number.

We provided two codes to scramble both the first and second sets of four digit numbers because Discover cards use only one universal set of four digit numbers ( 6011 ).  If you don't take Discover cards, then using only the first set of four digits is safe.  You could also opt to scramble only the second set of four digits, and not the first.

Important: Do not use the same number for both settings, especially if you are taking Discover cards. Finding the answer to the first would then yield the correct answer to the second.

Obtaining the correct cc number

The scrambled number that appears in the Merchant mail will have your secret code(s) subtracted from the real sets. To obtain the correct number, add your secret code(s) back into the first 4 digits, and second 4 digits, respectfully.

Example:

4321
5678
9876
4321
Real number entered at web
-3427
 
 
 
$code_cc_number_one
 
-148
 
 
$code_cc_number_two
0894
5530
9876
4321
The number you receive in mail
 
 
 
 
 
To obtain the real number from mail
+3427
 
 
 
Add in $code_cc_number_one
 
+148
 
 
Add in $code_cc_number_two
4321
5678
9876
4321
Real number to process

Note: It's okay for customers to enter hyphens, etc into the cc number.  The validation routine will check out the number, if it passes validation, then it is okay to transpose.  The full transposed cc number that appears in the merchant mail notice is formatted with spaces between the sets of four digits, regardless of how the original number was entered by the customer. 

Obtaining the correct checking account number

This code number is subtracted from the overall checking account number, so you can make it any number you want.  It is not limited to the first 4 digits. Add the checking code back into the number received in mail for the correct checking account number.



12. MAILING CUSTOMER Sections LIst How Do I ?

Use: Sends an Order confirmation via email to the customer

Troubleshooting: if you are having problems getting the mail to send, then you may need to go into the actual mail PlugIn file and change the internal definitions. NT installations will need to do this for sure. See: Docs > Troubleshooting.html

0 off, 1 on
$mail_customer_receipt = 1;

name of PlugIn
$mail_customer_file = 'customer.mail';

Include the user : pswd to print in the customer mail if you pswd protect the ../invoices/ directory with a general password.
$mail_user = "";
$mail_pswd = "";

Business information that prints in various places in the customer mail
$merchant_addr = 'Merchant Business Mailing Address';
$merchant_csz = 'Merchant City, State Postal-code';
$merchant_phone = 'Merchant Phone Number';
$merchant_fax = 'Merchant Fax Number';

Note: If you set a fax number and enable mailing or faxing as a payment method, then MOF assumes your are allowing faxing. Setting fax to "" (null) tells MOF to forget the fax part, you don't have one.

Note: MOF will select the customer email address to mail order confirmation in this order. If no customer email address is found, no customer mail will be sent.

  1. Whom to send receipt to ?
  2. Billing information
  3. Shipping destination

 

13. SAVE WEB COPY OF INVOICE Sections LIst How Do I ?

Use: Allows you to save a complete copy of the Order confirmation as web page

Security warning: See warnings in Formatting.html if saving web copies of invoices

The Web copy template is used to save a copy of the final invoice to the ../invoices/ directory on your web site.  It is an identical copy of the Order confirmation, however, all sensitive information has been deleted from it, like credit card numbers, checking account numbers, etc. It does not need to be stored in the HTTPS SSL location.

0 off, 1 on
$save_invoice_html = 1;

name of PlugIn
$save_invoice_file = 'invoice.pl';

1 List the Web copy URL in the Order confirmation as a link
0 Do not list the URL in the Order confirmation
$list_invoice_url = 10;

Define the absolute path to the ../invoices/ directory, this is not a URL
Note the starting and ending forward slash /
$save_invoice_path = '/path/to/invoices/';

NT/Winxx example:
Note the opening Drive ID and ending double backslash
$save_invoice_path = 'D:\HTTPd\invoices\\';

Define the base URL to the ../invoices/ directory
Note: the actual filename will be appended to this URL resulting in full http://link
$save_invoice_url = 'http://localhost/invoices/';

Fix for some shared SSL problems
$set_ssl_chmod = 0;

SSL Note: This is a feature fix if you are saving web copies of invoices but find that you are unable to access, delete, or edit any of the invoice files that MOF is creating.  For Unix-Linux servers only, enable this switch, and when MOF creates the invoice files they will be created with shared permissions, so that you will be able to access them under your normal uid (user ID). 



14. BILLING INFORMATION FIELDS TO USE/VALIDATE ? Sections LIst How Do I ?

Use: Allows you to set which fields are displayed and required for Billing name, address, etc., on the Billing information screen

Important: the required fields should match required fields for shipping destination fields, if possible. This will minimize confusion with the shortcut feature.

Note: the shortcut feature will fill any empty billing information fields with corresponding shipping destination information. The customer may use the shortcut and fill in any of the billing information fields. New data can be entered into the billing info fields at any time, and previous data will be replaced when submitted.

For help with Perl syntax for this setting, see: Docs > AboutConfigurations.html.

Syntax:
%billing_info_fields = ('name',[validation value]);

How It Works:

  • Include a field name (with validation value) to print it on Billing info screen
  • Set the validation value to zero (0) to *not* require input
  • Set the validation value to any positive integer to require that string length input
  • Do not set a validation value to Null, the field will not display
  • Remove the field's name and validation value from the list to disable its use
    - or - you can simply comment out the line

Example:

%billing_info_fields = (
   'Ecom_BillTo_Postal_Name_First',2,
   'Ecom_BillTo_Postal_Name_Middle',0
);

This defines that two fields will display. The First Name Field requires at least 2 characters entered, and the Middle Name Field is not required. No other fields will display.

Master List: Billing information fields

You can have up to 15 fields for Billing information. 
We are using the [Bill To] Fields in the ECML specs v1.0: http://www.ecml.org/
We substituted "Company" for the ECML "Line3" because they did not have company
We also added a "Region" to better manage world lists

  1. Ecom_BillTo_Postal_Name_Prefix
  2. Ecom_BillTo_Postal_Name_First
  3. Ecom_BillTo_Postal_Name_Middle
  4. Ecom_BillTo_Postal_Name_Last
  5. Ecom_BillTo_Postal_Name_Suffix
  6. Ecom_BillTo_Postal_Street_Line1
  7. Ecom_BillTo_Postal_Street_Line2
  8. Ecom_BillTo_Postal_Company
  9. Ecom_BillTo_Postal_City
  10. Ecom_BillTo_Postal_StateProv
  11. Ecom_BillTo_Postal_Region
  12. Ecom_BillTo_Postal_PostalCode
  13. Ecom_BillTo_Postal_CountryCode
  14. Ecom_BillTo_Telecom_Phone_Number
  15. Ecom_BillTo_Online_Email

 

15. RECEIPT TO FIELDS TO USE/VALIDATE ? Sections LIst How Do I ?

Use: Allows you to use an alternate set of fields for Whom to send receipt to, on the Billing information screen

For help with Perl syntax for this setting, see: Docs > AboutConfigurations.html.

Syntax:
%receipt_info_fields = ('name',[validation value]);

How It Works:

  • Include a field name (with validation value) to print it on Billing info screen
  • Set the validation value to zero (0) to *not* require input
  • Set the validation value to any positive integer to require that string length input
  • Do not set a validation value to Null, the field will not display
  • Remove the field's name and validation value from the list to disable its use
    - or - you can simply comment out the line

Example:

%receipt_info_fields = (
   'Ecom_ReceiptTo_Postal_Name_First',2,
   'Ecom_ReceiptTo_Postal_Name_Middle',0
);

This defines that two fields will display. The First Name Field requires at least 2 characters entered, and the Middle Name Field is not required. No other fields will display.

Master List: Receipt To information fields

You can have up to 15 fields for Receipt To information. 
We are using the [Receipt To] Fields in the ECML specs v1.0: http://www.ecml.org/
We substituted "Company" for the ECML "Line3" because they did not have company
We also added a "Region" to better manage world lists

  1. Ecom_ReceiptTo_Postal_Name_Prefix
  2. Ecom_ReceiptTo_Postal_Name_First
  3. Ecom_ReceiptTo_Postal_Name_Middle
  4. Ecom_ReceiptTo_Postal_Name_Last
  5. Ecom_ReceiptTo_Postal_Name_Suffix
  6. Ecom_ReceiptTo_Postal_Street_Line1
  7. Ecom_ReceiptTo_Postal_Street_Line2
  8. Ecom_ReceiptTo_Postal_Company
  9. Ecom_ReceiptTo_Postal_City
  10. Ecom_ReceiptTo_Postal_StateProv
  11. Ecom_ReceiptTo_Postal_Region
  12. Ecom_ReceiptTo_Postal_PostalCode
  13. Ecom_ReceiptTo_Postal_CountryCode
  14. Ecom_ReceiptTo_Telecom_Phone_Number
  15. Ecom_ReceiptTo_Online_Email

 

16. COUNTRY/STATE LIST SETTINGS Sections LIst How Do I ?

Use: Allows for external lists to populate the Country and State/Province dropboxes, and provides settings to manage the validation rules between Region and State/Province combinations.

About the shortcut

Important: use exact lists to the ones used in mof.conf for shipping destination state and country. If the customer used the shortcut for entering their Bill To information, and both lists do not match, then MOF may not be able to match a shortcut value correctly. MOF would not be able to return a correct selection in the list if the screen failed validation. The shortcut would still work correctly, but the country or state selected would not match the requested "shortcut" function.

Important: Billing information lists should only have the first option SELECTED as the default, and the value must be "" (null). If you set SELECTED with any non (null) option, and a user selects the shortcut, the default country or state will override the shipping information country and state, which is not what you are probably looking for.

What list to use for dropbox ?
Define the filename.txt to use in dropbox list for Country-State/Prov
Set this to Null "" to display a textbox for Country-State/Prov
$use_country_list = 'paycountries.txt';
$use_state_list = 'paystates.txt';

How to validate Region and State/Province combinations ?

What countries (as listed in paycountries.txt) have corresponding State/Province listings in paystates.txt ? In our package example, the paystates.txt list has all the States and Provinces listed for United States and Canada. Similarly, the corresponding setting is:

force state selection via the State/Prov dropbox for these countries
@force_state_select = ('United-States','Canada');

why ?

If "United-States" is selected as country then a State/Prov will be required from the State/Prov list, and any validation rule for Region is bypassed. Both State/Prov and Region will print.

If the country selected is not in the force_state_list, then validation for State/Prov is bypassed and the validation rule for Region is observed. Only Region will print, because the country does not have State/Prov listed

This allows us to use the dropbox State/Prov list and validation side by side with options for International Regions

Show this message if using both Region and State/Prov input:
$force_state_message = "Use Region for country other than USA or Canada.";

The Country List

The paycountries.txt list in MOF's package was carefully assembled to work round the globe, listing preferred Country names. It is a compilation of Amazon.com's Country List (as of 4-5-2001), USPS countries for Air Shipping and Global Priority Mail (March 2001), and the ISO Countries.  The list has long names so they appear with the full country name in all printable areas.

Use hyphens <option value=name-must-be-hyphenated> for spaces in the <option value> but not in the printable display text.

The State-Province List

The paystates.txt list in MOF's package has all US states and Canadian Provinces listed by their 2 letter ISO code.

Important: <option value=""> must be left as the first or "selected" option for validation to work correctly.

Rules for making your own lists

  • Set up the ASCII list files just like you're creating an HTML OPTION list
  • Do not include the <select></select> lines, MOF does that
  • Do not use any periods or special characters in your lists (.";)
  • The first value="" (null) should be the only occurrence of quotes

  • Syntax: <option value=Whatever>Anything or Whatever
  • Only one option per line

  • Do not use the "selected" attribute unless you use it for the "" (null) option

  • For State/Prov *only* MOF is set to recognize value=NOTINLIST> as a non printable value. If NOTINLIST is selected as the State-Province, then MOF will not print it. This is an old MOF feature. Newer versions use the Region input to handle a State/Prov "not in list," however, the feature is still there if needed

  • Use hyphens <option value=name-must-be-hyphenated> for spaces in the <option value> but not in the printable display text. This is used to prevent any parsing-matching-html encoding errors.

Browser Note: Here's some browser specific stuff: The Mac Internet Explorer v5+ must have first option defined exactly this way in the list file:

<option value="">Select State
<option value="">Select Country

The Mac IE browser will read the "Select State" on the right side as the value if you do not specify (null) as a set of double quotes for this option.

But be careful not to enclose any of the other <option>s in your list with quotes, else the MOF script cannot process the pattern matching it needs to do to remember what was selected.

 

17. OTHER FEATURES Sections LIst How Do I ?

0 disable the comments box on Billing information screen
1 enable the comments box on Billing information screen
$enable_comments_box = 1;

0 disable cyber-permission on Billing information screen
1 enable cyber-permission on Billing information screen
$enable_cyber_permission = 1;

Note: Cyber permission only triggers for validation for the following payment methods:
credit cards, online checking, call me for cc info, COD, on account

The following payment methods will not trigger cyber permission validation (even if you have the feature enabled): mail or fax, PayPal, zero based invoices, and custom gateways

 

18. POP-UP WINDOWS Sections LIst How Do I ?

Use: Allows you to turn on links on the Billing information screen for extra information pop-up windows.

Assign a message to display for the link, and define the url to the pop-up file.

displays link for CVV/CID pop up help window
$link_cvvcid = "<font size=2>What is Card Verification ?</font>";
$link_cvvcid_url = "http://localhost/mofcart/pop-cvvcid.html";

displays link for paying by check pop up help window
$link_check = "<font size=2>How to Pay by Check</font>";
$link_check_url = "http://localhost/mofcart/pop-check.html";

displays link for Terms/Conditions pop up window
$link_terms = "<br><font size=2>Click Here For Terms and Conditions.</font>";
$link_terms_url = "http://localhost/mofcart/pop-terms.html";



HOW THE PAYMENT METHODS WORK Sections LIst How Do I ?

MOF v2.4 has the following payment methods built in:

  1. Eight credit card types
  2. Online checking draft
  3. Mailing or faxing payment
  4. COD delivery
  5. PayPal service
  6. On Account
  7. Call for credit card info
  8. Custom gateway support

When you enable a particular method, then it appears in the drop down box for Payment Method on the Billing information screen.  The Billing information screen collects all final information before a final invoice is created.  When the place order button is clicked, and all information passes validation, then a final invoice is created.  The Billing information screen will continue to display, with validation cues (if enabled and configured), until all required information is present in the form.

When you enter the Billing information page for the first time, it is always missing at least one piece of input -- the Payment Method. That's why MOF stops on that screen instead of just skipping right past it.   You can disable all the input boxes for credit card fields, online checking fields, comments, and cyber permission, and MOF will not require any of that information.  But MOF will always require at least the Payment Method.  For help on how to bypass the Billing information screen completely see Docs > Customizing.html

Exception: if you have zero based invoices set to bypass the Billing information screen, and the total invoice = $ 0.00.

Note: If you enable only one method, other than the credit card method, then MOF will not display the drop box, but a custom message stating that only one Payment Method is being accepted.  If you enable the credit cart method (and at least two credit cart types) or any two methods are enabled, then the drop box will display.  The drop box will display with two or more methods.

 

 
19. PAYMENT METHOD: MAILING OR FAXING Sections LIst How Do I ?

0 disable this payment method
1 enable this payment method
$mail_or_fax_field = 1;

If enabled, do you want information lines to print for cc number, etc
Do not enable these unless you accept credit cards or check processing
$allow_lines_credit = 1;
$allow_lines_check = 1;

About this payment method:

Provides an alternative to any online payment, so a customer can print the invoice and mail or fax in order.

If you have checking and/or credit card fields enabled, then any information entered into those fields will be printed on the invoice, if the Mail or Fax Payment method is selected. This allows a customer to use those boxes to fill out their mailing or faxing form directly from the Billing information screen.

If you are wanting to make mailing or faxing payment the only method available, then you cannot have any of the checking or credit card fields enabled

This payment method will adjust language to "mailing payment" if there is no fax number entered under the merchant fax number setting: $merchant_fax

 

20. PAYMENT METHOD: ON ACCOUNT Sections LIst How Do I ?

0 disable this payment method
1 enable this payment method
$enable_onaccount = 1;

About this payment method:

Provides a generic "on account" payment method if you need to collect special account numbers for orders.

Example: we just built a site where the vendor allows special dealers purchases and bills them each quarter. When checking out, their valid Dealers number is required, so the account can be billed. Then the items are shipped.

The credit card fields are used to pass through any information, like account number, etc.

If using the cyber permission feature, then a Yes is required to proceed with this payment type

 

21. PAYMENT METHOD: CALL FOR CC INFO Sections LIst How Do I ?

0 disable this payment method
1 enable this payment method

$call_for_cc_info = 1;

About this payment method:

If your customers do not want to give out credit card information over your web site, then this allows them to finalize their order and signal you that they will give out cc info over the phone.

If using the cyber permission feature, then a Yes is required to proceed with this payment type

 

22. PAYMENT METHOD: CREDIT CARDS Sections LIst How Do I ?

Define card types

When you define any of the eight cart types, then you have enabled pay by credit card as an option in the payment method dropbox

Define the card types to allow in the payment method drop box
@credit_card_list = ('VISA','MAST','AMER','DISC','DINE','JCB','CART','AUST');

Example: enable Visa and Mastercard only
@credit_card_list = ('VISA','MAST');

Example: disable credit cards as payment method
@credit_card_list = ();

Enable validation

If credit card(s) are enabled, do you want to use mod10 algorithm validation ?
$enable_cc_verify = 1;

This is not a real time validation to determine if the number is active, only a pretty good validation to see if it passes the rules for issuing credit card numbers.

What cc fields to display

Syntax:
%credit_card_fields = ('name',[validation value]);

  • Include a field name (with validation value) to print it on Billing info screen
  • Set the validation value to zero (0) to *not* require input
  • Set the validation value to any positive integer to require that string length input
  • Do not set a validation value to Null, the field will not display
  • Remove the field's name and validation value from the list to disable its use
    - or - you can simply comment out the line

%credit_card_fields = (
    'Ecom_Payment_Card_Name',4,
    'Ecom_Payment_Card_Number',4,
    'Ecom_Payment_Card_Verification',3,
    'Ecom_Payment_Card_ExpDate_Day',0,
    'Ecom_Payment_Card_ExpDate_Month',1,
    'Ecom_Payment_Card_ExpDate_Year',4
);

For help with Perl syntax for this setting, see: Docs > AboutConfigurations.html
Note: $enable_cc_verify will take precedence over number validation above

Master list of ECML fields

  1. Ecom_Payment_Card_Name
  2. Ecom_Payment_Card_Number
  3. Ecom_Payment_Card_Verification
  4. Ecom_Payment_Card_ExpDate_Day
  5. Ecom_Payment_Card_ExpDate_Month
  6. Ecom_Payment_Card_ExpDate_Year

You may enable any of the above field names to display in the cc info boxes for input.  These are the ECML v1.0 Field Names for credit card input. 

Important: The ECML field name for Card_Type is not in the list above.  You cannot use it for input, because it is used in the drop box to display card type.  MOF reserves this name and uses it only if the Payment Method selected is a CC type.  The ECML field name is: Ecom_Payment_Card_Type

Master list of CC types

  1. VISA = Visa Credit Card
  2. MAST = Mastercard Credit Card
  3. AMER = American Express Credit Card
  4. DISC = Discover Credit Card
  5. DINE = Diners Club Credit Card
  6. JCB = JCB Card
  7. CART = Carte Blache
  8. AUST = Australian BankCard

Important: use only the acronym we have assigned in the Master list for cc type



23. PAYMENT METHOD: ONLINE CHECKING Sections LIst How Do I ?

Enable checking fields

When you enable any of the checking information fields, you have enabled Online Checking as an option in the payment method dropbox.

Example: disable Online checking
%checking_account_fields = ();

Syntax:
%checking_account_fields = ('name',[validation value]);

  • Include a field name (with validation value) to print it on Billing info screen
  • Set the validation value to zero (0) to *not* require input
  • Set the validation value to any positive integer to require that string length input
  • Do not set a validation value to Null, the field will not display
  • Remove the field's name and validation value from the list to disable its use
    - or - you can simply comment out the line

%checking_account_fields = (
    'Check_Holder_Name',4,
    'Check_Number',2,
    'Check_Account_Number',6,
    'Check_Routing_Number',8,
    'Check_Fraction_Number',4,
    'Check_Bank_Name',2,
    'Check_Bank_Address',2
);

Master list field of names

  1. Check_Holder_Name
  2. Check_Number
  3. Check_Account_Number
  4. Check_Routing_Number
  5. Check_Fraction_Number
  6. Check_Bank_Name
  7. Check_Bank_Address

Note: We did find an ECML standard for checking account fields, we made our own.



24. PAYMENT METHOD: COD Sections LIst How Do I ?

0 disable this payment method
1 enable this payment method

$enable_cod = 1;

Set COD charges

This allows you to set a flat fee to be added as COD fees. Set it to zero (0) if you do not want to add any extra COD fees.

$cod_charges = 3.95;

About this payment method:

This is a simplified COD option. It assumes that COD is a payment method. The feature does not attempt to solve any contradictions between shipping methods and COD as a payment method. If you have shipping computations already in the invoice, then this feature will not alter that.



25. PAYMENT METHOD: ALLOW DEPOSIT Sections LIst How Do I ?

This feature will place a deposit or layaway option as the first option on the Billing information screen

0 disable this payment method
1 enable this payment method
$enable_deposit = 1;

set minimums

deposit must be minimum dollar amount
$deposit_minimum = 10.00;

deposit must be minimum percent
$deposit_percent = 0.5;

Note: The minimum settings define a required condition for a minimum amount of deposit to be entered. If both amount and percent are enabled, the greater one is the minimum. A deposit option will not trigger if the order total is less than the minimum

 

 

26. PAYMENT METHOD: CUSTOM GATEWAYS Sections LIst How Do I ?

Use: Allows the use of POST gateways to transaction processing services like AuthorizeNet, PayFlow, Bank America, Echo, Worldpay, etc.

Skill level warning: setting up custom gateways requires that you be able to read and understand the gateway documentation, and their use of Forms, and that you be able to design their POST input form. The resulting input Form must be inserted into the mofpay.cgi program file. For specific help on understanding how to hook up to a gateway see:
Docs > Customizing.html

Custom gateway forms

This will allow you to tie the MOF Order confirmation screen to a gateway POST

0 disable pass off to gateway forms
1 enable pass off to gateway forms
$use_gateway_forms = 1;

how to list it in the dropbox
$gateway_item_name = 'Pay By Custom Gateway';

Custom full gateway

This will allow you to tie the MOF Order confirmation screen to a gateway POST, using the using cc/check information collected on the MOF Billing information screen. This is usually a gateway with seamless callback operation, where you do not use any of the gateway forms.

0 disable pass off to gateway forms
1 enable pass off to gateway forms

$use_gateway_mof = 0;



27. PAYMENT METHOD: PAYPAL Sections LIst How Do I ?

These settings allow MOF to display a link to the PayPal Web Accept feature.  This is a simple web link with the information that PayPal needs to trigger the Web Accept input.  MOF passes some information about Merchant name, the Merchant's PayPal ID (email login), the final amount, a return page. You can find detail information on the PayPal gateway at the paypal site. Look for the Web Accept manual.

Enable PayPal

0 disable this payment method
1 enable this payment method
$enable_paypal = 1;

Define your PayPal settings

Do not change this unless PayPal changes it
$paypal_url = 'https://secure.paypal.com/cgi-bin/webscr';

Your PayPal login ID (the email address)
$paypal_login = 'your@email-login.com';

Important: you do not need your PayPal password to use the Web Accept feature. You should not enter your PayPal password in these settings. Anyone connected with MerchantPal.com or MerchantOrderForm.com will never ask for your PayPal password.

Merchant name
$paypal_merchant = "Your Merchant Name Here";

Optional logo image
Should be an HTTPS image, 150 x 50, transparent bkground
This will display at the top of the PayPal pages
$paypal_image_url = 'https://www.merchantpal.com/images/pp_moflogo.gif';

Return link if paypal payment canceled
$paypal_cancel_return = 'http://www.yoursite.com/return.html';

What URL to return to after PayPal
$paypal_return_url = 'http://www.yoursite.com/return.html';

Use the MOF Web copy of invoice as a return URL
$use_web_copy_as_return_url = 0;

Enable this if you want the saved Web copy of the invoice to become the return URL when the customer completes at PayPal. Make sure you have the save Web copy feature turned on to use this

Disable paypal prompt for customer to include note
0 allow the note box at paypal checkout
1 Do not allow the note box at checkout
$paypal_no_note = 0;

Where is the PayPal button (HTTPS url if using SSL)
$paypal_button = 'https://www.merchantpal.com/mofcart/paypal.gif';

Pre - Populate Billing fields at PayPal forms for non-paypal members
0 Turn off this feature : use cmd = "_xclick" Web Accept gateway
1 Pre populate with MOF shipping fields (if exists) : use cmd = "_ext-entry"
2. Pre populate with MOF billing info fields (if exists)
: use cmd = "_ext-entry"
$paypal_prepop = 2;


 

 

 

 

These programs are copyright @ MerchantOrderForm.com, MerchantPal.com 2001