Class semper.payment.generic.genericModuleMessage
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.payment.generic.genericModuleMessage

java.lang.Object
   |
   +----semper.payment.generic.genericModuleMessage

public class genericModuleMessage
extends Object
implements Streamable
Message class for protocol messages in the "generic payment system"
Version:
$Revision: 1.7 $ $Date: 1997/02/25 10:53:05 $
Author:
N. Asokan ([email protected])

Variable Index

 o MT_ERROR
Flag -> this message is the error reply part of a transaction
 o MT_REPLY
Flag -> this message is the reply part of a transaction
 o MT_REQUEST
Flag -> this message is the request part of a transaction
 o SC_FAIL_CANT_PARSE_REQ
Status code in MT_ERROR -> Failed because cannot parse request
 o SC_FAIL_INVALID_KEY
Status code in MT_ERROR -> Failed because key was wrong
 o SC_FAIL_NO_SUCH_ACCOUNT
Status Code in MT_ERROR -> Failed because there is no such account
 o SC_FAIL_NOT_ENOUGH_BALANCE
Status Code in MT_ERROR -> Failed because not enough balance
 o SC_FAIL_SRC_CURRENCY_MISMATCH
Status Code in MT_ERROR -> Failed because currency of source account doesn't match what the request says wrong
 o SC_FAIL_TGT_CURRENCY_MISMATCH
Status Code in MT_ERROR -> Failed because currency of target account doesn't match what the request says wrong
 o SC_FAIL_UNKNOWN_TTYPE
Status code in MT_ERROR -> Failed because requested operation was unknown
 o SC_FAIL_VERSION_MISMATCH
Status code in MT_ERROR -> Failed because version mismatch
 o SC_NONE
Default status code for genericModuleException
 o SC_SUCCESS
Status Code in MT_REPLY -> Request was successful
 o TT_AUTHORISE
Flag -> this message is part of a "authorise" transaction
 o TT_CAPTURE
Flag -> this message is part of a "capture" transaction
 o TT_PAY
Flag -> this message is part of a "pay" transaction
 o TT_REGISTER
Flag -> this message is part of a "registration" transaction
 o TT_STATUS
Flat -> this message is part of a "account status check" transaction

Constructor Index

 o genericModuleMessage()
Constructor without arguments
 o genericModuleMessage(String, String, String, String, String, String, int, int, int, String, String)
Constructor Depending of the type of transaction, some of these fields can be null.

Method Index

 o errorMessage(int)
Generate an error message string
 o getAmount()
Accessor method
 o getCurrency()
Accessor method
 o getExtRef()
Accessor method
 o getMessageType()
Accessor method
 o getPayeeACNumber()
Accessor method
 o getPayeeName()
Accessor method
 o getPayerACNumber()
Accessor method
 o getPayerName()
Accessor method
 o getStatusCode()
Accessor method
 o getTransactionType()
Accessor method
 o getVersionNumber()
Accessor method
 o myStreamSize()
Implementing the Streamable interface
 o readObject(StreamInputInterface)
Implementing the Streamable interface
 o toString()
redefining toString() to suit our needs
 o writeObject(StreamOutputInterface)
Implementing the Streamable interface

Variables

 o TT_PAY
  public final static int TT_PAY
Flag -> this message is part of a "pay" transaction
 o TT_AUTHORISE
  public final static int TT_AUTHORISE
Flag -> this message is part of a "authorise" transaction
 o TT_CAPTURE
  public final static int TT_CAPTURE
Flag -> this message is part of a "capture" transaction
 o TT_REGISTER
  public final static int TT_REGISTER
Flag -> this message is part of a "registration" transaction
 o TT_STATUS
  public final static int TT_STATUS
Flat -> this message is part of a "account status check" transaction
 o MT_REQUEST
  public final static int MT_REQUEST
Flag -> this message is the request part of a transaction
 o MT_REPLY
  public final static int MT_REPLY
Flag -> this message is the reply part of a transaction
 o MT_ERROR
  public final static int MT_ERROR
Flag -> this message is the error reply part of a transaction
 o SC_NONE
  public final static int SC_NONE
