uShopOrderSMTP.class
The uShopOrderSMTP applet is an order form which collects the
customer's personal and payment information and then emails the
information to the store owner. In addition, this applet also allows
you to setup shipping, tax, and payment options as described below.
Note that since this order method emails the information via regular
SMTP mail, the transactions will not necessarily be secure.
See also uShop Security.
Parameters
- mailto - The email address to send the order information to. Example:
"sales@mystore.com".
- subject - The subject that will appear on all order emails. Example:
"uShop Order".
- payment - This parameter lets you specify a list of payment methods that
you accept. Separate each method with a comma. Example: "Visa,
Master Card, Discover, COD" would allow customers to choose
to pay by Visa, Master Card, Discover, or COD.
- validate - This parameter lets you specify whether you want to let uShop
validate the credit card information before sending the order.
uShop has the ability to validate credit card numbers by verifying
the number of digits, checking the prefix, and performing a mod 10
checksum check on the card numbers. Supported credit card types
are MasterCard, Visa, Amex, Diners Club/Carte Blanche, Discover,
enRoute, and JCB. Set this parameter to "YES" is you want to
validate the card numbers. Otherwise, set this parameter to "NO".
The default value is "NO".
- taxrate - The default tax rate. Specify this as a value 0.00 through 1.00
(ie. "0.06" or "0.07") - DO NOT use a percent (%) sign.
- taxtable - This parameter allows you to override the default tax rate for
customers from specified states. That is, in this parameter you
can specify special tax rates for specific states. The format
should be "<state>=<taxrate>,<state>=<taxrate>,...". You can
specify as many states as you want. Example: "FL=0.06,FLORIDA=0.06,
TX=0.07,TEXAS=0.07" would charge customers from Florida and Texas
tax rates of 6% and 7%, respectively.
- shipping - This parameter allows you to specify what shipping methods are
available and how to calculate the shipping for each method. See
the page on shipping setup
for additional information on setting up Shipping.
- handling - This parameter allows you to specify a default handling fee that
will be added to all orders. Example: "$2.00" would charge
customers an additional $2.00 per order.
- handlingtable - This parameter allows you to override the default handling
rate for customers from specified countries. That is, in this
parameter you can specify special handling fees for specific
countries. The format should be "<country>=<handlingfee>,
<country>=<handlingfee>,...". You can specify as many countries
as you want. Example: "USA=$1.00,United States=$1.00,U.S.A.=$1.00,
US=$1.00,CANADA=$1.00" would charge customers who live in the US
or Canada a $1.00 handling fee.
- message - An optional message that will be included on the bottom of the
order receipt that is sent to the customer.
- thankyou_url - If you would like to go to a custom thank you URL after an
order is placed, you can use this parameter to specify the URL.
Example: "http://www.uburst.com".
- clearcart - This parameter specifies whether to clear the shopping cart
and order form after the customer has submitted the order. Valid
values are "YES" or "NO". The default value is "NO".
- background - The background color of the applet. You can specify an
RGB value separated by commas ("integer,integer,integer" where
each integer is a value between 0 and 255) or specify one of
the predefined colors: white, black, lightGray, gray, darkGray,
red, green, blue, yellow, magenta, cyan, pink, and orange. The
default value is "white".
Note: Optional parameters are in italics
Example
This order form example has been setup:
- To mail orders to uburst1@uburst.com
- To put the subject "uShop Order" onto all order emails.
- To accept Visa, Master Card, Discover, and American Express payment methods.
- NOT to validate credit card numbers.
- To charge no tax, except for customers from Florida - who are charged 6% sales tax.
- To allow 3 shipping methods: UPS based on subtotal, FED EX based on total weight, and
Over Night at a flat rate of $50.00.
- To charge no handling fees for customers in the US and a $5.00 handling fee for
customers outside the US.
- To add the message "Thank you for shopping with us." to all order receipts.
- NOT to clear the shopping cart when the order is place.
- And to have a light gray background color.
<APPLET CODE = "uShopOrderSMTP.class" WIDTH=450 HEIGHT=650>
<PARAM NAME=mailto VALUE="uburst1@uburst.com">
<PARAM NAME=subject VALUE="uShop Order">
<PARAM NAME=payment VALUE="Visa,Master Card,Discover,American Express">
<PARAM NAME=taxrate VALUE="0.00">
<PARAM NAME=taxtable VALUE="FL=0.06,FLORIDA=0.06">
<PARAM NAME=shipping VALUE="UPS,BY_SUBTOTAL,20=$5.00,35=$7.00,50=$10.00,$15.00;
FED EX,BY_WEIGHT,10=$5.00,20=$10.00,$25.00;
Over Night,FLAT_RATE,$50.00">
<PARAM NAME=handling VALUE="$5.00">
<PARAM NAME=handlingtable VALUE="US=$0.00,USA=$0.00,U.S.=$0.00,U.S.A.=$0.00,United States=$0.00">
<PARAM NAME=message VALUE="Thank you for shopping with us.">
<PARAM NAME=clearcart VALUE="NO">
<PARAM NAME=validate VALUE="NO">
<PARAM NAME=background VALUE="lightGray">
</APPLET>