The mgiConfirmOrderAP Tag

Tag Behavior

The mgiConfirmOrderAP tag formats and displays the contents of the shopping basket, the payment information, the shipping information, the billing information and information from additional user-designated fields for Accesspoint Transaction Manager credit card processing (requires an account with Accesspoint).


Tag Syntax

The mgiConfirmOrderAP tag has a beginning tag with 4 required parameters and 12 optional parameters, a body, and an ending tag. The tag form is:

<mgiConfirmOrderAP merchantID="Username" approvedURL="URL" 
deniedURL="URL" transactionType="Sale/Pre-Auth" 
taxRate="Decimal Number" state="US State" 
formatFileLocation="File Path" templateFileLocation="File Path" 
displayCustomerInfo="Yes/No" displayHiddenInfo="Yes/No" 
taxShipping="Yes/No" paymentInfoCheck="Yes/No" 
shippingInfoCheck="Yes/No" billingInfoCheck="Yes/No" 
shoppingBasketURL="URL" theHutmanScenario="Yes/No">
Mailing Address line 1
Mailing Address line 2
Mailing Address line x
</mgiConfirmOrderAP>

Required Parameters:

  • merchantID="Username" where "Username" is the unique store ID assigned by Accesspoint.
  • approvedURL="URL" where "URL" is the absolute address to the page that processes approved credit card orders.
  • deniedURL="URL" where "URL" is the absolute address to the page that processes denied credit card orders.
  • transactionType="Sale/Pre-Auth":
    • Sale - "The most commonly used transaction method for Internet and mail order businesses. Sale/MOTO stands for Mail Order Telephone Order and is the label assigned to all card not present transaction types or keyed transactions. This type of sale places an immediate hold on the customers available credit for the transaction which is typically referred to as a "Captured Transaction", and provides you with an authorization number. This is the first of two steps necessary for the transfer of funds to your account. The final transfer of your funds occurs when the batch your transactions are
      in is closed."
    • Pre-Auth - "Although similar to the Sale/MOTO transaction method, this feature is typically used to verify and place a temporary hold (three to thirty days depending on the bank) on the customers credit card account in the amount of the transaction. This transaction type will return an authorization number, but the transaction is not captured and will not post to your daily batch for automatic settlement. All transactions processed in this manner will be posted to the Ticket Only tool for final processing after shipment. Unless you are vending soft goods immediately over the Internet at the time of purchase or are providing the Customer with their merchandise at the time of sale, most of
      your transaction requests should be Pre-Auth/Book. Visa/MasterCard rules consider all purchases incomplete until the product has been shipped to the Customer at which time the transaction may be completed using the Ticket Only tool of the Transaction Manager system."

