Mandate Payment Module and Adapter

Author: K Lüders-Jensen, Bjarke Dahl Ebert (CRM)
Status: Draft Version. 1, SEMPER internal
Date: $Date: 1998/10/06 15:09:35 $

The Mandate payment system is an electronic cheque payment system and as such account-based. The cheques along with the information on account numbers etc. is kept on a "document-carrier". At the moment this is simulated in the Mandate system by saving the information on e.g. a floppy. The document-carrier (dc) has a unique deviceID and holds the ID of the issuing bank. Each cheque has an unique ID made up of the bank ID, the device ID along with a reference number.

Installing and running MANDATE in SEMPER

Currently, MANDATE runs only in Windows95/NT, because the required DLL (implementing the cryptographic operations of a DC) is only compiled for these operating systems.

The DC file

In a real application, the Document Carrier would be a tamper-resistant chip card. In this demo, the Document Carrier is stored in a file. The location of this file is specified in the SEMPER configuration file (_sempconfig) with the variable name semper.payment.mandate.DCfile, e.g.

File _sempconfig.
    #semper.payment.mandate.DCfile c:\MANDATE\DC.MDT

If no file location is specified, c:\MANDATE\DC.MDT is taken as default.

In addition to the default value specified in the configuration file, each purse can specify its own DC file location.

Generation of the DC file

Again, in the real world, the DC chip card would be issued by a bank. In the demo, a program called GenerateDC.exe, located in the semper/payment/mandate directory, is used to generate the file. Simply call the program as

GenerateDC.exe <OwnerId> <DC_ID (4 chars)> <AccountNo> <DCpasswd> <filename>

<OwnerId>: Short string identifying the owner of the DC
<DC_ID>: At most 4 chars identifying the DC uniquely
<AccountNo>: The account number in the issuing bank, that this DC corresponds to
<DCpasswd>: An initial password needed to access the DC. The user can change the password from within SEMPER
<filename>: Where to store the DC file. A good location would be C:\MANDATE\DC.MDT, as this is where a MANDATE purse by default looks for the DC file.

Note: The DC generation takes a few seconds (up to half a minute on a slow machine), since the program is generating a digital signature from the issuing bank.

In the semper/payment/mandate directory, there is a sample DC.MDT file, generated with parametres

    Test 1234 12345678 a DC.MDT

Setting up in SEMPER

To link a DC to the payment system of SEMPER, you have to create a MANDATE purse. Each MANDATE purse is linked to a unique DC file through the use of the DC identifier. When creating a MANDATE purse, the purse stores the ID of the currently "plugged-in" DC, and with each later reference to the purse, the purse will expect to find the same DC. Otherwise the purse will issue an error. There is no way for a single SEMPER system to have access to multiple DC-s at once.

To create a MANDATE purse, in SEMPER choose "Purse Management | create a new purse | MANDATE", and set the required information.

In the MANDATE system, a given Document Carrier can only issue cheques in a given currency. However, it can receive cheques in any currency. To adapt to Semper (where to "support" a currency means both pay and receive payment in that currency), we have chosen to let a MANDATE Purse publish only the given currency as "supported", even though cheques can be received in any currency. At the moment, the supported currency is fixed to XEU. Only integer amounts are currently supported by the cheque encoding

At this point, the payment manager should be able to select the MANDATE purse for a payment -- given that each entity (buyer and seller) supports MANDATE, and that the payment is done in the currency XEU.

Making a payment in SEMPER

Setting up the scenario of a payment is outside the scope of the MANDATE adaptor. This is e.g. handled by the PaymentManager in SEMPER. Each time a purse is used for issuing a cheque (i.e. doing a payment) or for receiving a cheque, the user will be asked for the password of the DC. However, in the "Purse Management | additional purse operations | <mandate purse>" menu, the user can chose to enter the DC password one time for all. The password will then be stored for the duration of the session (i.e. until the user exits SEMPER), or until the user choses to erase the stored password again.

Upon reception of a cheque, the cheque is stored in the (simulated) DC, rather than in the SEMPER purse structure.

Browsing received cheques

To browse the cheques contained in the DC, select "Purse Management | additional purse operations | <mandate purse> | List cheques contained in purse" from SEMPER.