home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ccvuser.h < prev    next >
Text File  |  1994-11-09  |  11KB  |  192 lines

  1. /* ------------------------------------------------------------------ */
  2. /* This information contained within this file is the intellectual    */
  3. /* property of:                                                       */
  4. /*                                                                    */
  5. /* At Your Fingertips Informational Systems, Inc.                     */
  6. /* 23325 Haynes                                                       */
  7. /* Farmington Hills, MI 48336                                         */
  8. /* (810) 471-1585                                                     */
  9. /*                                                                    */
  10. /* (C) Copyright 1994, At Your Fingertips Informational Systems, Inc. */
  11. /* All rights reserved.                                               */
  12. /* ------------------------------------------------------------------ */
  13.  
  14.  
  15. /* ------------------------------------------------------------------ */
  16. /* Define the Transaction Types                                       */
  17. /* ------------------------------------------------------------------ */
  18. #define APPROVAL               1
  19. #define INCREMENTAL            2
  20. #define PARTIALREVERSAL        3
  21. #define SALE                   5
  22. #define CREDIT                 6
  23. #define TEST                   7
  24. #define CHECKAPPROVAL          8
  25. #define SETTLEMENT             9
  26.  
  27. /* ------------------------------------------------------------------ */
  28. /* Define the Credit Card Validation Structure                        */
  29. /* ------------------------------------------------------------------ */
  30. typedef  struct CCVUSER
  31. {
  32.     SHORT TransactionType;             /* 1 - Approval                              */
  33.                                        /* 2 - Incremental Request                   */
  34.                                        /* 3 - Partial Reversal                      */
  35.                                        /* 4 - Reserved                              */
  36.                                        /* 5 - Sale                                  */
  37.                                        /* 6 - Credit                                */
  38.                                        /* 7 - Test                                  */
  39.                                        /* 8 - Check Approval                        */
  40.                                        /* 9 - Settlement                            */
  41.  
  42.     union CreditCard                   /* Transaction types 1-6                        */
  43.     {
  44.         CHAR   *CardInfo;              /* Pointer to Card Number, Field Separator, and
  45.                                                         exp date  OR  Stripe Data */
  46.         CHAR   TransactionDate[4];     /* MMDD / '0000' for Todays Date           */
  47.         CHAR   InvoiceNumber[10];      /* User-reference field */
  48.         double TipAmount[7];           /* Subset of Amount identified as gratuity */
  49.         double Amount[7];              /* Total final transaction amount, including
  50.                                           tip, if any. */
  51.         BYTE   CustomerPresentFlag;    /* '0' - Customer persent */
  52.                                        /* '1' - Customer not present  */
  53.         BYTE   TerminalCapability;     /* '0' - POS system has magstripe
  54.                                         reader/equipment */
  55.                                        /* '3' - POS system has no magstripe
  56.                                           reader/equipment */
  57.         /* -------------------- Responses -------------------------- */
  58.         CHAR HostErrorCode[2];        /* '00'                                      */
  59.         CHAR ResponseCode[2];         /* 'AA' - Approved                           */
  60.                                       /* 'ND' - Declined                           */
  61.                                       /* 'NR' - Referred (Call Voice Center)       */
  62.         CHAR AuthorizationCode[6];    /* Present only with 'AA' response           */
  63.     } CreditCard;
  64.  
  65.  
  66.  
  67.     union CheckApprovalRequest         /* Transaction type '8'                       */
  68.     {
  69.         CHAR   IDType[2];              /* '00'-'99' verified valid per Check
  70.                                           ID Table                                   */
  71.         CHAR   Number[24];             /* Left justified, spaced filled; no
  72.                                           imbedded spaces or symbols NOTE:
  73.                                           should this data reach a length greater
  74.                                           than 19 digits, any submitted Check
  75.                                           Sequence Number will be ignored.           */
  76.         CHAR   DateofBirth[6];         /* '000000' or 'MMDDYY'                       */
  77.         double Amount[7];
  78.         CHAR   CheckSequenceNum[4];    /* nnnn', as found on check. ('0000' is
  79.                                           valid, and will be treated as if no
  80.                                           sequence number was submitted.  */
  81.         /* -------------------- Responses ----------------------------- */
  82.         CHAR HostErrorCode[2];       /* '00' means no error             */
  83.         CHAR Response[24];           /* Host generated response text    */
  84.     } CheckApprovalRequest;
  85.  
  86.  
  87.     struct ExtendedData
  88.     {
  89.         SHORT ExtendedCode;           /* 0  No extended data
  90.                                          4  (Lodging Data)
  91.                                          6  (Auto Rental)
  92.                                          1  (Fleet Data)
  93.                                         12  (Address Verification)          */
  94.  
  95.         union Lodging
  96.         {
  97.             BYTE PrimaryChargeType;       /* '1' = Lodging                  */
  98.                                           /* '2' = Restaurant               */
  99.                                           /* '3' = Gift Shop                */
  100.             CHAR CheckInDate[6];          /* MMDDYY (zeroes if not Primary Charge Type 1) */
  101.             CHAR CheckOutDate[6];         /* MMDDYY (zeroes if not Primary Charge Type 1) */
  102.             BYTE SpecialProgramCode;      /* '1'=No Special Code */
  103.                                           /* '2'=Assured Reservation/No Show */
  104.                                           /* '3'=Advance Deposit */
  105.                                           /* '4'=Delayed Charge */
  106.                                           /* '5'=Express Check Out Service */
  107.                                           /* '6'=Assured Reservation/Normal */
  108.                                           /* '0'=Not Primary Charge Type 1 */
  109.             CHAR ExtraChargeCode[5];      /* Up to 6 1-digit codes, each a partial or
  110.                                              complete explanation of why charged amount
  111.                                              differs from receipt cardholder received
  112.                                              at checkout:
  113.                                              '0'-No extra/Filler
  114.                                              '2'-Restaurant
  115.                                              '3'-Gift Shop
  116.                                              '4'-MiniBar
  117.                                              '5'-Telephone
  118.                                              '7'-Laundry
  119.                                              '6'-Other Reasons */
  120.         } Lodging;
  121.  
  122.  
  123.         union AutoRental
  124.         {
  125.             CHAR RentalAgreementNum[9];   /* Contract invoice reference */
  126.             CHAR AuditAdjustment[7];      /* Charges added after check in */
  127.             CHAR RentalCity[18];          /* Where car was picked up */
  128.             CHAR RentalState[2];          /* Where car was picked up */
  129.             CHAR RentalDate[6];           /* YYMMDD when car was picked up */
  130.             CHAR RentalTime[4];           /* HHMM when car was picked up */
  131.             CHAR ReturnCity[18];          /* Where car was checked in */
  132.             CHAR ReturnState[2];          /* Where car was checked in */
  133.             CHAR ReturnDate[6];           /* YYMMDD when car was checked in */
  134.             CHAR ReturnTime[4];           /* HHMM when car was checked in */
  135.             CHAR RenterName[20];          /* As typically written (first name first) */
  136.             BYTE NoShowIndicator;         /* '2'-No Show Charge */
  137.                                           /* '0'-Normal Charge */
  138.             CHAR ExtraChargeCode[5];      /* Up to 6 1 digit codes, each a partial or
  139.                                              complete explanation of why charged
  140.                                              amount differs from receipt cardholder
  141.                                              received at time of rental return:
  142.                                              '0'-Filler/No Extras
  143.                                              '1'-Refueling
  144.                                              '2'-Extra Mileage
  145.                                              '3'-Late Return
  146.                                              '4'-One Way Fee */
  147.         } AutoRental;
  148.  
  149.  
  150.         union Fleet
  151.         {
  152.             CHAR   VehicleNumber[5];
  153.             CHAR   DriverID[6];            /* Left-justified, fill with '>' (Hex 3E,
  154.                                               Decimal 62) '000000' if not available
  155.                                               E.g.:  '123456' or
  156.                                                      '1234>>' */
  157.             CHAR   OdometerReading[6];
  158.             CHAR   ProductCode1[2];        /* 01-11,21,26,30,40           */
  159.             CHAR   ProductCode2[2];        /* 21,26,30,40                 */
  160.             CHAR   ProductCode3[2];        /* 21,26,30,40                 */
  161.             double TotalAmount1;
  162.             double TotalAmount2;
  163.             double TotalAmount3;
  164.             double UnitPrice;              /* Right-justified, zero-filled. Three
  165.                                               assumed decimal places.
  166.                                               nnnnn (if fuel product)
  167.                                               00000 (if non fuel) */
  168.             BYTE   ServiceType;            /* '0'-No fuel service
  169.                                               '1'-Self service
  170.                                               '2'-Full service */
  171.             double SalesTax;
  172.             CHAR   ReferenceNumber[5];     /* Job code */
  173.         } Fleet;
  174.  
  175.  
  176.         union AddressVerification
  177.         {
  178.             CHAR ZipCode[9];             /* Left-justified, space-filled. */
  179.             CHAR StreetAddress[20];      /* Left-justified, space-filled. */
  180.             /* -------------------- Responses --------------------------- */
  181.             BYTE AddressMatch;           /* 'Y'-Match */
  182.                                          /* 'N'-No Match */
  183.                                          /* 'X' or ' ' -Service Unavailable/Not Applicable */
  184.             BYTE ZIPCodeMatch;           /* 'Y'-Match */
  185.                                          /* 'N'-No Match */
  186.                                          /* 'X' or ' ' -Service Unavailable/Not Applicable */
  187.         } AddressVerification;
  188.     } ExtendedData;
  189. } CCVUSER;
  190.  
  191. typedef CCVUSER *PCCVUSER;
  192.