Retrieve WebSphere Commerce Merchant Key

Retrieve WebSphere Commerce Merchant Key

I recently was working on a client project in WebSphere Commerce, specifically within the payment framework and needed to update some data within the PPCEXTDATA table. As I needed to encrypt the data specific to the WebSphere Commerce instance, I needed to discover the plain text merchant key to encrypt the data so it could be read and decrypted properly.

To retrieve the merchant key, I created the following JSP, that allows discovery and retrieval of both the encrypted and plain text merchant key. I then just copied this into my Stores project, and accessed the JSP from a browser.

<%@ 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>

Author: daharveyjr

I’m a solution architect responsible for the design, development, implementation, testing, and maintenance of e-commerce operations and applications using the Hybris and WebSphere Commerce product suites and other web technologies such as Java, J2EE/JEE, Spring, PHP, WordPress and more. Twitter | Facebook | LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *