home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / TCDevGuide.txt < prev    next >
Encoding:
Text File  |  2004-03-24  |  92.2 KB  |  1,697 lines

  1.      ----------------------------------------------------------------------
  2.  
  3.                       TrustCommerce Developer's Guide 2.3
  4.  
  5.    http://www.trustcommerce.com
  6.    developer@trustcommerce.com
  7.  
  8.    March 18, 2003
  9.  
  10.      ----------------------------------------------------------------------
  11.  
  12. Table of Contents
  13.  
  14.    I. Introduction                           
  15.    II. Connecting via TCLink                 
  16.    III. Transaction Types                    
  17.    IV. Input Parameters                      
  18.    V. Return Parameters                      
  19.    VI. Credit Card Preauths and Sales        
  20.    VII. Card Verification Value (CVV)        
  21.    VII. Card-Present Transactions            
  22.    IX. ACH                                   
  23.    X. Postauths, Credits, and Chargebacks    
  24.    XI. TCS Citadel (Billing IDs)             
  25.    XII. Recurring Billing                    
  26.    XIII. TCS Wallet                          
  27.    XIV. Purchase Level II (Commercial Cards) 
  28.    XIV. Order Detail                         
  29.    XVI. Vault Query API                      
  30.    Appendix A - Test Data                    
  31.    Appendix B - Troubleshooting              
  32.    Appendix C - Connecting via HTTPS POST    
  33.    Appendix D - Currency Table               
  34.    Appendix E - Input Field List             
  35.  
  36.      ----------------------------------------------------------------------
  37.  
  38. I. Introduction
  39.  
  40.    This guide covers the TrustCommerce transactional processing API. It is
  41.    platform- and language-neutral. If you are a developer programming
  42.    processing functionality to a software package or website, then this guide
  43.    is for you. If you are connecting via a pre-integrated commerce package,
  44.    including shopping carts such as StoreForge, Mal's e-Commerce, PDG Cart,
  45.    or AllCommerce, then you do not need this document.
  46.  
  47.    Definitions of credit card processing terms and information about the
  48.    Vault website are contained in the TrustCommerce User's Guide, and will
  49.    not be covered here. If you are not familiar with the basics of credit
  50.    card processing (such as the difference between an auth and capture), then
  51.    you should probably read the User's Guide first. The User's Guide also
  52.    describes use of the Vault website's reporting capabilities, which you may
  53.    find useful to confirm that your test transactions are working as
  54.    expected.
  55.  
  56.    There are two methods of connecting to the TrustCommerce gateway at the
  57.    programming level: the TCLink client software, and an HTTPS POST to the
  58.    Vault server. TCLink is HIGHLY recommend, as it offers support for
  59.    TrustCommerce's unique features such as automated failover and enhanced
  60.    security through server certificate verification. It's available for many
  61.    platforms and languages, and installation is straightforward, so you
  62.    should try to use it if possible. If you are unable to use TCLink for
  63.    whatever reason, the HTTPS POST method will still allow you to access most
  64.    features of the TrustCommerce processing engine, but be aware that it
  65.    cannot match the speed and especially the reliability of TCLink.
  66.  
  67. II. Connecting via TCLink
  68.  
  69.    The TCLink API is available for download from the Vault website, in the
  70.    "Downloads" section. Be sure to chose the version that matches the
  71.    platform and language that you are using. In particular, Win32 developers
  72.    will probably always want the COM object, which contains support for a
  73.    number of different languages on the Win32 platform, including ASP,
  74.    ColdFusion, Perl, PHP, and Python.
  75.  
  76.    Installation instructions specific to the TCLink version you've downloaded
  77.    can be found in the readme file contained with the archive. It will also
  78.    contain a version of the TCTest program specific to the language you're
  79.    using. It's highly recommended that you look over this example, and even
  80.    use it as the basis for your own code. In fact, you should look over the
  81.    code sample first to get a feel for the API, then return to reading this
  82.    document.
  83.  
  84.    Versions of TCLink for high-level languages (including PHP, Perl, Python,
  85.    and Java) with built in support for hashes only have one method: Send().
  86.    This method accepts a single parameter, a hash of input values, and
  87.    returns a single parameters, a hash of output values. The only other
  88.    method avaliable is GetVersion(), which returns the version string for
  89.    TCLink.
  90.  
  91.    TCLink for other languages (including C/C++, Win32 COM, and CFX) contains
  92.    four basic methods: Create(), PushParam(), Send(), and GetResponse().
  93.    C-style TCLink functions are described in the table below.
  94.  
  95.   TCLink Function Names
  96.  
  97.    +------------------------------------------------------------------------+
  98.    |    Function Name    |                   Description                    |
  99.    |---------------------+--------------------------------------------------|
  100.    | CreateLink()        | Create a new transaction handle.                 |
  101.    |---------------------+--------------------------------------------------|
  102.    | PushParam()         | Push a parameter into the transaction.           |
  103.    |---------------------+--------------------------------------------------|
  104.    | Send()              | Submit a transaction to the gateway.             |
  105.    |---------------------+--------------------------------------------------|
  106.    | GetResponse()       | Retrieve a response parameter from the           |
  107.    |                     | transaction.                                     |
  108.    |---------------------+--------------------------------------------------|
  109.    | GetEntireResponse() | Get the entire response for the transaction,     |
  110.    |                     | primarily use for debugging or logging.          |
  111.    |---------------------+--------------------------------------------------|
  112.    | Destroy()           | Deallocate any memory associated with the        |
  113.    |                     | transaction handle.                              |
  114.    |---------------------+--------------------------------------------------|
  115.    | GetVersion()        | Get the version string for the TCLink API in     |
  116.    |                     | use.                                             |
  117.    +------------------------------------------------------------------------+
  118.  
  119.    These four methods map to the four stages of running a transaction:
  120.    initialize, push a number of parameters describing the transaction, send
  121.    the transaction to the TrustCommerce gateway for processing, and finally
  122.    get details about the transaction results.
  123.  
  124.    The only method which contacts the TC servers is Send(). This function
  125.    will block for one or two seconds while the transaction is processed.
  126.    Afterward, you can retrieve response parameters at your leisure; they are
  127.    stored internally in TCLink.
  128.  
  129. III. Transaction Types
  130.  
  131.    You may wish to read the section of the TCS User's Guide which describes
  132.    the transaction types and the authorization/capture process, especially if
  133.    you are not already familiar with credit card processing.
  134.  
  135.    In terms of parameters passed, preauths and sales are almost identical.
  136.    They take account data and personal information about the customer, along
  137.    with a transaction amount. The transaction is authorized and the response
  138.    values returned. In the case of a sale, the item is also immediately
  139.    submitted for capture. Preauths are not captured until they are
  140.    postauthed.
  141.  
  142.    Postauths and credits are also very similar to one another. They indicate
  143.    a capture or a return of funds for a previous transaction, and no personal
  144.    data about the customer or their payment method is passed.
  145.  
  146.    There are three other types of transaction. Store and unstore are covered
  147.    in the Billing ID section of this document. Walletsale is covered under
  148.    the TCS Wallet section.
  149.  
  150. IV. Input Parameters
  151.  
  152.    There are a large number of parameters available for describing
  153.    transactions. Not all parameters are accepted for all transaction types,
  154.    and most parameters are optional. Most transactions can be sent with only
  155.    a few parameters. The only parameters always required are custid,
  156.    password, and action.
  157.  
  158.    Parameters are carefully checked for format and size before the
  159.    transaction is sent. If there are any errors in the parameters you've
  160.    entered, the transaction will be aborted and detailed information about
  161.    the errors will be returned. These return values are described in more
  162.    detail in the next section.
  163.  
  164.    The parameters presented in the following tables are used by all
  165.    transaction types.
  166.  
  167.   Required Parameters
  168.  
  169.    +------------------------------------------------------------------------+
  170.    | Parameter Name |                      Description                      |
  171.    |----------------+-------------------------------------------------------|
  172.    | amount         | Amount of the transaction, in cents. (example: "500"  |
  173.    |                | is $5.00)                                             |
  174.    |----------------+-------------------------------------------------------|
  175.    | custid         | Your customer ID number assigned to you by            |
  176.    |                | TrustCommerce.                                        |
  177.    |----------------+-------------------------------------------------------|
  178.    | password       | The password for your custid as assigned by           |
  179.    |                | TrustCommerce.                                        |
  180.    |----------------+-------------------------------------------------------|
  181.    |                | The transaction type; can be one of preauth, sale,    |
  182.    | action         | postauth, credit, store, unstore, walletsale, or      |
  183.    |                | chargeback                                            |
  184.    +------------------------------------------------------------------------+
  185.  
  186.   Optional Parameters
  187.  
  188.    +------------------------------------------------------------------------+
  189.    | Parameter Name |                      Description                      |
  190.    |----------------+-------------------------------------------------------|
  191.    | amount         | Amount of the transaction, in cents. (example: "500"  |
  192.    |                | is $5.00)                                             |
  193.    |----------------+-------------------------------------------------------|
  194.    | demo           | When set to "y", the transaction will be a test       |
  195.    |                | transaction only.                                     |
  196.    |----------------+-------------------------------------------------------|
  197.    |                | Free-form text field intended for storing ticket      |
  198.    | ticket         | number or order number associated with the            |
  199.    |                | transaction, to aid merchants in order tracking and   |
  200.    |                | reporting.                                            |
  201.    |----------------+-------------------------------------------------------|
  202.    |                | Free-form text field intended for recording the       |
  203.    | operator       | operator that entered the transaction, to aid         |
  204.    |                | merchants in order track and reporting.               |
  205.    +------------------------------------------------------------------------+
  206.  
  207.    The demo parameter is of particular note for testing. Demo transactions
  208.    allow you to test your processing system without charging real money to a
  209.    card, and you will not be charged and transaction fees. They are also
  210.    flagged separately in the Vault database and will not appear in the
  211.    regular accounting reports.
  212.  
  213.    On card-not-present transactions, the ticket parameter is passed to the
  214.    acquiring bank in the settlement process as the "purchase identifier."
  215.    This may aid in reconciling the TrustCommerce transactions with the
  216.    deposits made into the merchant bank account. If no ticket is passed, then
  217.    the TrustCommerce transID will be sent to the bank instead.
  218.  
  219. V. Return Parameters
  220.  
  221.    Any transaction sent will return several parameters describing the success
  222.    or failure of the transaction. Properly formatted transactions will always
  223.    return a transaction ID (or "transID') this is the unique identifier for
  224.    this transaction, and can be used to retrieve the transaction from the
  225.    Vault website, or otherwise access the transaction in the future. (For
  226.    example, in order to credit a previous transaction, you will need to send
  227.    the transID of said transaction.)
  228.  
  229.    Transactions also always return a status parameter which describes the
  230.    success or failure of the transaction. Status can be set to one of the
  231.    following:
  232.  
  233.   Status
  234.  
  235.    +------------------------------------------------------------------------+
  236.    | Status Value |                       Description                       |
  237.    |--------------+---------------------------------------------------------|
  238.    | approved     | The transaction was successfully authorized.            |
  239.    |--------------+---------------------------------------------------------|
  240.    | accepted     | The transaction has been successfully accepted into the |
  241.    |              | system.                                                 |
  242.    |--------------+---------------------------------------------------------|
  243.    | decline      | The transaction was declined, see declinetype for       |
  244.    |              | further details.                                        |
  245.    |--------------+---------------------------------------------------------|
  246.    | baddata      | Invalid parameters passed, see error for further        |
  247.    |              | details.                                                |
  248.    |--------------+---------------------------------------------------------|
  249.    | error        | System error when processing the transaction, see       |
  250.    |              | errortype for details.                                  |
  251.    +------------------------------------------------------------------------+
  252.  
  253.    The difference between approved and accepted is subtle, but important.
  254.    Approved means that the transaction was an authorization of some sort, and
  255.    has been successfully cleared with the bank. Accepted only means that the
  256.    transaction was queued into the system without errors, but may be rejected
  257.    at some later time. An example of the difference is a sale versus a
  258.    credit. A sale is a realtime authorization, so it returns approved on
  259.    success. A credit is not realtime; there is no such thing as a "credit
  260.    authorization." Instead it is queued up for processing by the bank and
  261.    there is the small but non-zero posibility that it will be rejected at a
  262.    later time. In practice, however, this rarely happens, so the developer
  263.    need not worry unduly.
  264.  
  265.    When status is set to decline, the parameter declinetype will contain one
  266.    of the following:
  267.  
  268.   Decline Type
  269.  
  270.    +------------------------------------------------------------------------+
  271.    | Declinetype Value |                    Description                     |
  272.    |-------------------+----------------------------------------------------|
  273.    | decline           | This is a "true" decline, it almost always is a    |
  274.    |                   | result of insufficient funds on the card.          |
  275.    |-------------------+----------------------------------------------------|
  276.    | avs               | AVS failed; the address entered does not match the |
  277.    |                   | billing address on file at the bank.               |
  278.    |-------------------+----------------------------------------------------|
  279.    |                   | CVV failed; the number provided is not the correct |
  280.    | cvv               | verification number for the card. (See section X   |
  281.    |                   | for details on CVV.)                               |
  282.    |-------------------+----------------------------------------------------|
  283.    |                   | The card must be authorized manually over the      |
  284.    |                   | phone. You may choose to call the customer service |
  285.    | call              | number listed on the card and ask for an offline   |
  286.    |                   | authcode, which can be passed in the               |
  287.    |                   | offlineauthcode field.                             |
  288.    |-------------------+----------------------------------------------------|
  289.    | carderror         | Card number is invalid, usually the result of a    |
  290.    |                   | typo in the card number.                           |
  291.    |-------------------+----------------------------------------------------|
  292.    | authexpired       | Attempt to postauth an expired (more than 7 days   |
  293.    |                   | old) preauth.                                      |
  294.    |-------------------+----------------------------------------------------|
  295.    | dailylimit        | Daily limit in transaction count or amount as been |
  296.    |                   | reached.                                           |
  297.    |-------------------+----------------------------------------------------|
  298.    | weeklylimit       | Weekly limit in transaction count or amount as     |
  299.    |                   | been reached.                                      |
  300.    |-------------------+----------------------------------------------------|
  301.    | monthlylimit      | Monthly limit in transaction count or amount as    |
  302.    |                   | been reached.                                      |
  303.    +------------------------------------------------------------------------+
  304.  
  305.    A status of baddata indicates that no transaction was attempted because
  306.    one or more parameters was invalid. In this case, the parameter error will
  307.    indicate the problem, and the offenders parameter will list the offending
  308.    input fields. The error parameter may be set to one of the following:
  309.  
  310.   Bad Data
  311.  
  312.    +------------------------------------------------------------------------+
  313.    |    Error Value     |                    Description                    |
  314.    |--------------------+---------------------------------------------------|
  315.    | missingfields      | Some parameters required for this transaction     |
  316.    |                    | type were not sent.                               |
  317.    |--------------------+---------------------------------------------------|
  318.    | extrafields        | Parameters not allowed for this transaction type  |
  319.    |                    | were sent.                                        |
  320.    |--------------------+---------------------------------------------------|
  321.    | badformat          | A field was improperly formatted, such as         |
  322.    |                    | non-digit characters in a number field.           |
  323.    |--------------------+---------------------------------------------------|
  324.    | badlength          | A field was longer or shorter than the server     |
  325.    |                    | allows.                                           |
  326.    |--------------------+---------------------------------------------------|
  327.    |                    | The merchant can't accept data passed in this     |
  328.    |                    | field. If the offender is "cc", for example, it   |
  329.    |                    | usually means that you tried to run a card type   |
  330.    | merchantcantaccept | (such as American Express or Discover) that is    |
  331.    |                    | not supported by your account. If it was          |
  332.    |                    | "currency", you tried to run a currency type not  |
  333.    |                    | supported by your account.                        |
  334.    |--------------------+---------------------------------------------------|
  335.    | mismatch           | Data in one of the offending fields did not       |
  336.    |                    | cross-check with the other offending field.       |
  337.    +------------------------------------------------------------------------+
  338.  
  339.    A status of error indicates the an error occurred while processing the
  340.    transaction. These are almost always networking errors; see the
  341.    Troubleshooting section for more. If the status is error, then the
  342.    errortype parameter will be set to one of the following:
  343.  
  344.   Error
  345.  
  346.    +------------------------------------------------------------------------+
  347.    | Errortype Value |                     Description                      |
  348.    |-----------------+------------------------------------------------------|
  349.    | cantconnect     | Couldn't connect to the TrustCommerce gateway. Check |
  350.    |                 | your Internet connection to make sure it is up.      |
  351.    |-----------------+------------------------------------------------------|
  352.    |                 | The TCLink software was unable to resolve DNS        |
  353.    | dnsfailure      | hostnames. Make sure you have name resolving ability |
  354.    |                 | on the machine.                                      |
  355.    |-----------------+------------------------------------------------------|
  356.    | linkfailure     | The connection was established, but was severed      |
  357.    |                 | before the transaction could complete.               |
  358.    |-----------------+------------------------------------------------------|
  359.    |                 | The bank servers are offline and unable to authorize |
  360.    | failtoprocess   | transactions. Try again in a few minutes, or try a   |
  361.    |                 | card from a different issuing bank.                  |
  362.    +------------------------------------------------------------------------+
  363.  
  364.    Other parameters (such as avs or billingid) may be returned by the
  365.    transaction depending on the action; see sections covering the transaction
  366.    type you're running for detailed information on the specialized return
  367.    values.
  368.  
  369. VI. Credit Card Preauths and Sales
  370.  
  371.    The 'preauth' and 'sale' actions are identical in terms of parameters and
  372.    function. The only difference is that a sale submits the item for capture
  373.    as well, while preauths run the authorization only and can be postauthed
  374.    at another time.
  375.  
  376.    The parameters that can be passed with these action types are described in
  377.    the following two tables. The first table list required fields that you
  378.    must pass in order to send the transaction. The second table lists
  379.    optional fields that you can pass if you wish, but are not required.
  380.  
  381.   Required Parameters
  382.  
  383.    +------------------------------------------------------------------------+
  384.    | Parameter Name |                      Description                      |
  385.    |----------------+-------------------------------------------------------|
  386.    | amount         | Amount of the transaction, in cents. (example: "500"  |
  387.    |                | is $5.00)                                             |
  388.    |----------------+-------------------------------------------------------|
  389.    | cc             | Credit card number, digits only (no spaces or dashes) |
  390.    |----------------+-------------------------------------------------------|
  391.    | exp            | Credit card expiration date, in MMYY format           |
  392.    +------------------------------------------------------------------------+
  393.  
  394.   Optional Parameters
  395.  
  396.    +------------------------------------------------------------------------+
  397.    | Parameter Name  | Default Value |             Description              |
  398.    |-----------------+---------------+--------------------------------------|
  399.    | media           | cc            | "cc" for credit card or "ach" for    |
  400.    |                 |               | ACH.                                 |
  401.    |-----------------+---------------+--------------------------------------|
  402.    | currency        | usd           | Currency code (see section X for the |
  403.    |                 |               | table of codes)                      |
  404.    |-----------------+---------------+--------------------------------------|
  405.    | avs             | n             | AVS requested, "y" or "n" (see notes |
  406.    |                 |               | below).                              |
  407.    |-----------------+---------------+--------------------------------------|
  408.    | name            |               | Cardholder's name.                   |
  409.    |-----------------+---------------+--------------------------------------|
  410.    | address1        |               | First line of cardholder's street    |
  411.    |                 |               | address.                             |
  412.    |-----------------+---------------+--------------------------------------|
  413.    | address2        |               | Second line of cardholder's street   |
  414.    |                 |               | address.                             |
  415.    |-----------------+---------------+--------------------------------------|
  416.    | city            |               | Cardholder's city.                   |
  417.    |-----------------+---------------+--------------------------------------|
  418.    |                 |               | Two-character code for the           |
  419.    | state           |               | cardholder's state, or the full      |
  420.    |                 |               | region/province for international    |
  421.    |                 |               | addresses.                           |
  422.    |-----------------+---------------+--------------------------------------|
  423.    |                 |               | Cardholder's zipcode, five or nine   |
  424.    | zip             |               | digits with no spaces or dashes, or  |
  425.    |                 |               | the full postal code for             |
  426.    |                 |               | international addresses.             |
  427.    |-----------------+---------------+--------------------------------------|
  428.    | country         |               | Cardholder's country, leave blank    |
  429.    |                 |               | for US.                              |
  430.    |-----------------+---------------+--------------------------------------|
  431.    | phone           |               | Cardholder's phone number.           |
  432.    |-----------------+---------------+--------------------------------------|
  433.    | email           |               | Cardholder's email address.          |
  434.    |-----------------+---------------+--------------------------------------|
  435.    |                 |               | Six-digit numeric code used to       |
  436.    | offlineauthcode |               | "force" the transaction (see notes   |
  437.    |                 |               | below).                              |
  438.    +------------------------------------------------------------------------+
  439.  
  440.    A note about AVS: The AVS system is a useful way to help screen for fraud,
  441.    as it requires that whomever is sending the transaction know the billing
  442.    address for the card in question. As a merchant, you should know that AVS
  443.    is not uniformly supported by card issuers; approximately 30% of US-based
  444.    credit cards will not have AVS capability, and AVS is not available with
  445.    any non-US cards at all. If avs=y is used, it will attempt to verify the
  446.    address data with AVS, but if it is unavailable, it will not cause the
  447.    transaction to fail. Only if AVS is available and the address data does
  448.    not match will the transaction be declined due to AVS. You may wish to
  449.    screen AVS results more closely. For this reason, sales and preauths will
  450.    return the AVS code in a parameter named avs. (This parameter is returned
  451.    even when avs=n, which is the default.) It returns a single character
  452.    code, which are enumerated in the table below.
  453.  
  454.   AVS Returns Codes
  455.  
  456.          +------------------------------------------------------------+
  457.          | Code |                     Description                     |
  458.          |------+-----------------------------------------------------|
  459.          |  X   | Exact match, 9 digit zipcode.                       |
  460.          |------+-----------------------------------------------------|
  461.          |  Y   | Exact match, 5 digit zipcode.                       |
  462.          |------+-----------------------------------------------------|
  463.          |  A   | Street address match only.                          |
  464.          |------+-----------------------------------------------------|
  465.          |  W   | 9 digit zipcode match only.                         |
  466.          |------+-----------------------------------------------------|
  467.          |  Z   | 5 digit zipcode match only.                         |
  468.          |------+-----------------------------------------------------|
  469.          |  N   | No match on street address or zipcode.              |
  470.          |------+-----------------------------------------------------|
  471.          |  U   | AVS unavailable on this card.                       |
  472.          |------+-----------------------------------------------------|
  473.          |  G   | Non-US card issuer, AVS unavailable.                |
  474.          |------+-----------------------------------------------------|
  475.          |  R   | Card issuer system currently down, try again later. |
  476.          |------+-----------------------------------------------------|
  477.          |  E   | Error, ineligible - not a mail/phone order.         |
  478.          |------+-----------------------------------------------------|
  479.          |  S   | Service not supported.                              |
  480.          |------+-----------------------------------------------------|
  481.          |  0   | General decline or other error.                     |
  482.          +------------------------------------------------------------+
  483.  
  484.    Only the numeric parts of the address (street address and zipcode) are
  485.    verified. It should also be noted that oftentimes AVS data is incorrect or
  486.    not entirely up-to-date, dependent upon the card issuing bank. For these
  487.    reasons, you should treat AVS as a helpful tool which should be used in
  488.    combination with other methods (dependent upon your business model) for
  489.    screening transactions. If you trust AVS too blindly, you may risk losing
  490.    legitimate sales. Some merchants (again, dependent upon business model)
  491.    choose to turn AVS off altogether. You should analyze your customer base
  492.    and make the decision that will work best for your business.
  493.  
  494.    A note on offlineauthcode: Some cards returned a declinetype of call. This
  495.    indicates that the card cannot be automatically authorized, but if you
  496.    call the card issuers, they may be able to give you a manual
  497.    authorization, which will consist of a six-digit auth code. You may then
  498.    push the transaction through by entering that code into the
  499.    offlineauthcode field. offlineauthcode can only be used with sale
  500.    transactions. Be warned: offlineauthcode skips the authorization phase
  501.    altogether, and thus is not guaranteed in the same way as a normal
  502.    authorization. Be careful with the use of this parameter.
  503.  
  504.   Preauth/Sale Example
  505.  
  506.          params = {
  507.                  'custid':    'mycustid',
  508.                  'password':  'mypasswd',
  509.                  'action':    'preauth',
  510.                  'amount':    '500',
  511.                  'cc':        '4111111111111111',
  512.                  'exp':       '0404',
  513.                  'name':      'Jennifer Smith',
  514.                  'address1':  '123 Test St.',
  515.                  'city':      'Somewhere',
  516.                  'state':     'CA',
  517.                  'zip':       '90001',
  518.                  'avs':       'y'
  519.          }
  520.  
  521.          result = tclink.send(params)
  522.  
  523.          if (result['status'] == 'approved'):
  524.                  print  'Transaction was successful'
  525.          elif (result['status'] == 'decline'):
  526.                  print 'Transaction declined.  Reason: ', result['declinetype']
  527.          elif (result['status'] == 'baddata'):
  528.                  print 'Improperly formatted data.  Offending fields: ', result['offenders']
  529.          else:
  530.                  print 'An error occured: ', result['errortype']
  531.  
  532.          print 'Here are the full details:'
  533.          print result
  534.  
  535. VII. Card Verification Value (CVV)
  536.  
  537.    Another method for cardholder verification is the CVV system. Visa cards
  538.    use what is called a CVV2 code; Mastercards call it CVC2, and American
  539.    Express calls it CID. CVV2 and CVC2 (Visa/MC) are located on the back of
  540.    the credit card, printed in ink on the signature strip. The number is the
  541.    last three digits on the righthand side of the long string of numbers on
  542.    the strip. In the case of CID (AmEx), the number is a four-digit value
  543.    located on the front of the card, printed just above the card number on
  544.    the lefthand side. This value is passed to TCLink through the following
  545.    parameter.
  546.  
  547.   CVV Parameters
  548.  
  549.              +----------------------------------------------------+
  550.              | Parameter Name |            Description            |
  551.              |----------------+-----------------------------------|
  552.              | cvv            | A three or four digit CVV number. |
  553.              +----------------------------------------------------+
  554.  
  555.    The CVV value will be checked if anything is passed in this parameter. (If
  556.    you don't include the parameter, no CVV test will be run.) If the CVV
  557.    matches, the transaction will run as normal. If it does not, you will
  558.    receive a status of decline, and a declinetype of cvv.
  559.  
  560.   CVV Example
  561.  
  562.          params = {
  563.                  'custid':    'mycustid',
  564.                  'password':  'mypasswd',
  565.                  'action':    'sale',
  566.                  'amount':    '500',
  567.                  'cc':        '4111111111111111',
  568.                  'exp':       '0404',
  569.                  'cvv':       '123'
  570.          }
  571.  
  572.          result = tclink.send(params)
  573.  
  574.          if (result['status'] == 'decline')
  575.                  if (result['declinetype'] == 'cvv')
  576.                          print 'The CVV number is not valid.'
  577.  
  578. VII. Card-Present Transactions
  579.  
  580.    In a retail environment with a card swiper, you may wish to pass magnetic
  581.    stripe data along with the other credit card information on a preauth or
  582.    sale. There are two parameters which you can use to send this data, named
  583.    track1 and track2. Each one is for a different type of track data, and
  584.    depends on the type of card reader being used.
  585.  
  586.   Card-Present Parameters
  587.  
  588.               +--------------------------------------------------+
  589.               | Parameter Name |           Description           |
  590.               |----------------+---------------------------------|
  591.               | track1         | Up to 79 bytes of Track 1 data. |
  592.               |----------------+---------------------------------|
  593.               | track2         | Up to 40 bytes of Track 2 data. |
  594.               +--------------------------------------------------+
  595.  
  596.    You can include all data read from the track, but only data between the
  597.    start sentinel (a '%' character for track1 and a ';' for track2) and the
  598.    end sentinel ('?') will be used. Everything outside the start and end
  599.    sentinels (such as the trailing LRC character) will be discarded.
  600.  
  601.    The cc and exp fields may be passed, but are not required, since they will
  602.    be extracted from the track data. If you do pass one or both of these
  603.    fields, however, and it does not match the data extracted from the track
  604.    data, a status of baddata and an error mismatch will be returned.
  605.  
  606.    If both track1 and track2 data are passed, only the system will choose
  607.    track1 by default for the authorization, and track2 will be discarded.
  608.  
  609.    Generally AVS and address data are not necessary for swiped transactions,
  610.    but you may pass them anyway if you choose.
  611.  
  612.   Card Present Example
  613.  
  614.          params = {
  615.                  'custid':    'mycustid',
  616.                  'password':  'mypasswd',
  617.                  'action':    'sale',
  618.                  'amount':    '500'
  619.          }
  620.  
  621.          params['track1'] = CardReader.readMagStripe()
  622.  
  623.          result = tclink.send(params)
  624.  
  625. IX. ACH
  626.  
  627.    ACH, also known as electronic checks, are very different from credit cards
  628.    in that they allow a direct debit or credit to a checking account. The
  629.    concept of "authorization" does not exist; it is purely a money transfer.
  630.    For this reason, the only transaction types available for ACH are sale and
  631.    credit. ACH credits are identical to all other types of credits in the
  632.    TrustCommerce system, so please refer to section X for details on issuing
  633.    credits.
  634.  
  635.    ACH sales take the same parameters as credit card sales, with the
  636.    exception of the "cc" and "exp" fields. Instead, use the following
  637.    parameters.
  638.  
  639.   ACH Parameters
  640.  
  641.    +------------------------------------------------------------------------+
  642.    | Parameter Name |                      Description                      |
  643.    |----------------+-------------------------------------------------------|
  644.    | routing        | The routing number of the bank being debited.         |
  645.    |----------------+-------------------------------------------------------|
  646.    | account        | The account number of the person or business being    |
  647.    |                | debited.                                              |
  648.    +------------------------------------------------------------------------+
  649.  
  650.    AVS is not available for ACH transactions, so the AVS setting is ignored.
  651.  
  652.    There is only one declinetype returned from unsuccessful ACH sales, and
  653.    that is "decline."
  654.  
  655.   ACH Example
  656.  
  657.          params = {
  658.                  'custid':    'mycustid',
  659.                  'password':  'mypass',
  660.                  'action':    'sale',
  661.                  'media':     'ach',
  662.                  'amount':    '1000',
  663.                  'routing':   '123456789',
  664.                  'account':   '55544433322211'
  665.          }
  666.  
  667.          tclink.send(params)
  668.  
  669. X. Postauths, Credits, and Chargebacks
  670.  
  671.    These three transaction types are similar in that they reference a
  672.    successful transaction previously executed through the TrustCommerce
  673.    system. No credit card information or other personal information fields
  674.    will be accepted by this transaction types; there is only one required
  675.    parameter.
  676.  
  677.   Required Parameters
  678.  
  679.    +------------------------------------------------------------------------+
  680.    | Parameter Name |                      Description                      |
  681.    |----------------+-------------------------------------------------------|
  682.    | transid        | The transaction ID (format: nnn-nnnnnnnnnn) of the    |
  683.    |                | referenced transaction.                               |
  684.    +------------------------------------------------------------------------+
  685.  
  686.    In addition, postauths and credits can take an optional amount parameter.
  687.  
  688.   Optional Parameters
  689.  
  690.    +------------------------------------------------------------------------+
  691.    | Parameter Name |                      Description                      |
  692.    |----------------+-------------------------------------------------------|
  693.    | amount         | The amount, in cents, to credit or postauth if it is  |
  694.    |                | not the same as the original amount.                  |
  695.    +------------------------------------------------------------------------+
  696.  
  697.    If no amount is passed, the default will be to take the amount from the
  698.    original transaction. If, however, you wish to credit or postauthorize
  699.    less than the original amount, you may pass this parameter.
  700.  
  701.   Credit Example
  702.  
  703.          params = {
  704.                  'custid':    'mycustid',
  705.                  'password':  'mypass',
  706.                  'action':    'credit',
  707.                  'transid':   '001-0000111101'
  708.          }
  709.  
  710.          tclink.send(params)
  711.  
  712.          if (result['status'] != 'accepted')
  713.                  print 'Credit unsuccesful.'
  714.  
  715. XI. TCS Citadel (Billing IDs)
  716.  
  717.    The TCS Citadel enables you to store the billing information for your
  718.    customers in the encrypted TrustCommerce database, and recall it with a
  719.    single six-character alphanumeric code known as a billing ID. Besides
  720.    offloading the liability of storing sensitive data such as credit card
  721.    numbers from your business to TrustCommerce, it also can simplify database
  722.    access on your servers.
  723.  
  724.    The Citadel add two new actions, store and unstore. These allow you to
  725.    create, update, and deactivate billing IDs. Once stored, the billing ID
  726.    will be passed in place of the many billing information fields for preauth
  727.    and sale transactions.
  728.  
  729.    The store transaction looks very similar to a preauth or sale. You may
  730.    pass credit card information, billing and shipping address, or even ACH
  731.    information. (Please see sections X and X for a detailed description of
  732.    these parameters.) It adds one additional parameter:
  733.  
  734.   Store Parameters
  735.  
  736.    +------------------------------------------------------------------------+
  737.    | Parameter Name |                      Description                      |
  738.    |----------------+-------------------------------------------------------|
  739.    | verify         | When set to "y", a $1.00 preauth will be run on the   |
  740.    |                | card to ensure that it is valid.                      |
  741.    |----------------+-------------------------------------------------------|
  742.    | billingid      | Pass if you wish to update values of an existing      |
  743.    |                | billing ID.                                           |
  744.    +------------------------------------------------------------------------+
  745.  
  746.    You can update information on existing billing IDs by passing the
  747.    billingid field along with the store transaction. If you wish to erase the
  748.    data contained in a field, pass the exact string "null" (four characters,
  749.    all lower case) as the parameter value.
  750.  
  751.    The verify parameter is useful for ensuring that the card number is valid
  752.    if you are not planning to bill the customer right away. It has no effect
  753.    for ACH billing IDs, because there is no such thing as an ACH preauth. By
  754.    default, the verification uses AVS; if you don't wish to use AVS, pass an
  755.    avs of "n". Please note: normally, billing ID storage returns a status of
  756.    accepted, because the card is unverified. If you use the verify parameter,
  757.    however, it will return approved upon success.
  758.  
  759.    The unstore action takes a single parameter:
  760.  
  761.   Unstore Parameters
  762.  
  763.    +------------------------------------------------------------------------+
  764.    | Parameter Name |                      Description                      |
  765.    |----------------+-------------------------------------------------------|
  766.    | billingid      | The six-character alphanumeric billing ID returned by |
  767.    |                | a previous store transaction.                         |
  768.    +------------------------------------------------------------------------+
  769.  
  770.    Unstore removes the billing ID from active use, and you won't be able to
  771.    run further transactions on it. For your convenience, however, it does
  772.    remain visible in Vault (flagged as an inactive ID), so you can still look
  773.    up old IDs if needed.
  774.  
  775.    Now, the moment of truth: to run a billing ID transaction, pass the
  776.    billingid parameter to a preauth or a sale in place of all of the usual
  777.    billing info fields (name, cc, exp, routing, account, etc). That's all
  778.    there is to it! You'll find that your sale or preauth transactions are now
  779.    only a few parameters: custid, password, billingid, and amount.
  780.  
  781.   Billing ID Example
  782.  
  783.          # First, store a new ID.
  784.          params = {
  785.                  'custid':    'mycustid',
  786.                  'password':  'mypass',
  787.                  'action':    'store',
  788.                  'cc':        '4111111111111111',
  789.                  'exp':       '0404',
  790.                  'name':      'Jennifer Smith'
  791.          }
  792.  
  793.          result = tclink.send(params)
  794.  
  795.          if (result['status'] == 'accepted'):
  796.                  # It was succesfully stored.  Now try running a transaction on the new ID.
  797.                  billingid = result['billingid']
  798.                  params2 = {
  799.                          'custid':    'mycustid',
  800.                          'password':  'mypass',
  801.                          'action':    'sale',
  802.                          'billingid': billingid,
  803.                          'amount':    '995'
  804.                  }
  805.                  tclink.send(params2);
  806.                  # Unstore the ID now that we are done.
  807.                  params3 = {
  808.                          'custid':    'mycustid',
  809.                          'password':  'mypass',
  810.                          'action':    'unstore',
  811.                          'billingid': billingid
  812.                  }
  813.                  tclink.send(params3)
  814.  
  815. XII. Recurring Billing
  816.  
  817.    Recurring billing (sometimes also called "subscription billing") is an
  818.    extension of the billing ID system. There are four parameters that are
  819.    added to a store which turn the billing ID into a recurring billing ID.
  820.    They are described below.
  821.  
  822.   Recurring Parameters
  823.  
  824.    +------------------------------------------------------------------------+
  825.    | Parameter Name | Required? |                Description                |
  826.    |----------------+-----------+-------------------------------------------|
  827.    | cycle          |     X     | Repeat cycle in days, weeks, months, or   |
  828.    |                |           | years.                                    |
  829.    |----------------+-----------+-------------------------------------------|
  830.    | amount         |     X     | Amount to bill in cents.                  |
  831.    |----------------+-----------+-------------------------------------------|
  832.    | start          |           | Date to start, or else offset from        |
  833.    |                |           | current date (defaults to now).           |
  834.    |----------------+-----------+-------------------------------------------|
  835.    | payments       |           | Number of payments to make (defaults to   |
  836.    |                |           | infinite).                                |
  837.    +------------------------------------------------------------------------+
  838.  
  839.    Cycle is in the format of a number between 1 and 99 followed by a
  840.    character representing the timeframe: 'd' for days, 'w' for weeks, 'm' for
  841.    months or 'y' for years. For example, a value of "3d" in this field would
  842.    cause the charge to recur every three days, whereas a value of "2m" would
  843.    cause it to recur every two months.
  844.  
  845.    Amount is identical to the amount passed to a sale or a preauth, and
  846.    indicates the amount of each charge made during the subscription.
  847.  
  848.    Start is an optional field which allows the delay of the cycle's start. By
  849.    default, the cycle starts the day the billing ID is stored. If it is
  850.    specified in the format YYYY-MM-DD, it indicates a date when the first
  851.    payment should be made. (For example, "2005-02-01" would be February 1,
  852.    2005.) If it is in the same format as the cycle (a number followed by a
  853.    character), it indicates an offset from the current date. (For example,
  854.    "1d" would start the billing tomorrow.)
  855.  
  856.    If there is no start parameter, the first transaction is run immediately
  857.    (and can cause the store action to return a "decline" or other result you
  858.    would expect from a sale). Other return parameters associated with auths,
  859.    such as avs code, will be returned as well.
  860.  
  861.    Payments is also optional; left blank or set to zero it will continue the
  862.    billing cycle until it is manually interrupted by an unstore, or by
  863.    updating the billing ID with cycle set to "null". Once the final payment
  864.    is made, the billing ID will be unstored.
  865.  
  866.    There is only one instance in which the cycle parameter is not required,
  867.    and that is a one-time future payment. By setting payments to "1" and
  868.    passing a start date, the payment will be made on that date and then the
  869.    billing ID unstored. The cycle parameter may be included with a one-time
  870.    future payment, but it will have no effect.
  871.  
  872.   Recurring Billing Example
  873.  
  874.          params = {
  875.                  'custid':    'mycustid',
  876.                  'password':  'mypass',
  877.                  'action':    'store',
  878.                  'cc':        '4111111111111111',
  879.                  'exp':       '0404',
  880.                  'name':      'Jennifer Smith',
  881.                  'amount':    '1200'
  882.          }
  883.  
  884.          mode = chooseSubscriptionMode()
  885.  
  886.          if (mode == 1):
  887.                  # Make a payment every day, infinitely (or until someone manually disables it)
  888.                  params['cycle'] = '1d';
  889.          elif (mode == 2):
  890.                  # Make a payment once a month for one year
  891.                  params['cycle'] = '1m';
  892.                  params['payments'] = '12';
  893.          elif (mode == 3):
  894.                  # Make a payment every six weeks, starting one week from now
  895.                  params['cycle'] = '62';
  896.                  params['start'] = '1w';
  897.          elif (mode == 4):
  898.                  # Make annual payments, and don't start until September 1, 2004
  899.                  params['cycle'] = '1y';
  900.                  params['start'] = '2004-09-01';
  901.          elif (mode == 5):
  902.                  # Make a one time payment in 45 days
  903.                  params['start'] = '45d';
  904.                  params['payments'] = '1';
  905.  
  906.          tclink.send(params)
  907.  
  908. XIII. TCS Wallet
  909.  
  910.    The TCS Wallet is an additional service offered by the TrustCommerce
  911.    gateway that allows you to run many small micropayments which are later
  912.    lumped together and submitted as a single, large payment. This can offer a
  913.    substantial savings for the merchant in transaction fees, as merchant
  914.    account providers tend to penalize merchants that run small payments.
  915.  
  916.    The Wallet is an extension of the billing ID system. It adds three new
  917.    parameters to the store action, described below.
  918.  
  919.   Wallet Parameters
  920.  
  921.    +------------------------------------------------------------------------+
  922.    | Parameter Name |                      Description                      |
  923.    |----------------+-------------------------------------------------------|
  924.    | wallet         | "y" to enable the wallet.                             |
  925.    |----------------+-------------------------------------------------------|
  926.    | walletsize     | Accumulated amount, in cents, before the wallet is    |
  927.    |                | submitted for capture.                                |
  928.    |----------------+-------------------------------------------------------|
  929.    | walletexposure | Length of time to wait before capturing the wallet.   |
  930.    +------------------------------------------------------------------------+
  931.  
  932.    In order to enable wallets for the billing ID that you are storing, set
  933.    the "wallet" parameter to "y". The other two parameters are optional, as
  934.    there are default values attached to your TC account. If you wish to
  935.    change these values (which are normally $10.00 and 72 hours) please
  936.    contact TrustCommerce. If you wish to change the values for an individual
  937.    billing ID without changing your defaults, include these parameters.
  938.  
  939.    Once the billing ID is stored, it is possible to use a new action type on
  940.    the ID called walletsale. It is identical to a sale in all ways, except
  941.    that it can only be used on wallet-enabled billing IDs, and it can accept
  942.    amounts anywhere from $0.01 up to the size of the wallet. Walletsale will
  943.    usually return "approved", but it may return "decline" if the stored
  944.    credit card fails to re-authorize when the current wallet is exceeded.
  945.    Except for these two modifications (the wallet parameters on the store,
  946.    and changing sales to walletsales), there is no extra development to be
  947.    done client-side to make wallets work. Captures happen automatically after
  948.    walletexposure has expired or the walletamount has been used up;
  949.    reauthorizations also happen automatically.
  950.  
  951.   Wallet Example
  952.  
  953.          # First, store a new ID with the wallet enabled.
  954.          params = {
  955.                  'custid':    'mycustid',
  956.                  'password':  'mypass',
  957.                  'action':    'store',
  958.                  'cc':        '4111111111111111',
  959.                  'exp':       '0404',
  960.                  'name':      'Jennifer Smith',
  961.                  'wallet':    'y'
  962.          }
  963.  
  964.          result = tclink.send(params)
  965.  
  966.          if (result['status'] == 'approved'):
  967.                  # We have a new wallet at our disposal.  Run a micropayment on it.
  968.                  billingid = result['billingid']
  969.                  params2 = {
  970.                          'custid':    'mycustid',
  971.                          'password':  'mypass',
  972.                          'action':    'walletsale',
  973.                          'billingid': billingid,
  974.                          'amount':    '995'
  975.                  }
  976.                  tclink.send(params)
  977.  
  978. XIV. Purchase Level II
  979.  
  980.    Purchase Level II is required by some merchant banks to achieve a qualifed
  981.    discount rate. It is only used for B2B or B2G transactions. If you are
  982.    selling products directly to consumers, you do not need to use PL2.
  983.    Additionally, PL2 can only be used if the cardholder is using one of the
  984.    three types of commercial cards: a corporate card, a business card, or a
  985.    purchasing card.
  986.  
  987.    PL2 has three new parmaeters:
  988.  
  989.   PL2 Input Parameters
  990.  
  991.    +------------------------------------------------------------------------+
  992.    |  Parameter Name  |                     Description                     |
  993.    |------------------+-----------------------------------------------------|
  994.    | purchaselevel    | Specify as "2".                                     |
  995.    |------------------+-----------------------------------------------------|
  996.    |                  | The purchasing order number from their Visa         |
  997.    | purchaseordernum | purchasing card. This is either a 16 or a 17 digit  |
  998.    |                  | number. If they are not using a Visa purchasing     |
  999.    |                  | card, do not pass this field.                       |
  1000.    |------------------+-----------------------------------------------------|
  1001.    |                  | The amount of tax, in cents, charged for the order. |
  1002.    | tax              | If the order is tax exempt omit this field or set   |
  1003.    |                  | it to 0.                                            |
  1004.    +------------------------------------------------------------------------+
  1005.  
  1006.    A successful PL2 transaction will return one extra response parameter
  1007.  
  1008.   PL2 Output Parameter
  1009.  
  1010.    +------------------------------------------------------------------------+
  1011.    | Parameter Name |                      Description                      |
  1012.    |----------------+-------------------------------------------------------|
  1013.    | commercialcard | Set to "S" for if it is a purchasing card, "R" if it  |
  1014.    |                | is corporate card, and "B" if it is a business card.  |
  1015.    +------------------------------------------------------------------------+
  1016.  
  1017.    If you don't care what kind of card they used (which you probably don't),
  1018.    there is no reason to store or otherwise do anything with the
  1019.    commercialcard return value. TrustCommerce internally handles all the
  1020.    details for you. However, if you want this information for some reason,
  1021.    you can access it from the result parameters.
  1022.  
  1023.   Purchase Level II Example
  1024.  
  1025.          params = {
  1026.                  'custid':           'mycustid',
  1027.                  'password':         'mypass',
  1028.                  'action':           'sale',
  1029.                  'cc':               '4111111111111111',
  1030.                  'exp':              '0404',
  1031.                  'amount':           '1000'
  1032.                  'name':             'Jennifer Smith',
  1033.                  'purchaselevel':    '2'
  1034.                  'purchaseordernum': '12345678901234567'
  1035.                  'tax':              '83'    # $10.00 x 8.25% sales tax = $0.83
  1036.  
  1037.          }
  1038.  
  1039.          result = tclink.send(params)
  1040.  
  1041.          if (result['status'] == 'approved'):
  1042.                  print 'Approved'
  1043.  
  1044. XIV. Order Detail
  1045.  
  1046.    TrustCommerce offers the unique feature of automated fulfillment, by which
  1047.    orders submitted through the TCLink API can contain parameters describing
  1048.    product information. This information is then passed on to your
  1049.    fulfillment house, which ships the products automatically. Even if you
  1050.    aren't using automated fulfillment, you can use the order line item
  1051.    specification parameters to store information in the TrustCommerce
  1052.    transaction database about the type of products ordered.
  1053.  
  1054.    First, you may wish to specify the shipping address for the customer. If
  1055.    it is the same as the billing address, you need not duplicate it, but
  1056.    rather just send the shiptosame parameter set to y. The table below
  1057.    enumerates the shipping parameters.
  1058.  
  1059.   ShipTo Parameters
  1060.  
  1061.    +------------------------------------------------------------------------+
  1062.    | Parameter Name  |                     Description                      |
  1063.    |-----------------+------------------------------------------------------|
  1064.    | shiptosame      | y or n (defaults to n). If "y", then no other        |
  1065.    |                 | shipto_ parameters should be passed.                 |
  1066.    |-----------------+------------------------------------------------------|
  1067.    | shipto_name     | Name of the product recipient.                       |
  1068.    |-----------------+------------------------------------------------------|
  1069.    | shipto_address1 | First line of shipping address.                      |
  1070.    |-----------------+------------------------------------------------------|
  1071.    | shipto_address2 | Second line (if any) of shipping address.            |
  1072.    |-----------------+------------------------------------------------------|
  1073.    | shipto_city     | City.                                                |
  1074.    |-----------------+------------------------------------------------------|
  1075.    | shipto_state    | State.                                               |
  1076.    |-----------------+------------------------------------------------------|
  1077.    | shipto_zip      | Zipcode, five or nine digits (no spaces or dashes).  |
  1078.    |-----------------+------------------------------------------------------|
  1079.    | shipto_country  | Country, leave blank for US.                         |
  1080.    +------------------------------------------------------------------------+
  1081.  
  1082.    Second, some additional data about the order as a whole should be passed
  1083.    in the form of the following parameters.
  1084.  
  1085.   Order Header Parameters
  1086.  
  1087.    +------------------------------------------------------------------------+
  1088.    |  Parameter Name  |                     Description                     |
  1089.    |------------------+-----------------------------------------------------|
  1090.    | shippingcode     | Three character code indicating shipping method to  |
  1091.    |                  | use.                                                |
  1092.    |------------------+-----------------------------------------------------|
  1093.    | shippinghandling | The total cost of shipping and handling, in cents.  |
  1094.    |------------------+-----------------------------------------------------|
  1095.    | numitems         | Total number of distinct items (product codes) in   |
  1096.    |                  | the order.                                          |
  1097.    +------------------------------------------------------------------------+
  1098.  
  1099.    Finally, a number of parameters which describe the details of each type of
  1100.    item must be passed. In the table below, the 'X' character in the
  1101.    parameter name should be replaced with a digit indicating which item it
  1102.    applies to. For example, if numitems is set to three, then you should pass
  1103.    three product codes, in the form of productcode1, productcode2, and
  1104.    productcode3.
  1105.  
  1106.   Order Detail Parameters
  1107.  
  1108.    +------------------------------------------------------------------------+
  1109.    |  Parameter Name   |                    Description                     |
  1110.    |-------------------+----------------------------------------------------|
  1111.    | productcodeX      | The alphanumeric product code defined by the       |
  1112.    |                   | fulfillment house.                                 |
  1113.    |-------------------+----------------------------------------------------|
  1114.    | quantityX         | The number of items of this type to be shipped.    |
  1115.    |-------------------+----------------------------------------------------|
  1116.    | priceX            | The price of all items of this type not including  |
  1117.    |                   | sales tax or shipping, in cents.                   |
  1118.    |-------------------+----------------------------------------------------|
  1119.    | taxX              | Total tax charged for all items of this product    |
  1120.    |                   | code.                                              |
  1121.    |-------------------+----------------------------------------------------|
  1122.    | shippinghandlingX | Total shipping and handling charged for all items  |
  1123.    |                   | of this product code.                              |
  1124.    +------------------------------------------------------------------------+
  1125.  
  1126.    Please note: the shippinghandling field and the shippinghandlingX fields
  1127.    are mutually exclusive. Use one or the other, but not both. If you're not
  1128.    sure which to use, please contact your fulfillment house.
  1129.  
  1130.   Fulfillment Example
  1131.  
  1132.          params = {
  1133.                  'custid':           'mycustid',
  1134.                  'password':         'mypass',
  1135.                  'action':           'preauth',
  1136.                  'cc':               '4111111111111111',
  1137.                  'exp':              '0404',
  1138.                  'amount':           '1979',  # Total of items, tax, and shipping
  1139.                  'name':             'Jennifer Smith',
  1140.                  'address1':         '123 Test St.',
  1141.                  'city':             'Somewhere',
  1142.                  'state':            'CA',
  1143.                  'zip':              '90001',
  1144.                  'shiptosame':       'y',     # Shipping address is same as billing address
  1145.  
  1146.                  'numitems':         '2',     # Two total product codes will be described
  1147.                  'shippingcode':     'OVRNGT',
  1148.                  'shippinghandling': '695',
  1149.  
  1150.                  'productcode1':     'PCODE1',
  1151.                  'quantity1':        '3',
  1152.                  'price1':           '600',   # Item 1 costs $2.00, and there are 3 of them
  1153.                  'tax1':             '144',   # Tax of 8%
  1154.  
  1155.                  'productcode2':     'PCODE2',
  1156.                  'quantity2':        '1',
  1157.                  'price2':           '500',   # Item 1 costs $5.00, there's only one
  1158.                  'tax2':             '40'     # Tax of 8%
  1159.          }
  1160.  
  1161.          tclink.send(params)
  1162.  
  1163. XVI. Vault Query API
  1164.  
  1165.    The Vault website serves as a web-based interface for merchant
  1166.    reconciliation. On the backend, it is a complex database that tracks all
  1167.    transactional data for your TrustCommerce account. The information
  1168.    contained in the Vault can be accessed at the API level using a standard
  1169.    CGI query over HTTPS.
  1170.  
  1171.    The query API returns data in CSV (comma separated value) format, which is
  1172.    just a flat text file with fields separated by commas, and records
  1173.    separated by newlines. (You can also request the data returned in an HTML
  1174.    table, which is useful for debugging.) The first line of the file contains
  1175.    the name of each field that will be returned in subsequent records.
  1176.  
  1177.    The parameters that the query interface accepts are described in the table
  1178.    below.
  1179.  
  1180.   Required Parameters
  1181.  
  1182.    +------------------------------------------------------------------------+
  1183.    | Parameter Name | Requred? |                Description                 |
  1184.    |----------------+----------+--------------------------------------------|
  1185.    | custid         |    X     | TrustCommerce customer ID number.          |
  1186.    |----------------+----------+--------------------------------------------|
  1187.    | password       |    X     | The password for your custID.              |
  1188.    |----------------+----------+--------------------------------------------|
  1189.    |                |          | Set to "html" for human-readable HTML      |
  1190.    | format         |          | output, or "text" (default) for CSV text   |
  1191.    |                |          | output.                                    |
  1192.    |----------------+----------+--------------------------------------------|
  1193.    |                |          | Possible values are: chain, transaction,   |
  1194.    |                |          | summary, or billingid, corresponding to    |
  1195.    | querytype      |    X     | the equivalent reports on the Vault        |
  1196.    |                |          | website. Read the User's Guide for further |
  1197.    |                |          | description of each report type.           |
  1198.    |----------------+----------+--------------------------------------------|
  1199.    | media          |          | Set to "cc" (default) or "ach" for media   |
  1200.    |                |          | type.                                      |
  1201.    |----------------+----------+--------------------------------------------|
  1202.    | begindate      |          | Begin date for query, format: MM-DD-YYYY   |
  1203.    |                |          | HH:MM:SS                                   |
  1204.    |----------------+----------+--------------------------------------------|
  1205.    | enddate        |          | End date for query, format: MM-DD-YYYY     |
  1206.    |                |          | HH:MM:SS                                   |
  1207.    |----------------+----------+--------------------------------------------|
  1208.    | chain          |          | Narrow search to a single chain of         |
  1209.    |                |          | transactions.                              |
  1210.    |----------------+----------+--------------------------------------------|
  1211.    | transid        |          | Narrow search to a single transaction ID.  |
  1212.    |----------------+----------+--------------------------------------------|
  1213.    | billingid      |          | Narrow search to a single billing ID.      |
  1214.    |----------------+----------+--------------------------------------------|
  1215.    |                |          | Use 'y' or 'n'. For billing ID search.     |
  1216.    | pastdue        |          | Show only recurring billing IDs that have  |
  1217.    |                |          | been unable to capture the requested       |
  1218.    |                |          | funds.                                     |
  1219.    |----------------+----------+--------------------------------------------|
  1220.    | action         |          | Narrow search by action (preauth, sale,    |
  1221.    |                |          | credit, etc).                              |
  1222.    |----------------+----------+--------------------------------------------|
  1223.    | status         |          | Narrow search by status (approved,         |
  1224.    |                |          | accepted, decline, etc).                   |
  1225.    |----------------+----------+--------------------------------------------|
  1226.    | name           |          | Narrow search by cardholder name, partial  |
  1227.    |                |          | or complete.                               |
  1228.    |----------------+----------+--------------------------------------------|
  1229.    | cc             |          | Narrow search by credit card number.       |
  1230.    |----------------+----------+--------------------------------------------|
  1231.    | limit          |          | Do not allow size of result set to exceed  |
  1232.    |                |          | this number of records.                    |
  1233.    |----------------+----------+--------------------------------------------|
  1234.    |                |          | Report result set starting from this       |
  1235.    | offset         |          | offset. Use this parameter in conjunction  |
  1236.    |                |          | with limit in order to page through a      |
  1237.    |                |          | large result set.                          |
  1238.    |----------------+----------+--------------------------------------------|
  1239.    | showcount      |          | Show the number of records returned on the |
  1240.    |                |          | last line of the result set.               |
  1241.    +------------------------------------------------------------------------+
  1242.  
  1243.    The sample HTML code shown below illustrates the functionality of the
  1244.    query API. It can be pasted into a file and loaded on your web browser in
  1245.    order to try out some queries before you even begin to write your code.
  1246.  
  1247.   Query Example HTML
  1248.  
  1249.  <html>
  1250.  <head> <title> TrustCommerce Query Interface </title> </head>
  1251.  <body>
  1252.  <h2> TrustCommerce Query Interface </h2>
  1253.  <form action=https://vault.trustcommerce.com/query/>
  1254.          <table align=center border=1>
  1255.          <tr>
  1256.                  <td> custid </td>
  1257.                  <td> <input type=text name=custid> </td>
  1258.                  <td> This is your TrustCommerce custid (required) </td>
  1259.          </tr>
  1260.          <tr>
  1261.                  <td> password </td>
  1262.                  <td> <input type=password name=password> </td>
  1263.                  <td> This is your TrustCommerce password (required) </td>
  1264.          </tr>
  1265.          <tr>
  1266.                  <td> format </td>
  1267.                  <td> <select name=format> <option value=text>text</option>
  1268.                                  <option value=html>html</option></select></td>
  1269.                  <td> Human readable (html) or computer readable (text) results</td>
  1270.          </tr>
  1271.          <tr>
  1272.                  <td> Query type </td>
  1273.                  <td> <select name=querytype>
  1274.                  <option value=chain>chain</option>
  1275.                  <option value=transaction>transaction</option>
  1276.                  <option value=summary>summary</option>
  1277.                  <option value=billingid>billingid</option>
  1278.                  </select></td>
  1279.                  <td> Type of query </td>
  1280.          </tr>
  1281.          <tr>
  1282.                  <td> media </td>
  1283.                  <td> <input type=text name=media value=cc> </td>
  1284.                  <td> For now this must be cc </td>
  1285.          </tr>
  1286.          <tr>
  1287.                  <td> begindate MM-DD-YYYY HH:MM:SS </td>
  1288.                  <td> <input type=text name=begindate> </td>
  1289.                  <td> Query begins at this date</td>
  1290.          </tr>
  1291.          <tr>
  1292.                  <td> enddate MM-DD-YYYY HH:MM:SS </td>
  1293.                  <td> <input type=text name=enddate> </td>
  1294.                  <td> Query ends at this date</td>
  1295.          </tr>
  1296.          <tr>
  1297.                  <td> chain </td>
  1298.                  <td> <input type=text name=chain> </td>
  1299.                  <td> Narrow search to a single chain of transactions </td>
  1300.          </tr>
  1301.          <tr>
  1302.                  <td> transid </td>
  1303.                  <td> <input type=text name=transid> </td>
  1304.                  <td> Narrow search to a single transactions </td>
  1305.          </tr>
  1306.          <tr>
  1307.                  <td> billingid </td>
  1308.                  <td> <input type=text name=transid> </td>
  1309.                  <td> Narrow search to a single billingid </td>
  1310.          </tr>
  1311.          <tr>
  1312.                  <td> pastdue </td>
  1313.                  <td> <select name=pastdue>
  1314.                  <option value=y>y</option>
  1315.                  <option value=n>n</option>
  1316.                  </select></td>
  1317.                  <td> Use 'y' or 'n'. For billing ID search.  Show only recurring billing IDs
  1318.                       that have been unable to capture the requested funds. </td>
  1319.          </tr>
  1320.          <tr>
  1321.                  <td> action </td>
  1322.                  <td> <input type=text name=action> </td>
  1323.                  <td> Narrow search by action. (example: preauth,postauth) </td>
  1324.          </tr>
  1325.          <tr>
  1326.                  <td> status </td>
  1327.                  <td> <input type=text name=status> </td>
  1328.                  <td> Narrow search by status. (example: approved,accepted) </td>
  1329.          </tr>
  1330.          <tr>
  1331.                  <td> name </td>
  1332.                  <td> <input type=text name=name> </td>
  1333.                  <td> Narrow search by name. </td>
  1334.          </tr>
  1335.          <tr>
  1336.                  <td> cc </td>
  1337.                  <td> <input type=text name=cc> </td>
  1338.                  <td> Narrow search by credit card field. </td>
  1339.          </tr>
  1340.          <tr>
  1341.                  <td> limit </td>
  1342.                  <td> <input type=text name=limit value=20> </td>
  1343.                  <td> Limit results to this number of fields (not used for summary)</td>
  1344.          </tr>
  1345.          <tr>
  1346.                  <td> offset </td>
  1347.                  <td> <input type=text name=offset value=0> </td>
  1348.                  <td> Report results at this offset (used with limit to page through results)</td>
  1349.          </tr>
  1350.          <tr>
  1351.                  <td> showcount </td>
  1352.                  <td> <select name=showcount>
  1353.                  <option value=y>yes</option>
  1354.                  <option value=n>no</option>
  1355.                  </select></td>
  1356.                  <td> Show the number of not-limited rows on the last line of the result</td>
  1357.          </tr>
  1358.          <tr>
  1359.                  <td colspan=3> <input type=submit> </td>
  1360.          </tr>
  1361.          </table>
  1362.  </form>
  1363.  </body>
  1364.  </html>
  1365.  
  1366. Appendix A - Test Data
  1367.  
  1368.    While testing, you may wish to experiment with the different responses
  1369.    that the gateway can generate. The following test card numbers will
  1370.    produce an approval, and have address data as listed, for testing AVS. If
  1371.    you wish to test CVV, the code listed int he right-hand column is the
  1372.    correct CVV code, Other valid credit cards will work, but will produce a
  1373.    'U' AVS code.
  1374.  
  1375.    Please note: these cards ONLY work on transactions flagged as demo, or
  1376.    while your account is in "test" mode! For a live transaction, they will
  1377.    all return a decline with a declinetype of carderror.
  1378.  
  1379.   Test Cards - Approved
  1380.  
  1381.    +------------------------------------------------------------------------+
  1382.    |Card Type |  Card Number   | Exp |Address |   City    |State| Zip  |CVV |
  1383.    |----------+----------------+-----+--------+-----------+-----+------+----|
  1384.    |Visa      |4111111111111111|04/04|123 Test|Somewhere  |CA   |90001 |123 |
  1385.    |          |                |     |St.     |           |     |      |    |
  1386.    |----------+----------------+-----+--------+-----------+-----+------+----|
  1387.    |Mastercard|5411111111111115|04/04|4000    |Anytown    |AZ   |85001 |777 |
  1388.    |          |                |     |Main St.|           |     |      |    |
  1389.    |----------+----------------+-----+--------+-----------+-----+------+----|
  1390.    |American  |                |     |12      |           |     |      |    |
  1391.    |Express   |341111111111111 |04/04|Colorado|Elsewhere  |IL   |54321 |4000|
  1392.    |          |                |     |Blvd.   |           |     |      |    |
  1393.    |----------+----------------+-----+--------+-----------+-----+------+----|
  1394.    |          |                |     |6789    |           |     |      |    |
  1395.    |Discover  |6011111111111117|04/04|Green   |Nowhere    |MA   |12345 |-   |
  1396.    |          |                |     |Ave.    |           |     |      |    |
  1397.    |----------+----------------+-----+--------+-----------+-----+------+----|
  1398.    |Diner's   |                |     |7390 Del|           |     |      |    |
  1399.    |Club      |36484444444446  |04/04|Mar     |Atown      |NY   |01101 |-   |
  1400.    |          |                |     |Blvd.   |           |     |      |    |
  1401.    |----------+----------------+-----+--------+-----------+-----+------+----|
  1402.    |          |                |     |350     |           |     |      |    |
  1403.    |JCB       |213122222222221 |04/04|Madison |Springfield|OH   |400000|-   |
  1404.    |          |                |     |Ave.    |           |     |      |    |
  1405.    +------------------------------------------------------------------------+
  1406.  
  1407.    The following card numbers will generate a decline, with the declinetype
  1408.    listed as follows. You may use this to test code which takes different
  1409.    paths dependant upon the type of decline.
  1410.  
  1411.   Test Cards - Declined
  1412.  
  1413.                    +----------------------------------------+
  1414.                    |   Card Number    |  Exp  | DeclineType |
  1415.                    |------------------+-------+-------------|
  1416.                    | 4012345678909    | 04/04 | decline     |
  1417.                    |------------------+-------+-------------|
  1418.                    | 5555444433332226 | 04/04 | call        |
  1419.                    |------------------+-------+-------------|
  1420.                    | 4444111144441111 | 04/04 | carderror   |
  1421.                    +----------------------------------------+
  1422.  
  1423.    You should also test your code to make sure it properly handles all
  1424.    baddata and error cases as listed in section X. Simply pass bad values in
  1425.    order to generate these situations.
  1426.  
  1427. Appendix B - Troubleshooting
  1428.  
  1429.    Details about installing and troubleshooting TCLink specific to your
  1430.    development platform can be found in the documentation included with the
  1431.    TCLink archive.
  1432.  
  1433.    Once you are able to connect to the TC gateway, you should be able to
  1434.    diagnose parameter-related issues using the status, error, declinetype,
  1435.    and errortype parameters returned by the gateway. There is one response
  1436.    which indicates a more generic error, and that's an error of cantconnect.
  1437.    First, check the computer's network connection; can you ping machines on
  1438.    the Internet, by IP or by name?
  1439.  
  1440.    The most common network connectivity error is that your target computer
  1441.    may be behind a firewall. TCLink uses the HTTPS port (443/tcp) for network
  1442.    communications; you can check whether this port is open from the target
  1443.    machine by typing "telnet vault.trustcommerce.com 443" at a UNIX command
  1444.    prompt, or else by loading a web browser on the target machine and
  1445.    attempting to visit https://vault.trustcommerce.com directly. If you
  1446.    timeout attempting to make the connection, but your Internet connection is
  1447.    working otherwise, then you may be firewalled. Speak to your network
  1448.    administrator about allowing outbound TCP traffic on port 443.
  1449.  
  1450.    Another common problem is the lack of domain name (DNS) resolution. In
  1451.    some cases this will result in an errortype dnsfailure. (Not always; the
  1452.    TCLink software will sometimes fall back to hardcoded IP addresses for
  1453.    established accounts. But this method is insecure and error-prone, and is
  1454.    used only as a last resort to keep a system with temporary DNS issues up
  1455.    and running during the outage.) The target machine must be able to resolve
  1456.    the trustcommerce.com domain; try typing "host trustcommerce.com" from a
  1457.    UNIX command prompt. If you don't get a response, or get an error, then
  1458.    the machine cannot resolve DNS information and TCLink will not be able to
  1459.    connect to the TC gateway. Speak to your sysadmin about making domain name
  1460.    resolution available to your target host.
  1461.  
  1462. Appendix C - Connecting via HTTPS POST
  1463.  
  1464.    This method should only be used if a TCLink client install is not an
  1465.    option. It does not have the failover capability (and thus the processing
  1466.    uptime is not guaranteed to be 100%), or some of the enhanced security
  1467.    features of TCLink. In addition, transactions may be slightly slower, by
  1468.    an extra half second or so. It does, however support all other features
  1469.    available through TCLink, including all parameters and transaction types.
  1470.  
  1471.    This is the URL:
  1472.  
  1473.    https://vault.trustcommerce.com/trans/
  1474.  
  1475.    The transaction should be sent as a standard POST, with CGI parameters,
  1476.    URL encoded. The parameters are otherwise identical to those used through
  1477.    TCLink.
  1478.  
  1479.    Response parameters are returned as name-value pairs separated by
  1480.    newlines.
  1481.  
  1482. Appendix D - Currency Table
  1483.  
  1484.   Currency Codes
  1485.  
  1486.    +-----------------------------------------------------------------------+
  1487.    | Code |       Currency Type       | Code |        Currency Type        |
  1488.    |------+---------------------------+------+-----------------------------|
  1489.    | usd  | US Dollars                | jpy  | Japan Yen                   |
  1490.    |------+---------------------------+------+-----------------------------|
  1491.    | eur  | Euro                      | jod  | Jordan Dinar                |
  1492.    |------+---------------------------+------+-----------------------------|
  1493.    | cad  | Canadian Dollars          | krw  | Korea (South) Won           |
  1494.    |------+---------------------------+------+-----------------------------|
  1495.    | gbp  | UK Pounds                 | lbp  | Lebanon Pounds              |
  1496.    |------+---------------------------+------+-----------------------------|
  1497.    | dem  | German Deutschemarks      | luf  | Luxembourg Francs           |
  1498.    |------+---------------------------+------+-----------------------------|
  1499.    | frf  | French Francs             | myr  | Malaysia Ringgit            |
  1500.    |------+---------------------------+------+-----------------------------|
  1501.    | jpy  | Japanese Yen              | mxp  | Mexico Pesos                |
  1502.    |------+---------------------------+------+-----------------------------|
  1503.    | nlg  | Dutch Guilders            | nlg  | Netherlands Guilders        |
  1504.    |------+---------------------------+------+-----------------------------|
  1505.    | itl  | Italian Lira              | nzd  | New Zealand Dollars         |
  1506.    |------+---------------------------+------+-----------------------------|
  1507.    | chf  | Switzerland Francs        | nok  | Norway Kroner               |
  1508.    |------+---------------------------+------+-----------------------------|
  1509.    | dzd  | Algeria Dinars            | pkr  | Pakistan Rupees             |
  1510.    |------+---------------------------+------+-----------------------------|
  1511.    | arp  | Argentina Pesos           | xpd  | Palladium Ounces            |
  1512.    |------+---------------------------+------+-----------------------------|
  1513.    | aud  | Australia Dollars         | php  | Philippines Pesos           |
  1514.    |------+---------------------------+------+-----------------------------|
  1515.    | ats  | Austria Schillings        | xpt  | Platinum Ounces             |
  1516.    |------+---------------------------+------+-----------------------------|
  1517.    | bsd  | Bahamas Dollars           | plz  | Poland Zloty                |
  1518.    |------+---------------------------+------+-----------------------------|
  1519.    | bbd  | Barbados Dollars          | pte  | Portugal Escudo             |
  1520.    |------+---------------------------+------+-----------------------------|
  1521.    | bef  | Belgium Francs            | rol  | Romania Leu                 |
  1522.    |------+---------------------------+------+-----------------------------|
  1523.    | bmd  | Bermuda Dollars           | rur  | Russia Rubles               |
  1524.    |------+---------------------------+------+-----------------------------|
  1525.    | brr  | Brazil Real               | sar  | Saudi Arabia Riyal          |
  1526.    |------+---------------------------+------+-----------------------------|
  1527.    | bgl  | Bulgaria Lev              | xag  | Silver Ounces               |
  1528.    |------+---------------------------+------+-----------------------------|
  1529.    | cad  | Canada Dollars            | sgd  | Singapore Dollars           |
  1530.    |------+---------------------------+------+-----------------------------|
  1531.    | clp  | Chile Pesos               | skk  | Slovakia Koruna             |
  1532.    |------+---------------------------+------+-----------------------------|
  1533.    | cny  | China Yuan Renmimbi       | zar  | South Africa Rand           |
  1534.    |------+---------------------------+------+-----------------------------|
  1535.    | cyp  | Cyprus Pounds             | krw  | South Korea Won             |
  1536.    |------+---------------------------+------+-----------------------------|
  1537.    | csk  | Czech Republic Koruna     | esp  | Spain Pesetas               |
  1538.    |------+---------------------------+------+-----------------------------|
  1539.    | dkk  | Denmark Kroner            | xdr  | Special Drawing Right (IMF) |
  1540.    |------+---------------------------+------+-----------------------------|
  1541.    | nlg  | Dutch Guilders            | sdd  | Sudan Dinar                 |
  1542.    |------+---------------------------+------+-----------------------------|
  1543.    | xcd  | Eastern Caribbean Dollars | sek  | Sweden Krona                |
  1544.    |------+---------------------------+------+-----------------------------|
  1545.    | egp  | Egypt Pounds              | chf  | Switzerland Francs          |
  1546.    |------+---------------------------+------+-----------------------------|
  1547.    | eur  | Euro                      | twd  | Taiwan Dollars              |
  1548.    |------+---------------------------+------+-----------------------------|
  1549.    | fjd  | Fiji Dollars              | thb  | Thailand Baht               |
  1550.    |------+---------------------------+------+-----------------------------|
  1551.    | fim  | Finland Markka            | ttd  | Trinidad and Tobago Dollars |
  1552.    |------+---------------------------+------+-----------------------------|
  1553.    | frf  | France Francs             | trl  | Turkey Lira                 |
  1554.    |------+---------------------------+------+-----------------------------|
  1555.    | dem  | Germany Deutsche Marks    | gbp  | United Kingdom Pounds       |
  1556.    |------+---------------------------+------+-----------------------------|
  1557.    | xau  | Gold Ounces               | usd  | United States Dollars       |
  1558.    |------+---------------------------+------+-----------------------------|
  1559.    | grd  | Greece Drachmas           | veb  | Venezuela Bolivar           |
  1560.    |------+---------------------------+------+-----------------------------|
  1561.    | hkd  | Hong Kong Dollars         | zmk  | Zambia Kwacha               |
  1562.    |------+---------------------------+------+-----------------------------|
  1563.    | huf  | Hungary Forint            | eur  | Euro                        |
  1564.    |------+---------------------------+------+-----------------------------|
  1565.    | isk  | Iceland Krona             | xcd  | Eastern Caribbean Dollars   |
  1566.    |------+---------------------------+------+-----------------------------|
  1567.    | inr  | India Rupees              | xdr  | Special Drawing Right (IMF) |
  1568.    |------+---------------------------+------+-----------------------------|
  1569.    | idr  | Indonesia Rupiah          | xag  | Silver Ounces               |
  1570.    |------+---------------------------+------+-----------------------------|
  1571.    | iep  | Ireland Punt              | xau  | Gold Ounces                 |
  1572.    |------+---------------------------+------+-----------------------------|
  1573.    | ils  | Israel New Shekels        | xpd  | Palladium Ounces            |
  1574.    |------+---------------------------+------+-----------------------------|
  1575.    | itl  | Italy Lira                | xpt  | Platinum Ounces             |
  1576.    |------+---------------------------+------+-----------------------------|
  1577.    | jmd  | Jamaica Dollars           |      |                             |
  1578.    +-----------------------------------------------------------------------+
  1579.  
  1580. Appendix E - Input Field List
  1581.  
  1582.   Input Fields
  1583.  
  1584.         +--------------------------------------------------------------+
  1585.         |       Name        |  Type  | Minimum Length | Maximum Length |
  1586.         |-------------------+--------+----------------+----------------|
  1587.         | custid            | string | 1              | 20             |
  1588.         |-------------------+--------+----------------+----------------|
  1589.         | password          | string | 1              | 20             |
  1590.         |-------------------+--------+----------------+----------------|
  1591.         | action            | string | 1              | 10             |
  1592.         |-------------------+--------+----------------+----------------|
  1593.         | media             | string | 1              | 10             |
  1594.         |-------------------+--------+----------------+----------------|
  1595.         | currency          | string | 3              | 3              |
  1596.         |-------------------+--------+----------------+----------------|
  1597.         | amount            | number | 3              | 8              |
  1598.         |-------------------+--------+----------------+----------------|
  1599.         | cc                | number | 13             | 16             |
  1600.         |-------------------+--------+----------------+----------------|
  1601.         | exp               | number | 4              | 4              |
  1602.         |-------------------+--------+----------------+----------------|
  1603.         | cvv               | number | 3              | 4              |
  1604.         |-------------------+--------+----------------+----------------|
  1605.         | routing           | number | 9              | 9              |
  1606.         |-------------------+--------+----------------+----------------|
  1607.         | account           | number | 3              | 17             |
  1608.         |-------------------+--------+----------------+----------------|
  1609.         | billingid         | string | 6              | 6              |
  1610.         |-------------------+--------+----------------+----------------|
  1611.         | verify            | string | 1              | 1              |
  1612.         |-------------------+--------+----------------+----------------|
  1613.         | transid           | string | 14             | 14             |
  1614.         |-------------------+--------+----------------+----------------|
  1615.         | avs               | string | 1              | 10             |
  1616.         |-------------------+--------+----------------+----------------|
  1617.         | name              | string | 1              | 60             |
  1618.         |-------------------+--------+----------------+----------------|
  1619.         | address1          | string | 1              | 80             |
  1620.         |-------------------+--------+----------------+----------------|
  1621.         | address2          | string | 1              | 80             |
  1622.         |-------------------+--------+----------------+----------------|
  1623.         | zip               | string | 1              | 20             |
  1624.         |-------------------+--------+----------------+----------------|
  1625.         | city              | string | 1              | 40             |
  1626.         |-------------------+--------+----------------+----------------|
  1627.         | state             | string | 1              | 20             |
  1628.         |-------------------+--------+----------------+----------------|
  1629.         | country           | string | 1              | 20             |
  1630.         |-------------------+--------+----------------+----------------|
  1631.         | phone             | string | 1              | 30             |
  1632.         |-------------------+--------+----------------+----------------|
  1633.         | email             | string | 1              | 50             |
  1634.         |-------------------+--------+----------------+----------------|
  1635.         | track1            | string | 1              | 79             |
  1636.         |-------------------+--------+----------------+----------------|
  1637.         | track2            | string | 1              | 40             |
  1638.         |-------------------+--------+----------------+----------------|
  1639.         | ticket            | string | 1              | 30             |
  1640.         |-------------------+--------+----------------+----------------|
  1641.         | operator          | string | 1              | 20             |
  1642.         |-------------------+--------+----------------+----------------|
  1643.         | shiptosame        | string | 1              | 1              |
  1644.         |-------------------+--------+----------------+----------------|
  1645.         | shipto_name       | string | 1              | 60             |
  1646.         |-------------------+--------+----------------+----------------|
  1647.         | shipto_address1   | string | 1              | 40             |
  1648.         |-------------------+--------+----------------+----------------|
  1649.         | shipto_address2   | string | 1              | 20             |
  1650.         |-------------------+--------+----------------+----------------|
  1651.         | shipto_city       | string | 1              | 20             |
  1652.         |-------------------+--------+----------------+----------------|
  1653.         | shipto_state      | string | 2              | 2              |
  1654.         |-------------------+--------+----------------+----------------|
  1655.         | shipto_zip        | string | 1              | 20             |
  1656.         |-------------------+--------+----------------+----------------|
  1657.         | shipto_country    | string | 1              | 20             |
  1658.         |-------------------+--------+----------------+----------------|
  1659.         | numitems          | number | 1              | 3              |
  1660.         |-------------------+--------+----------------+----------------|
  1661.         | price             | string | 1              | 20             |
  1662.         |-------------------+--------+----------------+----------------|
  1663.         | shippingcode      | string | 1              | 20             |
  1664.         |-------------------+--------+----------------+----------------|
  1665.         | shippinghandling  | string | 1              | 20             |
  1666.         |-------------------+--------+----------------+----------------|
  1667.         | productcode#      | string | 1              | 20             |
  1668.         |-------------------+--------+----------------+----------------|
  1669.         | quantity#         | number | 1              | 3              |
  1670.         |-------------------+--------+----------------+----------------|
  1671.         | price#            | number | 1              | 6              |
  1672.         |-------------------+--------+----------------+----------------|
  1673.         | tax#              | number | 1              | 6              |
  1674.         |-------------------+--------+----------------+----------------|
  1675.         | shippinghandling# | number | 1              | 6              |
  1676.         |-------------------+--------+----------------+----------------|
  1677.         | wallet            | string | 1              | 1              |
  1678.         |-------------------+--------+----------------+----------------|
  1679.         | walletsize        | string | 3              | 8              |
  1680.         |-------------------+--------+----------------+----------------|
  1681.         | walletexposure    | string | 1              | 3              |
  1682.         |-------------------+--------+----------------+----------------|
  1683.         | start             | string | 2              | 10             |
  1684.         |-------------------+--------+----------------+----------------|
  1685.         | cycle             | string | 2              | 4              |
  1686.         |-------------------+--------+----------------+----------------|
  1687.         | payments          | number | 1              | 4              |
  1688.         |-------------------+--------+----------------+----------------|
  1689.         | demo              | string | 1              | 1              |
  1690.         |-------------------+--------+----------------+----------------|
  1691.         | offlineauthcode   | string | 6              | 6              |
  1692.         +--------------------------------------------------------------+
  1693.  
  1694.      ----------------------------------------------------------------------
  1695.  
  1696.                         Copyright (c) 2003 TrustCommerce
  1697.