Optional Parameters:

  • taxRate="Decimal Number" where "Decimal Number" is the tax rate for shipping items in-state to the state specified in the "state" parameter. The tax rate should be written as a decimal number (e.g., 0.06) rather than a percentage (6%). The default is "0.00". If you include a tax rate, the shippingInfoCheck parameter cannot be set to "No".
  • state="US State" where "US State" is the full name of the US State where in-state tax applies. The state name is not case-sensitive and can include spaces. By default, no orders are charged an in-state tax.
  • formatFileLocation="File Path" where "File Path" is the relative path to the confirm order format file which specifies the format of the shopping basket displayed by confirm order. The default format file structure includes a table with columns for Quantity, ProductID, Description, Price (ea.), and Total. The default format file structure also includes table summary rows with the Subtotal (mgiSBPriceSubtotal), Tax (mgiSBTax), Shipping (mgiSBShippingCostSubtotal), and Total (mgiSBTotal). To create a custom format file, use text, HTML and the format file variables listed below. If you include the formatFileLocation parameter, the templateFileLocation parameter is required.
  • templateFileLocation="File Path" where "File Path" is the relative path to the confirm order template file which specifies the format of each product in the shopping basket displayed by confirm order. The default template file structure includes a table row with the Quantity (mgiSBQuantity), ProductID (mgiSBProductID), Description (mgiSBBriefDescription), Price (mgiSBPrice), and Total (mgiSBItemTotal) for each product. To create a custom template file, use text, HTML and the template file variables listed below. If you include the templateFileLocation parameter, the formatFileLocation parameter is required.
  • taxShipping="Yes/No" where "Yes" indicates that tax is calculated on the SubTotal and Shipping Charges and "No" indicates that tax is calculated on the SubTotal only. The default is "No".
  • displayCustomerInfo="Yes/No" where "Yes" indicates that the customer's payment, shipping and additional information is displayed and "No" indicates that customer's payment, shipping and additional information is not displayed. The default is "Yes".
  • displayHiddenInfo="Yes/No" where "Yes" indicates that the hidden payment and shipping information is included in the source of the page and "No" indicates that the hidden payment and shipping information is not included in the source of the page. This parameter is used to customize shopping basket orders and may be helpful when emailing the information from mgiConfirmOrder.
  • paymentInfoCheck="Yes/No" where "Yes" indicates that payment information (from mgiPaymentInfo) is required and "No" indicates that payment information is not required. The default is "Yes".
  • shippingInfoCheck="Yes/No" where "Yes" indicates that the customer's shipping information is verified and "No" indicates that customer's shipping information is not verified. The default is "No".
  • billingInfoCheck="Yes/No" where "Yes" indicates that the customer's billing information is verified and "No" indicates that customer's shipping information is not verified. The default is "Yes". If you include a tax rate, the billingInfoCheck parameter cannot be set to "No".
  • shoppingBasketURL="URL" where "URL" is the absolute address to the folder that contains the original MGI Data folder (and thus contains the original MGI Shopping Basket database). For example, "http://www.domain.com" or "http://www.domain.com/~store/" This parameter is required when using separate secure and unsecure servers and a true virtual hosting application.
  • theHutmanScenario="Yes/No" where "Yes" indicates that your secure folder is hosted virtually under the folder of another company (e.g., your hosting company) and "No" indicates that your secure folder is not hosted virtually under the folder of another company or all of your shopping basket files are under one folder on a non-secure folder. See below for examples. The default is "No".

The following folder structures require theHutmanScenario:

Secure Folder = WebStarRoot/Secure/Company/Secure Files
Non-Secure Folder = WebStarRoot/Company/Non-Secure Files

The following folder structures do not require theHutmanScenario:

Secure Folder = WebStarRoot/Company/Secure Files
Non-Secure Folder = WebStarRoot/Company/Non-Secure Files

Non-Secure Folder = WebStarRoot/Company/All Files

Tag Body:

  • Mailing Address: If you set the "Check" parameter in the mgiPaymentInfo tag to "Yes", then you must list a mailing address in the body of the mgiConfirmOrder tag. There is no limit to the number of lines in the mailing address.

Format File Variables: The confirm order format file specifies the static structure of the shopping basket display (e.g., the table headers and summary variables). You may customize the display of the confirm order shopping basket by indicating a format file path in the "formatFileLocation" parameter and including any of the following summary variables in your format file. To include a summary variable in the format file, use the mgiGet tag with the following syntax:

