KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > dotmarketing > util > CreditCardProcessorException


1 package com.dotmarketing.util;
2
3 /**
4  * This class is used by the CreditCardProcessor to anounce data and comunication errors in a credit card process.
5  * @author David
6  *
7  */

8 public class CreditCardProcessorException extends Exception JavaDoc {
9     
10     private static final long serialVersionUID = 1L;
11
12     /**
13      * Code used for gateway comunication errors
14      */

15     public static final int COMMUNICATION_ERROR = 0;
16     /**
17      * Code used for erroneous or missing data in a credit card process;
18      */

19     public static final int DATA_MISSING = 1;
20     
21     private int code;
22     private String JavaDoc gatewayMessage;
23     
24     public CreditCardProcessorException (int code, String JavaDoc message) {
25         super (message);
26         this.code = code;
27     }
28
29     public CreditCardProcessorException (int code, String JavaDoc message, Throwable JavaDoc ex) {
30         super (message, ex);
31         this.code = code;
32     }
33
34     public int getCode() {
35         return code;
36     }
37
38     public void setCode(int code) {
39         this.code = code;
40     }
41
42     public String JavaDoc getGatewayMessage() {
43         return gatewayMessage;
44     }
45
46     public void setGatewayMessage(String JavaDoc gatewayMessage) {
47         this.gatewayMessage = gatewayMessage;
48     }
49     
50     
51
52 }
53
Popular Tags