There are multiple ways to retrieve MerchantKey of WCS instance. Below is one of the easiest way to retrieve it.
In order to retrieve MerchatKey for WCS, you can create a test jsp. and put below content in the JSP:
<%@ page import="com.ibm.commerce.util.nc_crypt" %>
Encrypted Value of Merchant Key: <%=com.ibm.commerce.server.WcsApp.configProperties.getValue("Instance/MerchantKey")%>
Plain text (Decrpyted Value) Merchant Key: <%=nc_crypt.decrypt(com.ibm.commerce.server.WcsApp.configProperties.getValue("Instance/MerchantKey"), null)%>
Make sure that newly created JSP is directly accessible.
If you do not want to create a new JSP, just embedd these 3 lines of code in any JSP which you can render on webpage.
No comments:
Post a Comment