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

Class semper.payment.generic.genericModule

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

public class genericModule
extends Object
Generic Payment Module. This module is the implementation of a "dummy" payment system. It is an "account-based" system. There are three types of entities in the system: the payer, the payee, and the bank. Currently, only one bank is supported. There are four types of transactions:
  • payment
  • authorisation
  • capture
  • registration/account-creation The bank knows each user by both a user name and an account number. To take money out of an account (e.g. in a payment), the bank must be given the account number: the account number is sort of like a credit-card number. All protocols are of the request/response type. All protocol messages have the same structure (of class genericModuleMessage)
    Version:
    $Revision: 1.15 $ $Date: 1996/09/03 12:53:08 $
    Author:
    N. Asokan (aso@zurich.ibm.com)

    Constructor Index

     o genericModule()

    Method Index

     o genericAuthorise(String, ComPointAddress, String, String)
    Check authorisation for a payment.
     o genericCapture(String, String, ComPointAddress, String, String)
    Capture a payment.
     o genericInit(ComPointAddress)
    Initialise/re-initialise the system.
     o genericPay(String, String, String, ComPointAddress, String, String, String)
    Send a payment.
     o genericReceivePayment(ComPointAddress, String[], String[], String[], String[], String, ComPointAddress, String)
    Receive a payment from anyone
     o genericRegister(String, ComPointAddress, String, String)
    Register the account with the acquirer.

    Constructors

     o genericModule
      public genericModule()
    

    Methods

     o genericInit
      public static void genericInit(ComPointAddress addr) throws genericModuleException
    
    Initialise/re-initialise the system. This method registers a port/protocol with with the communication manager so that incoming payment messages can be handled.
    Parameters:
    addr - ComPointAddress object indicating port and protocol
    Returns:
    nothing
    Throws: genericModuleException
    if the registration fails.
     o genericPay
      public static int genericPay(String payer_name,
                                   String payer_AC_number,
                                   String payee_name,
                                   ComPointAddress payee,
                                   String amount,
                                   String currency,
                                   String ext_ref) throws genericModuleException
    
    Send a payment. Sends a payment to the specified party.
    Parameters:
    payer_name - name by which we are to be known to the payee (this need not be the same name that the bank knows us by)
    payer_AC_number - our account number in the bank
    payee_name - name of the payee
    payee - address of the payee
    amount - numeric value of payment
    currency - currency of payment
    ext_ref - external reference string to be passed on to the other side
    Returns:
    integer status (not meaningful yet)
    Throws: genericModuleException
    on all sorts of errors
    See Also:
    genericReceivePayment
     o genericReceivePayment
      public static int genericReceivePayment(ComPointAddress my_address,
                                              String a_amount[],
                                              String a_currency[],
                                              String a_payer_name[],
                                              String a_payer_AC_number[],
                                              String my_AC_number,
                                              ComPointAddress acquirer,
                                              String ext_ref) throws genericModuleException
    
    Receive a payment from anyone
    Parameters:
    my_address - address which we had registered with the comm. manager
    a_amount - numeric value of payment (return value)
    a_currency - currency of payment (return value)
    a_payer_name - name of the payer (return value)
    a_payer_AC_number - (return value)
    ext_ref - external reference string passed on from the other side
    my_AC_number - my account number at the acquirer
    acquirer - address of the acquirer
    Returns:
    integer status (not meaningful yet)
    Throws: genericModuleException
    on all sorts of errors
    See Also:
    genericPay
     o genericAuthorise
      public static int genericAuthorise(String payer_AC_number,
                                         ComPointAddress acquirer,
                                         String amount,
                                         String currency) throws genericModuleException
    
    Check authorisation for a payment. Check to see if the payer account has enough money for a proposed payment.
    Parameters:
    payer_AC_nymber - payer's account number
    acquirer - address of the acquirer bank
    amount - numeric value of proposed payment
    currency - currency of proposed payment
    ext_ref - external reference string
    Returns:
    integer status (not meaningful yet)
    Throws: genericModuleException
    on all sorts of errors
     o genericCapture
      public static int genericCapture(String payer_AC_number,
                                       String payee_AC_number,
                                       ComPointAddress acquirer,
                                       String amount,
                                       String currency) throws genericModuleException
    
    Capture a payment. Arrange for the payment amount to be moved from the payer's account to our account.
    Parameters:
    payer_AC_nymber - payer's account number
    payee_AC_nymber - payee's account number
    acquirer - address of the acquirer bank
    amount - numeric value of proposed payment
    currency - currency of proposed payment
    ext_ref - external reference string
    Returns:
    integer status (not meaningful yet)
    Throws: genericModuleException
    on all sorts of errors
     o genericRegister
      public static String genericRegister(String name,
                                           ComPointAddress acquirer,
                                           String amount,
                                           String currency) throws genericModuleException
    
    Register the account with the acquirer. Create/renew an account and set the account balance to the specified amount.
    Parameters:
    name - name of the account holder
    acquirer - address of the bank
    amount - value of the new balance
    currency - currency of the new balance
    ext_ref - external reference string
    Returns:
    String representing the account number
    Throws: genericModuleException
    for misc. errors

    All Packages  Class Hierarchy  This Package  Previous  Next  Index