This topic contrasts how AVS is handled in an advanced orders environment with how AVS is handled in a standard orders environment.
Standard orders
The acceptable AVS codes for a store are kept in the STORE database table in the AVSACCEPTCODES column, with codes numbered from 0 to 4:0 = Both street address and zip code match. 1 = Street address matches, but zip code does not. 2 = Zip code matches, but street address does not. 3 = Neither street address nor zip code match. 4 = AVS result not available.
The PaySynchronizePMCmd controller command takes action based on the returned AVS code from WebSphere Commerce Payments and cassettes. (For more information about WebSphere Commerce commands, refer to the reference information for APIs.)
In a standard orders environment, the AVS result codes are checked by the Order Management subsystem. The same AVS codes must be used for all payment/credit methods and payment cassettes.
Advanced orders
In an advanced orders environment, the AVS result codes are checked by the event-driven payments subcomponent rather than the Order Management subsystem. The event-driven payments subcomponent has three types of responses to AVS codes: Pass, Reject, and AttentionRequired. Action is taken after a successful Approve or ApproveAndDeposit transaction is returned. A payment plug-in is responsible for mapping AVS scores that are specific to its payment back-end system to the AVS codes predefined by WebSphere Commerce. The AVS acceptable codes are 0 to 4, the same as used in a standard orders environment.
The following table describes what the event-driven payments subcomponent does when a successful Approve or ApproveAndDeposit transaction is returned:
Transaction (action triggered by event-driven payments) | Pass | Reject | AttentionRequired |
---|---|---|---|
Approve |
Continues normally | Reverses the approval and marks the result as failed. | Sets the AttentionRequired flag to true in the result and creates a tickler. The transaction proceeds but the order is blocked. |
ApproveAndDeposit | Continues normally | Marks the result as failed. Since the deposit cannot be reversed, a tickler is generated. | Sets the AttentionRequired flag to true in the result and creates a tickler. The transaction proceeds but the order is blocked. |
For example, if during an ApproveAndDeposit action, the AVS code returned by a plug-in is mapped to a Rejection response, the event-driven payments subcomponent marks the result of the overall as failed and creates a tickler because the deposit cannot be reversed.
The mapping of AVS scores 0 to 4 to responses Pass, Reject, and AttentionRequired is done through an AVS configuration XML file provided in the configuration for each payment method.
If you are configuring payment processing or writing a payment plug-in, you do not have to modify the AVS configuration XML file. If you are writing a plug-in, ensure that you map the protocol-specific AVS codes into WebSphere Commerce AVS codes 0 to 4. For more information, refer to the API information for the setAvsCode method in the Payment interface described in com.ibm.commerce.payments.plugin.