Pages

Thursday, January 20, 2011

Order Payments Process



While integrating with PaymentExpress by way of Hosted payment page, there was a little issue. Once the customer reviews the order items in the shopping cart page and then proceeds for payment, the page is redirected to PaymentExpress payment capture page as shown below.


Once the payment details are entered, the customers then click “Submit”. This takes the customer to the payment approved page on the paymentexpress


On the payment complete page as shown above, it is strange that customers have to click “Next” to come back to the shopping site to get an order confirmation. There should have been automatic redirection of the page to the shopping site. Due to this, some of the customers do not click “Next” thinking that their payment is approved and the order is complete. Not clicking “Next” keeps the order in Websphere commerce in a “Pending” status. Talked to PaymentExpress and they are not able to do an automatic redirection back to the shopping site (not sure why).

Order and Payment Subsystem Overview

Once items are added to cart, an order is created in the ORDERS table with status as pending “P”. Items in the shopping cart are added to ORDERITEMS table which has an ORDER_ID reference to the ORDERS table. Correspondingly, a payment order record is created in the EDPORDER table. Once the customer selects payment method and proceeds for payment, for each payment method in the order, there is a payment instruction record created in the EDPPAYINST.

In the code, EDP Order data is retrieved using the EDPServices as shown below.

EDPOrderData edpOrderData = EDPServices.getServices().getOmfAccessor().getOMF().getEDPOrder(new Long(getOrderId()), Integer.valueOf(storeId));
Long edpOrderId = edpOrderData.getOrderKey();

We get the EDP order payment instructions through the following

SortedSet pis = EDPServices.getServices().getOmfAccessor().getOMF().getPis(edpOrderId);

Using the payment instruction returned, you can get the details like amount, payment method, etc.

Orders data can be accessed using the websphere commerce OrderAccessBean and order details using OrderItemAccessBean

There is a PPCPAYINST table which stores the value object Payment Instruction in WCS which contains information for payment plugins to process the final payments. Payments for a specific payment method can only be charged upto a maximum specified by the AMOUNT column in PPCPAYINST table. PPCEXTDATA contains non-standard data specific to a payment method. For example, paymentexpress might have some non-standard protocol data which is stored in here.

Tuesday, January 11, 2011

Websphere Commerce Product Recommendations

I am trying to configure an activity to display products based on the selected categories. For example if there is an espot E1, then I need to create an activity which associates a category (C1) with this espot and displays random product from this category to the espot.

Any suggestions on how to achieve this ? I am using version 6.0 of websphere commerce where part of the functionality is in Accelerator and part in management centre. Its kind of wiered.

Well.. I found out that websphere commerce doesn't have the capability to recommend products on a merketing spot if I associate a category to an eSpot. This is a basic functionality which I thought should be out of the box. However, I have figured out a way to do it. Just display the categories in the ESpot and based on the category ID, write custom code in the JSP to fetch all the products from the category and display the espot as requried.

I also figured out that the web activity can be defined using both accelerator and management centre. When we define a webactivity in accelerator, the activity goes into INITIATIVE and INTVSCHD tables of WCS. On the other hand, when a web activity is configured using management centre, they are stored in DMACTIVITY table.