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("billing_address_id"))
{
//this is the billing address
addressId = (String)pi.getProtocolData().get("billing_address_id"));
}
else
{
//this is the shipping address
addressId = odb.getOrderItems()[0].getAddressId();
}

Comments

Popular posts from this blog

Websphere Commerce Data Load using CSV \Websphere Commerce Data Load using XML

Websphere Commerce Catalog Subsystem

Calculation Framework in Websphere Commerce.