1
Read Encrypted Data
  • /** This is the SOAP method that client invokes
    */
    public String validateCreditCard(String encryptedData)
    {
    String returnMessage = "Valid Credit Card"; // unless exception is thrown , assume credit card info is valid

    try
    {
    System.out.println("encryptedData is " + encryptedData); // encrypted data was passed with the Client's method call
    decryptData(encryptedData);
    verifyCreditCardInfo(false);

    }
    catch(AddressMismatchException amme)
    {
    returnMessage = amme.getMessage();
    }
    catch(InvalidCardNumberException icne)
    {
    returnMessage = icne.getMessage();
    }
    catch(ExpiredCardException ece)
    {
    returnMessage = ece.getMessage();
    }
    catch(NameMismatchException nmme)
    {
    returnMessage = nmme.getMessage();
    }
    catch(InSufficientBalanceException ibe)
    {
    returnMessage = ibe.getMessage();
    }
    catch(Exception e)
    {
    e.printStackTrace();
    return "System exception occured";
    }

    return returnMessage;
    }

  •