Posts

Showing posts from November, 2014

Retrieve WebSphere Commerce Merchant Key

<%@ page import="com.ibm.commerce.util.nc_crypt" %>   <p>Encrypted Merchant Key: <%=com.ibm.commerce.server.WcsApp.configProperties.getValue("Instance/MerchantKey")%></p>   <p>Decrypted (Plain Text) Merchant Key: <%=nc_crypt.decrypt(com.ibm.commerce.server.WcsApp.configProperties.getValue("Instance/MerchantKey"), null)%></p>

IBM WCS Billing and Shiiping Address

IBM WCS Billing and Shiiping Address Billing  AddressId Till WCS 6.0 ORDERS table ADDRESS_ID column is used for storing Billing Address ID. From WCS 7.0  ADDRESS_ID is deprectaed from ORDERS table and the billing address is now "enctypted" and stored in PPCEXTDATA Table. In the PPCEXTDATA table billing data are stored in this manner: ATTRIBUTENAME: billto_firstname. DATAVALUE: ADfKQQr6evqFRf123XJlZw== (encrypted data). Shipping AddressId Shipping Addressid is fetched from ORDERITEMS table (ADDRESS_ID column). In WCS it is possible to ship different items to different shipping address. Retrieving Billing AddressId \Shipping Address ID OrderDataBean orderDataBean  = new OrderDataBean(); orderDataBean.setCommandContext(getCommandContext()); orderDataBean.setOrderId(OrderId.toString()); orderDataBean.populate(); String addressId = ""; EDPPaymentInstruction pi = odb.getPaymentInstructions()[0].getPaymentInstruction(); if (pi.getProtocolData().containsKey("b