com.ibm.commerce.payments.plugin.punchout.util

Class PunchoutPaymentUtil

  • java.lang.Object
    • com.ibm.commerce.payments.plugin.punchout.util.PunchoutPaymentUtil


  • public class PunchoutPaymentUtil
    extends java.lang.Object
    Utility class for punch-out payment plugins.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      static java.lang.String decodeByURL(java.lang.String content, java.lang.String charset)
      Decode the content using URL decoder.
      static java.lang.String encodeByURL(java.lang.String content, java.lang.String charset)
      Encode the content using URL encoder.
      static java.lang.String encryptByMD5(java.lang.String content, java.lang.String charset)
      Deprecated. 
      Sample code that uses MD5 hashing algorithm. Customers are recommended to use more secure hashing algorithm, for example SHA-256.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • encodeByURL

        public static java.lang.String encodeByURL(java.lang.String content,
                                                   java.lang.String charset)
                                            throws EncodingException
        Encode the content using URL encoder.
        Parameters:
        content - content needed to be encoded
        charset - the charset of the content
        Returns:
        encoded content
        Throws:
        EncodingException - if encoding encounter errors
        See Also:
        URLEncoder.encode(java.lang.String, java.lang.String)
      • decodeByURL

        public static java.lang.String decodeByURL(java.lang.String content,
                                                   java.lang.String charset)
                                            throws EncodingException
        Decode the content using URL decoder.
        Parameters:
        content - content needed to be encoded
        charset - the charset of the content
        Returns:
        encoded content
        Throws:
        EncodingException - if encoding encounter errors
        See Also:
        URLEncoder.encode(java.lang.String, java.lang.String)
      • encryptByMD5

        public static java.lang.String encryptByMD5(java.lang.String content,
                                                    java.lang.String charset)
                                             throws EncryptionException
        Deprecated. Sample code that uses MD5 hashing algorithm. Customers are recommended to use more secure hashing algorithm, for example SHA-256.
        Encrypt the content using MD5.
        Parameters:
        content - content which needs to be encrypted
        charset - the charset of the content
        Returns:
        encrypted content
        Throws:
        EncryptionException - in case encrypt encounter errors