01: package epayment.response;
02:
03: import epayment.framework.IPaymentResponse;
04:
05: /**
06: * The <code>PaymentResponse</code> class is an
07: * <code>IPaymentResponse</code> that encapsulates
08: * the basic payment response information.
09: * <p>
10: * This class is strictly an example.
11: *
12: * @author <a href="mailto:mike@clarkware.com">Mike Clark</a>
13: * @author <a href="http://www.clarkware.com">Clarkware Consulting</a>
14: */
15:
16: public class PaymentResponse implements IPaymentResponse {
17:
18: private String _processedDate;
19: private String _responseMessage;
20:
21: /**
22: * Constructs a <code>PaymentResponse</code>
23: * with default values.
24: */
25: public PaymentResponse() {
26: _processedDate = "";
27: _responseMessage = "";
28: }
29:
30: /**
31: * Returns the processed date.
32: *
33: * @return Processed date.
34: */
35: public String getProcessedDate() {
36: return _processedDate;
37: }
38:
39: /**
40: * Sets the processed date.
41: *
42: * @param date Processed date.
43: */
44: protected void setProcessedDate(String date) {
45: _processedDate = date;
46: }
47:
48: /**
49: * Returns the response message.
50: *
51: * @return Response message.
52: */
53: public String getResponseMessage() {
54: return _responseMessage;
55: }
56:
57: /**
58: * Sets the response message.
59: *
60: * @param message Response message.
61: */
62: protected void setResponseMessage(String message) {
63: _responseMessage = message;
64: }
65:
66: /**
67: * Returns the string representation of this object.
68: *
69: * @return String representation.
70: */
71: public String toString() {
72:
73: StringBuffer contents = new StringBuffer();
74: contents
75: .append("Response Message = " + _responseMessage + "\n");
76: contents.append("Processed Date = " + _processedDate + "\n");
77:
78: return contents.toString();
79: }
80: }
|