The final code consist of three public functions, authorize, sale and credit. The functions are written in cold fusion functions. Typically in a transaction the user authorizes the card with the amount and an approval code is returned. If the approval code is "approved" then the system will typically issue the sale. The final function will issue a credit for a previous sale. Cybersource documentation lists all variables that can be passed into their server for each (auth,sale,credit). The functions accept all paramters and if not null pass them along to cybersources systems.
When cybersource returns values from a server function call, all fields returned should be captured and stored in a structure. That structure is returned from the cold fusion function. The functions utilize as much error exception detection as possible and correction.
Please refer to the "Configuration.doc" for configuration instruction.
Please make sure “card_cardType” be the last property added to card properties section.
And make sure the card type number is a valid number.
• 001: Visa
• 002 > : MasterCard, Eurocard (European regional brand of MasterCard) *
• 003: American Express
• 004: Discover
• 005: Diners Club
• 006: Carte Blanche *
• > 007: JCB *
• 014: EnRoute *
• 021: JAL *
• 024: Maestro (UK Domestic), Solo *
• 031: Delta * (Use this value only for the Global Payment Service processor. For other processors, use > 001 for all Visa card types.)
• 032: Solo * (Use this value only for the Global Payment Service processor. For other processors, use 024 for Solo cards.)
• 033: Visa Electron *
• 034: Dankort *
> • 035: Laser *
• 036: Carte Bleue *
• 037: Carta Si *
• 039: Encoded account number *
• 040: UATP > *
• 042: Maestro (International) *
• 043: GE Money UK card * (Before setting up your system to work with GE Money UK cards, contact the CyberSource UKSupport Group.)
(Please see doc “20070123_Credit_Card_IG.pdf” for more information on card types.)
> <cfset obRequestProperties.addProperty("card_expirationMonth","12")>