<mgiGet name="VariableName">
  • mgiSBProductList - The location of the template file structure for each product in the shopping basket appears at the location of the mgiSBProductList variable.
  • mgiSBPriceSubtotal - The subtotal of the extended item prices (i.e., price multiplied by quantity) for all products in the shopping basket appears at the location of the mgiSBPriceSubtotal variable.
  • mgiSBBaseShippingCost - When using the BasePlusPerItem shipping method, the mgiSBBaseShippingCost variable displays the base shipping cost for the order.
  • mgiSBShippingCostPerPound - When using the Weight shipping method, the mgiShippingCostPerPound variable displays the shipping rate per pound for the order.
  • mgiSBTotalWeight - When using the Weight shipping method, the mgiTotalWeight variable displays the sum of weights for all items in the shopping basket.
  • mgiSBShippingPercentage - When using the Percentage shipping method, the mgiSBShippingPercentage variable displays the shipping percentage rate for the order.
  • mgiSBShippingCostPerItem - When using the TotalItems shipping method, the mgiSBShippingCostPerItem variable displays the per item shipping rate for the order.
  • mgiSBShippingCostSubtotal - The subtotal of the extended shipping costs (as defined by the shipping method) for all products in the shopping basket appears at the location of the mgiSBShippingCostSubtotal variable.
  • mgiSBTax - The subtotal of all taxes for the order appears at the location of the mgiSBTax variable.
  • mgiSBTotal - The grand total including the mgiSBPriceSubtotal, the mgiSBShippingCostSubtotal, and the mgiSBTax appears at the location of the mgiSBTotal variable.

Template File Variables: The confirm order template file specifies the structure of each item in the shopping basket (whether there are 2 items or 100). You may customize the display of records in the confirm order shopping basket by indicating a template file path in the "templateFileLocation" parameter and including any of the following variables in your template file. To include item variables in the template file, use the mgiGet tag with the following syntax:

<mgiGet name="VariableName">
  • mgiSBQuantity - The mgiSBQuantity variable displays the quantity of each product in the shopping basket.
  • mgiSBProductID - The mgiSBProductID variable displays the unique productID for each product in the shopping basket.
  • mgiSBBriefDescription - The mgiSBBriefDescription variable displays the brief description and any values from mgiSBPopUp tags for each product in the shopping basket.
  • mgiSBPrice - The mgiSBPrice variable displays the single-product price of each product in the shopping basket.
  • mgiSBItemPriceTotal - The mgiSBItemPriceTotal variable displays the price multiplied by the quantity for each product in the shopping basket.
  • mgiSBShippingCost - When using the BasePlusPerItem shipping method, the mgiSBShippingCost variable displays the single-product shipping price of each product in the shopping basket.
  • mgiSBItemWeight - When using the Weight shipping method, the mgiSBItemWeight variable displays the weight of each product in the shopping basket.
  • mgiSBItemWeightTotal - When using the Weight shipping method, the mgiSBItemWeightTotal variable displays the weight multiplied by the quantity for each product in the shopping basket.
  • mgiSBItemShippingCostTotal - The mgiSBItemShippingCostTotal variable displays the shipping cost multiplied by the quantity for each product in the shopping basket.
  • mgiSBItemTotal - The mgiSBItemTotal variable displays the sum of the mgiSBItemPriceTotal and mgiSBItemShippingCostTotal for each product in the shopping basket.


Example Usage and Output

<FORM ACTION="https://secure1.merchantmanager.com/ccgateway.asp" METHOD="post">

<mgiConfirmOrderAP merchantID="thebookstore" 
approvedURL="http://www.thebookstore.com/approved.mgi" 
deniedURL="http://www.thebookstore.com/denied.mgi" 
transactionType="Sale" taxRate=".06" state="North Carolina" 
formatFileLocation="coformat.txt" templateFileLocation="cotemplate.txt">
The Book Store
101 Main Street
Anywhere, NC 28301
</mgiConfirmOrderAP>

<mgiConditional lhs="shoppingBasketPaymentMethod" 
relationship="equals" rhs="creditCard">

<mgiButton name="Process Payment">

</mgiConditional>

</FORM>

The mgiConfirmOrderAP tag displays the shopping basket, payment information, shipping information, billing information and information from additional user-designated fields (if any). For credit cards orders, use HTML <FORM> tags and a submit button to post orders to the Accesspoint server for real-time credit card processing. The <FORM> action should post to "https://secure1.merchantmanager.com/ccgateway.asp". The submit button is only necessary for credit card orders, therefore a conditional is used to display the "Process Order" button only when the payment type is "creditCard".


Suggested Usage

  • Hard-Coded Shopping Basket
  • Database-Driven Shopping Basket


[Return to the Referencing MGI Menu]


[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]