Class Utility


  • public final class Utility
    extends Object
    • Constructor Detail

      • Utility

        public Utility()
    • Method Detail

      • encodeBase64

        public static String encodeBase64​(String serverKey)
        Create basic auth with Encode method is in the Base64.Encoder class that will return Basic auth String
        Parameters:
        serverKey - {String} - midtrans server-key/creator-key credential
        Returns:
        {String}
      • getLibraryVersion

        public static String getLibraryVersion()
        returns information about the version of Midtrans java library.
        Returns:
        {String}
      • hasOwnProperty

        public static boolean hasOwnProperty​(String jsonString,
                                             String jsonKey)
        returns a boolean indicating whether the jsonString has the specified key as its own property
        Returns:
        {boolean}