Default status code for genericModuleException
 o SC_SUCCESS
  public final static int SC_SUCCESS
Status Code in MT_REPLY -> Request was successful
 o SC_FAIL_NO_SUCH_ACCOUNT
  public final static int SC_FAIL_NO_SUCH_ACCOUNT
Status Code in MT_ERROR -> Failed because there is no such account
 o SC_FAIL_NOT_ENOUGH_BALANCE
  public final static int SC_FAIL_NOT_ENOUGH_BALANCE
Status Code in MT_ERROR -> Failed because not enough balance
 o SC_FAIL_SRC_CURRENCY_MISMATCH
  public final static int SC_FAIL_SRC_CURRENCY_MISMATCH
Status Code in MT_ERROR -> Failed because currency of source account doesn't match what the request says wrong
 o SC_FAIL_TGT_CURRENCY_MISMATCH
  public final static int SC_FAIL_TGT_CURRENCY_MISMATCH
Status Code in MT_ERROR -> Failed because currency of target account doesn't match what the request says wrong
 o SC_FAIL_INVALID_KEY
  public final static int SC_FAIL_INVALID_KEY
Status code in MT_ERROR -> Failed because key was wrong
 o SC_FAIL_CANT_PARSE_REQ
  public final static int SC_FAIL_CANT_PARSE_REQ
Status code in MT_ERROR -> Failed because cannot parse request
 o SC_FAIL_VERSION_MISMATCH
  public final static int SC_FAIL_VERSION_MISMATCH
Status code in MT_ERROR -> Failed because version mismatch
 o SC_FAIL_UNKNOWN_TTYPE
  public final static int SC_FAIL_UNKNOWN_TTYPE
Status code in MT_ERROR -> Failed because requested operation was unknown

Constructors

 o genericModuleMessage
  public genericModuleMessage(String payer_name,
                              String payer_AC_number,
                              String payee_name,
                              String payee_AC_number,
                              String amount,
                              String currency,
                              int transaction_type,
                              int message_type,
                              int status_code,
                              String ext_ref,
                              String version_number)
Constructor Depending of the type of transaction, some of these fields can be null.
Parameters:
payer_name - String indicating the name by which payer/user is known to the acquirer
payee_name - String indicating the name by which the payee is known to the acquirer
payer_AC_number - String: payer's account number at the acquirer
payee_AC_number - String payee's account number at the acquirer
amount - String representing amount involved
currency - String representing currency involved
transaction_type - integer code indicating type of transaction
message_type - integer code indicating type of message
status_code - integer code in reply/error message indicating status
ext_ref - String with an external reference
version_number - String indicating protocol version number
 o genericModuleMessage
  public genericModuleMessage()
Constructor without arguments

Methods

 o toString
  public String toString()
redefining toString() to suit our needs
Overrides:
toString in class Object
 o getPayerName
  public String getPayerName()
Accessor method
 o getPayerACNumber
  public String getPayerACNumber()
Accessor method
 o getPayeeName
  public String getPayeeName()
Accessor method
 o getPayeeACNumber
  public String getPayeeACNumber()
Accessor method
 o getAmount
  public String getAmount()
Accessor method
 o getCurrency
  public String getCurrency()
Accessor method
 o getExtRef
  public String getExtRef()
Accessor method
 o getVersionNumber
  public String getVersionNumber()
Accessor method
 o getTransactionType
  public int getTransactionType()
Accessor method
 o getMessageType
  public int getMessageType()
Accessor method
 o getStatusCode
  public int getStatusCode()
Accessor method
 o errorMessage
  public static String errorMessage(int code)
Generate an error message string
Parameters:
code - any one of the defined SC_<> codes
Returns:
s a string containing the corresponding error message
 o writeObject
  public void writeObject(StreamOutputInterface s) throws StreamIOException
Implementing the Streamable interface
 o readObject
  public void readObject(StreamInputInterface s) throws StreamIOException
Implementing the Streamable interface
 o myStreamSize
  public int myStreamSize() throws StreamIOException
Implementing the Streamable interface

All Packages  Class Hierarchy  This Package  Previous  Next  Index