Develop > Controller layer > Integrate with back-end systems and external applications > Customize WebSphere Commerce Payments > Payment components in WebSphere Commerce > Payment processing with WebSphere Commerce Payments


Payment scenario with OfflineCard Cassette

After the OfflineCard Cassette is enabled and after you set up any brands to accept, the store is ready to receive online payment transactions. The following is an overview of the processes which occur whenever a customer places an order and chooses to use offline payment when the WebSphere Commerce Payments component is used:

  1. A cardholder decides to make a purchase. When the cardholder clicks a Buy button, the form data is submitted to the OrderProcess controller command. The command is sent to a merchant server, such as WebSphere Commerce, by HTTP POST.

  2. If available to promise (ATP) inventory is not used, the OrderProcess command calls the UpdateInventory task command to update the inventory for each product and item unless the command assigned to the DoPaymentCmd task command also implements the DoInventory interface. In this case, the OrderProcess command finds out that the DoPaymentCmd implementation to be called also implements the DoInventory interface. It therefore bypasses calling the UpdateInventory task command. If ATP inventory is used, the OrderProcess command calls the AllocateInventory task command instead.

  3. The OrderProcess command then calls the DoPayment task command, which is a payment initiation command. For WebSphere Commerce, the standard DoPaymentCmd implementation class is DoPaymentMPFCmdImpl. The command performs a series of checks to ensure that the payment policy specified in the policyId parameter (or indirectly in the tcId parameter) is valid. In this case, the specified policy is for the OfflineCard Cassette. The DoPaymentMPFCmdImpl class then calls the business policy command implementation class for the specified policy. For payment policies based on Payments cassettes, the implementation class is DoPaymentPMCmdImpl. The payment policy for the OfflineCard Cassette also specifies which Cashier profile to use. The DoPaymentPMCmdImpl class calls the Cashier CollectPayment command to initiate the payment using the selected Cashier profile. Since this is the OfflineCard Cassette, the Cashier profile would simply direct the Payments to create an order record in the Payments table to record the payment card information for later processing by the merchant administrator.

  4. Upon successful return from the DoPayment task command, the OrderProcess command redirects to the OrderOKView. In the case of Payments, the view specifies the PayStatusPM.jsp or an equivalent JSP file.

  5. The JSP file obtains payment status from the PayStatusPMDataBean and displays a success message to the customer in the customer's language. If there was an error, the command forwards to the DoPaymentErrorView.

  6. The order status is set to 'M' for pending approval.

  7. After the merchant administrator manually processed the transaction and updated the record by using the approve function of the Payments user interface, the WebSphere Commerce scheduler will move the order status to 'C' for complete.


Related concepts

Offline payment cassettes

Payment processing with WebSphere Commerce Payments

Order processing


Related tasks

Enable a new cassette

Related reference

Sample: WebSphere Commerce Payments JSP pages

WebSphere Commerce Payments commands


+

Search Tips   |   Advanced Search