FIM.payment
Class CreditCardPayment
java.lang.Object
|
+--FIM.payment.PaymentBase
|
+--FIM.payment.CreditCardPayment
- All Implemented Interfaces:
- Payment, Serializable, XMLEncodeable
- public class CreditCardPayment
- extends PaymentBase
A class representing the payment by creditcard.
- Version:
- 1.0
- Author:
- Michael Sonntag
- See Also:
Invoice
, Serialized Form
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CreditCardPayment
public CreditCardPayment()
- Create a new empty object. To be used for parsing in XML data later. Must be public so it can be
created by factory methods.
CreditCardPayment
public CreditCardPayment(Invoice inv,
String cardCompany,
String nameOnCard,
byte[] number,
Date expiry)
- Create a new creditcard payment.
- Parameters:
invoice
- the invoice this payment is forcardCompany
- the company which issued the cardnameOnCard
- the name on the card (holder)number
- the number of the creditcard as an array of bytesexpiry
- the expiry date
CreditCardPayment
public CreditCardPayment(Element elem)
- Create a new data payment from an XML element.
- Parameters:
elem
- the XML element containing the encoded form
toString
public String toString()
- Retrieve the payment as a string, suitable for presenting to the user in a very simple form.
- Overrides:
toString
in class Object
- Returns:
- the payment encoded as a string
getEncoded
public byte[] getEncoded()
- Retrieve the payment in encoded form to be used for signing. Does NOT include the signing information itself (which
will be created based on the result!). Must be exactly the same on all calls and if the content is the same.
- Overrides:
getEncoded
in class PaymentBase
- Returns:
- the payment in encoded form
getAsXMLElement
public Element getAsXMLElement(Document doc)
- Retrieve the payment as an XML element.
- Overrides:
getAsXMLElement
in class PaymentBase
- Parameters:
doc
- the document within which to create the element- Returns:
- the currency as an element
decodeXMLElement
public void decodeXMLElement(Element elem)
throws IllegalArgumentException
- Parse back the payment from an XML element.
- Overrides:
decodeXMLElement
in class PaymentBase
- Parameters:
elem
- the element containing the currency to parse back- Throws:
IllegalArgumentException
- if the element is incorrect (e. g. wrong tag name)
Submit a bug
Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.