Package com.newmediaworks.taglib.payment
Class Functions
- java.lang.Object
-
- com.newmediaworks.taglib.payment.Functions
-
public final class Functions extends Object
- Author:
- New Media Works
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getAuthorizationCode()
Gets the authorization code to display to the customer.static String
getAuthorizationCode(String fromName, ServletRequest request)
static String
getAvsResult()
Gets the AVS (address verification system) result.static String
getAvsResult(String fromName, ServletRequest request)
static String
getCvvResult()
Gets the CVV2 (card security code) verification result.static String
getCvvResult(String fromName, ServletRequest request)
static String
getErrorReason()
Gets the reason for a processing error.static String
getErrorReason(String fromName, ServletRequest request)
static String
getRejectedReason()
Gets the rejected reason for a payment attempt.static String
getRejectedReason(String fromName, ServletRequest request)
static String
getReviewReason()
Gets the review reason for a transaction that has been placed on hold.static String
getReviewReason(String fromName, ServletRequest request)
static String
getTransactionId()
Gets the per-processor unique transaction ID.static String
getTransactionId(String fromName, ServletRequest request)
static boolean
isAccepted()
Determines if the payment was accepted (approved).static boolean
isError()
static boolean
isHeld()
Determines if the payment was held (pending some sort of review).static boolean
isRejected()
Determines if the payment was rejected (declined).static String
maskCardNumber(String cardNumber)
-
-
-
Method Detail
-
isError
public static boolean isError() throws JspException
-
getErrorReason
public static String getErrorReason(String fromName, ServletRequest request) throws JspException
- Throws:
JspException
-
getErrorReason
public static String getErrorReason() throws JspException
Gets the reason for a processing error.
-
isAccepted
public static boolean isAccepted() throws JspException
Determines if the payment was accepted (approved).
-
getAuthorizationCode
public static String getAuthorizationCode(String fromName, ServletRequest request) throws JspException
- Throws:
JspException
-
getAuthorizationCode
public static String getAuthorizationCode() throws JspException
Gets the authorization code to display to the customer.- Throws:
JspException
- See Also:
GetAuthorizationCodeTag
,AuthorizationResult.getApprovalCode()
-
getTransactionId
public static String getTransactionId(String fromName, ServletRequest request) throws JspException
- Throws:
JspException
-
getTransactionId
public static String getTransactionId() throws JspException
Gets the per-processor unique transaction ID.- Throws:
JspException
- See Also:
GetTransactionIdTag
,TransactionResult.getProviderUniqueId()
-
isHeld
public static boolean isHeld() throws JspException
Determines if the payment was held (pending some sort of review).
-
getReviewReason
public static String getReviewReason(String fromName, ServletRequest request) throws JspException
- Throws:
JspException
-
getReviewReason
public static String getReviewReason() throws JspException
Gets the review reason for a transaction that has been placed on hold.- Throws:
JspException
- See Also:
GetReviewReasonTag
,AuthorizationResult.getReviewReason()
-
isRejected
public static boolean isRejected() throws JspException
Determines if the payment was rejected (declined).
-
getRejectedReason
public static String getRejectedReason(String fromName, ServletRequest request) throws JspException
- Throws:
JspException
-
getRejectedReason
public static String getRejectedReason() throws JspException
Gets the rejected reason for a payment attempt.- Throws:
JspException
- See Also:
GetRejectedReasonTag
,AuthorizationResult.getDeclineReason()
-
getCvvResult
public static String getCvvResult(String fromName, ServletRequest request) throws JspException
- Throws:
JspException
-
getCvvResult
public static String getCvvResult() throws JspException
Gets the CVV2 (card security code) verification result.- Throws:
JspException
- See Also:
GetCvvResultTag
,AuthorizationResult.getCvvResult()
-
getAvsResult
public static String getAvsResult(String fromName, ServletRequest request) throws JspException
- Throws:
JspException
-
getAvsResult
public static String getAvsResult() throws JspException
Gets the AVS (address verification system) result.- Throws:
JspException
- See Also:
GetAvsResultTag
,AuthorizationResult.getAvsResult()
-
-