Tuning Payment Rules performance

Payment Rules component use WebSphere Commerce Event infrastructure to process the payment transactions. Payment Rules raises one payment event for each request from Order component. And the event listener will listen to the payment event and call WebSphere Commerce Payment component for each payment actions. Depending on different scenarios, WebSphere Commerce event infrastructure can process the event asynchronously or synchronously. Payment Rules has a configuration in EDPGlobalConfigs.xml to control whether to raise an asynchronous payment event or to raise any synchronous payment event. When we configure Payment Rules to use the asynchronous payment event, Payment Rules command will raise an asynchronous payment event and return back to order component with pending process result; WebSphere Commerce Event infrastructure will take care of the event and notify the event listener in another thread. When we configure Payment Rules to use the synchronous payment event, Payment Rules command will raise a synchronous payment event, and WebSphere Commerce Event infrastructure notify the event listener in the same thread as the Payment Rules command.

The asynchronous payment event is normally used to accelerate the transaction of order commands. The order command does not need to wait the finish of the payment transaction. The shopper will wait less time for the order commands but the payment result is unknown.

The synchronous payment event is normally to used to get the real-time payment result for the order. But the order command must wait the finish of the payment transaction. This configuration applies to the scenario where the real-time payment result is more important.

The out-of-box configuration for Payment Rules is to use the synchronous payment event.

To modify global configuration values:
  1. In a text editor or XML editor, open the EDPGlobalConfigs.xml file. The file is located in the following directory:
  2. Specify the necessary value for AlwaysExecuteProcessBGInFG element.(true = synchronous payment event; false = asynchronous payment event)
  3. Save the file.