• Entries (RSS)
  • Comments (RSS)

Retrieving Merchant Key value from WebSphere Commerce Server

Posted by | Posted in WebSphere Commerce | Posted on 23-08-2010

Tagged Under : , , ,

Retrieving Merchant Key value from WebSphere Commerce Server

Merchant Key

The merchant key is the encryption key used in WebSphere Commerce Server. Merchant key is a 16 digit hexadecimal number that has at least one numeric character, at least one alphabetic character (a-f) with no upper case letter. The merchant key cannot contain the same character more than four times and four consecutive occurrence of the same character is not allowed. The merchant key will be present in WebSphere commerce instance xml file in encrypted format. To get the plain text version of the merchant key, place the following text in any WCS view and run it on the server.

<%
	System.out.println("Merchant Key :"+com.ibm.commerce.server.ConfigProperties.singleton().getMerchantKey());
%>

Share

Read More

Comments

6 comments posted onRetrieving Merchant Key value from WebSphere Commerce Server

  1. Hi ,
    Can anybody tell me how to retrieve merchant key in WCS 7.0.
    After migrating from WCS v5.6.1 to v7.0 , WcsApp.configProperties.getMerchantKey() is throwing error .

    reply ASAP.

    Thanks and Regards,
    Resh

  2. You need to use following syntax in V7.

    WcsApp.configProperties.getValue(“Instance/MerchantKey”);

  3. Hi,
    Can you tell how I can get the decrypted form of MErchant key in WCS 7?

    Thanks in advance

  4. Please check Hari’s reply. the syntax is

    WcsApp.configProperties.getValue(“Instance/MerchantKey”);

  5. Unfortunately this method returns encrypted merchant key available in instance configuration XML. String containing ‘W’ or ‘P’ letters cannot be proper HEX number. Is there any other way to return decrypted string ?

    Thank you very much in advance.

  6. This is a bit of an old thread, but I couldn’t find an answer online for getting the merch key in V7 either.

    If you have the encrypted merch key string, you can decrypt it using the static EncryptHelper.decrypt method

Post a Comment