SecPay Enumerated Type


2007-12-07 Digg! icurtain Delcious icurtain

public enum SecpayErrorType {

authorised ("Transaction authorised by bank. auth_code available as bank reference"),

notAuthorised ("Transaction not authorised. Failure message text available to merchant"),

commsProblem ("Communication problem. Trying again later may well work"),

fraud ("The SECPay system has detected a fraud condition and rejected the transaction. The message field will contain more details."),

amountInvalid ("Pre-bank checks. Amount not supplied or invalid"),

insufficientParams ("Pre-bank checks. Not all mandatory parameters supplied"),

paymentRepresented ("Pre-bank checks. Same payment presented twice"),

startInvalid ("Pre-bank checks. Start date invalid"),

expireInvalid ("Pre-bank checks. Expiry date invalid"),

issueInvalid ("Pre-bank checks. Issue number invalid"),

LUHNFailed ("Pre-bank checks. Card number fails LUHN check"),

cardTypeInvalid ("Pre-bank checks. Card type invalid - i.e. does not match card number prefix"),

nameInvalid ("Pre-bank checks. Customer name not supplied"),

merchantInvalid ("Pre-bank checks. Merchant does not exist or not registered yet"),

merchantAccountCardTypeInvalid ("Pre-bank checks. Merchant account for card type does not exist"),

merchardAccountCurrencyTypeInvalid ("Pre-bank checks. Merchant account for this currency does not exist"),

CVV2Invalid ("Pre-bank checks. CVV2 security code mandatory and not supplied / invalid"),

timeOut ("Pre-bank checks. Transaction timed out awaiting a virtual circuit. Merchant may not have enough virtual circuits for the volume of business."),

noMD5 ("Pre-bank checks. No MD5 hash / token key set up against account");

private final String description; // constructor

SecpayErrorType(String description) {

this.description = description;

}

public String getDescription(){

Runnable r = new Runnable() {

public void run(){

}

};

Runnable s = new MyRunnable();

return description;

}

private class MyRunnable implements Runnable {

public void run(){

}

}

}