WebSphere Commerce Payments

WebSphere Commerce Payments is a component in WebSphere Commerce that processes payments through the use of payment plug-ins or payment cassettes. This page describes the functions of the new implementation of WebSphere Commerce Payment which is using payment plug-ins. The following functions are the main functions of WebSphere Commerce Payments:

WebSphere Commerce Payments works with the Payment Rules subcomponent to handle payment actions when required. It defines the processing agreement for payment plug-ins and manages the life cycle of payment plug-ins. The processing agreement simplifies integration with a payment system and enables common payment and credit actions to occur for any payment method. WebSphere Commerce Payments is also designed to allow plug-ins to be transportable across operations systems and database tools.

When WebSphere Commerce Payments receives a request to perform an action, it finds the payment plug-in that is responsible for processing the request, and delegates the appropriate action to the plug-in. Validation of payment information is handled by payment plug-ins. WebSphere Commerce Payments then updates the necessary information and stores data in the WebSphere Commerce database to keep a record of the payment activity.

WebSphere Commerce Payments has a global view of all of the payments and credits that are processed for a given payment instruction. In contrast, from a WebSphere Commerce Payments perspective, a payment plug-in only has information about what needs to be processed at a particular point in time.

To understand this concept, review the following example:

A customer purchases two pairs of pants ($60 U.S. dollars) and a shirt ($40); the total cost of the order is $100. The pants can be delivered the next day but the shirt will be delivered three days later. The Payment Rules subcomponent calls WebSphere Commerce Payments to create a payment instruction in the amount of $100, and approve $100. It also calls WebSphere Commerce Payments to deposit $60 for the pants. A few days later it deposits $40 for the shirt.

WebSphere Commerce Payments records the fact that the payment instruction has a $100 total amount, with a single approval of $100 and two deposits--one for $60 and one for $40. However, the payment plug-in does not retain this information; it processes the individual actions as they occur. Because it treats these actions separately, it does not store information about all three transactions. WebSphere Commerce Payments and Payment Rules subcomponent keep track of the actions performed under a particular payment instruction.

WebSphere Commerce Payments has a default state transition and defines state transitions for payments and refunds (credits). At a low level, a payment state moves from Approving to Approved with a successful authorization, and moves from Approving to Failed with a denied authorization. Depending on what is happening with the order (such as cancel order, order edit, and so on), a payment state can also be Canceled. Because multiple deposit transactions can occur for a payment, there is no Depositing or Deposited state in WebSphere Commerce Payments. Instead, the terms depositingAmount and depositedAmount are used to identify whether the payment has a pending deposit or has a processed deposit, respectively. Credit states can be: Crediting, Credited, Canceled, or Failed.

If you are writing your own plug-in, you can change some of the behavior of the state transition by setting status fields of the financial transaction objects for the payment or credit being processed. The states of financial transactions are: