The event-driven payments subcomponent in WebSphere Commerce makes payment decisions based on payment rules. It determines what types of payment actions should be executed at specific times or business events in the life cycle of an order or the return of a purchase. When a request for a payment action occurs within WebSphere Commerce, the payment rule that applies to the request is checked and the appropriate payment actions are taken.
Generally, the flow of an event-driven payment is as follows:
- An order or return event occurs and event-driven payment activity is triggered.
- The event-driven payments subcomponent reads the payment rule that applies to the business event situation to determine what payment actions should be performed.
- The event-driven payments subcomponent executes the necessary payment actions to move the payment or refund into the required target state.
The payment actions that are executed during the processing of events vary according to the payment methods used to make the purchases and their corresponding payment rules. The payment actions that take place are determined through the use of payment rules. The payment rule that should be used by a particular payment method is specified through a payment method configuration XML file. The payment rules used by your system are triggered by the order life-cycle events taking place in the system. When the parameters in the XML files are evaluated by the system to be true, a predetermined list of actions is triggered.
For example, the payment actions that should occur dynamically when a credit card is used are probably different than the payment actions defined for a check or a gift certificate. Through payment rules, you can establish the business practices that should be followed when an order is paid for or when a refund is granted for a returned item. Examples of rules that can be defined are:
- If the customer uses a credit card to pay for the order, approve the payment when the order is captured, but deposit the payment only after shipment of the order is confirmed.
- If the customer uses an electronic check, deposit the money when the order is captured (when the customer presses the Buy button).
The event-driven payments subcomponent does not replace the existing software component known as WebSphere Commerce Payments (a payment server system available in WebSphere Commerce). Rather, the event-driven payments subcomponent represents an additional software layer that provides payment-processing logic at a business level to convert business rules into payment actions.
The event-driven payments subcomponent interacts with WebSphere Commerce Payments and external payment systems through use of the Payment Plug-in Controller. The Payment Plug-in Controller and payment plug-ins are alternatives to using the WebSphere Commerce Payments component and payment cassettes. The Payment Plug-in Controller can communicate with WebSphere Commerce Payments through a special payment plug-in called the WCPayments plug-in.
The WCPayments plug-in is a type of "bridge" plug-in that enables existing users of WebSphere Commerce Payments to take advantage of advanced orders processing while still using WebSphere Commerce Payments for payment processing. This bridge can be used as a temporary measure until you are ready to move entirely to an environment that does not use payment cassettes.