Fetching PIs (Payment Instructions) for an order - IBM WebSphere Commerce

Payment instructions of an order is stored in PPCPAYINST database table. This post is about the usage of QueryPIsCmd task command which can be used to fetch all the payment instructions for an order. The default implementation of this command is QueryPIsCmdImpl.

Below is a sample code snippet to fetch already added PIs for an order.

 QueryPIsCmd queryPICmd = (QueryPIsCmd) CommandFactory.createCommand("com.ibm.commerce.edp.commands.QueryPIsCmd", storeId);  
 queryPICmd.setCommandContext(commandContext);  
 queryPICmd.setOrderId(new Long(orderId));  
 queryPICmd.execute();  
 ArrayList pis = queryPICmd.getPIs();  

Hope this help someone. Feel free to share this page with your friends and colleagues.

Thanks..!

Comments

Post a Comment

Popular posts from this blog

Applied promotions of an order - IBM WebSphere Commerce

Creating and adding elements to a list in JSTL

IBM WebSphere Commerce - Payment related debugging - AEDPPIEditCtrlCmdImpl getOrderIdByEDPPIID