Use this component to check the expiration date of a credit card and to perform a checksum test on the number. Checksum testing ensures that the format of the number is correct; it does not verify the validity of the account.
Intended use: Order Processing pipeline, Payment stage.
You can determine when the ValidateCCNumber component checks the credit card by setting component properties. Use the following boxes on the Validate CC tab of the Component Properties dialog box to determine this information.
|Apply when||Determines when to apply the credit card check. The values are:
|Method||The payment method to match against the value of the |
The ValidateCCNumber component reads the following values from the indicated dictionaries.
|Order||The credit card number.|
|Order||The expiration month as a string.|
|Order||The expiration year as a string.|
|Order||The type of the credit card as a string. Must be one of the following six types: MasterCard, MC, VISA, Discover, AmericanExpress, AMEX. No other type will be validated.|
|Context||A reference to a MessageManager object, which uses the invalid credit card error constant (|
The ValidateCCNumber component writes the following values to the Order dictionary.
|Error messages are written to this SimpleList object.|
The ValidateCCNumber component returns error level 2 (OPPERRORLEV_WARN) when an error occurs.
The component writes error messages to the
_Purchase_Errors collection. The component uses a MessageManager object to retrieve user warning message text.
|The credit card has expired or has a bad number.|
The ValidateCCNumber component first determines whether the credit card type specified in the
order.cc_type key is one of the types accepted by this component. Accepted types are VISA, MasterCard, AmericanExpress, Discover, and the abbreviations MC and AMEX.
The ValidateCCNumber component checks the values stored in the
order._cc_expyear keys to confirm that the credit card has not expired.
If the card is an accepted type, the component then runs a checksum on the number stored in the
order._cc_number key to ensure that the number is properly formed. For example, if the specified credit card type is Discover, a well-formed number must begin with a 3 and must consist of 16 digits.
See AlsoCopyright © 2005 Microsoft Corporation.
All rights reserved.