#!/usr/local/bin/perl##    taxes.pl##    $Source: /usr/local/CVS/SETREF_1_0_Release/webdemo/merchant/cgi-bin/set-demo/taxes.pl,v #    $Revision: 1.4 #    $Date: 1997/06/06 00:53:07 #    $Name: SETREF_1_0_Release #    $Disclaimer: #    ----------------------------------------------------------------------#    SET Draft Reference Implementation Disclaimer/License#    June 30, 1997#    #    This is a beta version of the SET Draft Reference Implementation#    ("DRI").  It is a work in progress and is being provided at this#    stage and in this form to help developers and other interested#    parties to understand the SET protocol.  This version of the DRI#    provides the core functionality required to process a simple#    transaction.  This release does not support certificate authority#    messages. Nor does it support the SET option to perform#    transactions without cardholder certificates.  For more details#    on the functionality in this beta version, please refer to the#    attached documentation.  #    #    Later versions of the DRI will include additional functionality#    and may include other changes.  DO NOT RELY UPON THIS CODE IN YOUR#    DEVELOPMENT.  If you discover a bug, please let us know by posting#    a message to the SET-DEV mailing list.  Our lawyers made us include#    the next four paragraphs, so PLEASE READ THE TEXT BELOW because it#    describes what you can do with the DRI.#     #    Copyright (C) 1996, 1997, Visa International Service Association and#    MasterCard International Incorporated.  All rights reserved.  #    Permission to copy and implement the material contained herein is#    granted subject to the conditions that (i) any copy or re-publication#    must bear this legend in full; (ii) any derivative work must bear#    a notice that it is not the Draft Reference Implementation ("DRI")#    for SET and (iii) that none of the copyright holders shall have any#    responsibility or liability whatsoever to any other party arising#    from the use or publication of the material contained herein.#    #    Visa and MasterCard ("Licensors") hereby grant you ("Licensee") a#    limited license to (i) make, use, copy and modify the DRI for the#    purpose of developing software that complies with the SET#    Specification ("SET Products") and for the purpose of achieving a#    better understanding of the SET Protocol; and (ii) distribute SET#    Products that incorporate all or a portion of the DRI and other#    software, which together are provided under a defined interface#    different from that provided by the DRI's API.  Licensee shall not#    redistribute or sell a license to the DRI nor shall Licensee#    incorporate any part of the DRI into a SET Toolkit.  A "Toolkit"#    means a product that provides comprehensive facilities to enable#    other parties to create software products for distribution. #    Bolt-on applications and payment modules shall not be considered#    Toolkits for the purpose of this license.  The DRI is not intended#    to be used as a Toolkit.#    #    Licensors make no representation or warranty of any kind, express#    or implied, relating to the DRI.  Licensors are making the DRI#    publicly available as an aid to understanding, creating, and#    testing SET Products.  Licensees are solely responsible for any#    use of the DRI and agree to hold Licensors harmless for any claim#    that may arise out of any product created with the DRI.  #    #    Licensee expressly acknowledges Terisa Systems, Inc., a Delaware#    Corporation with offices at 4984 El Camino Real, Los Altos,#    California, as a third party beneficiary of this license.#    #    This software is controlled material under U.S. law and the laws#    of other jurisdictions and you hereby acknowledge and agree that#    you must fully comply with all the current laws of the United States#    including, without limitation, rules and regulations of the United#    States Office of Export Administration and other applicable U.S.#    governmental agencies.  #    ----------------------------------------------------------------------#     $##    Copyright (C) 1996, 1997, Visa International Service Association and MasterCard International Incorporated#    All Rights Reserved.##    briank@terisa.com#%states = (    "ALABAMA",               4  , "ALASKA",                0  , "ARIZONA",               5  , "ARKANSAS",             4.5  , "CALIFORNIA",            6  , "COLORADO",              3  , "CONNECTICUT",           6  , "DELAWARE",              0  , "FLORIDA",               6  , "GEORGIA",               4  , "HAWAII",                4  , "IDAHO",                 5  , "ILLINOIS",             6.25   , "INDIANA",               5  , "IOWA",                  5  , "KANSAS",               4.9  , "KENTUCKY",              6  , "LOUISIANA",             4  , "MAINE",                 6  , "MARYLAND",              5  , "MASSACHUSETTS",         5  , "MICHIGAN",              6  , "MINNESOTA",            6.5  , "MISSISSIPPI",           7  , "MISSOURI",            4.225  , "MONTANA",               0  , "NEBRASKA",              5  , "NEVADA",               6.5  , "NEW HAMPSHIRE",         0  , "NEW JERSEY",            6  , "NEW MEXICO",            5  , "NEW YORK",              4  , "NORTH CAROLINA",        4  , "NORTH DAKOTA",          5  , "OHIO",                  5  , "OKLAHOMA",             4.5  , "OREGON",                0  , "PENNSYLVANIA",          6  , "RHODE ISLAND",          7  , "SOUTH CAROLINA",        5  , "SOUTH DAKOTA",          4  , "TENNESSEE",             6  , "TEXAS",                6.25  , "UTAH",                4.875  , "VERMONT",               5  , "VIRGINIA",             3.5   , "WASHINGTON",           6.5  , "WEST VIRGINIA",         6  , "WISCONSIN",             5  , "WYOMING",               4  , "DIST. OF COLUMBIA",    5.75);sub state_tax {    ($state) = @_;    foreach $key (keys %states) {        return $states{$key} if ($state =~ /$key/i);    }    return $rate;}1;  # in case this file is require'd