public class PayFlowProConnection extends GenericService implements CreditCardProcessor, atg.payment.creditcard.DecreaseCreditCardAuthorizationProcessor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
M_AMPERSAND |
static java.lang.String |
M_AVS_MATCH |
static java.lang.String |
M_AVS_NOMATCH |
static java.lang.String |
M_AVS_NOT_SUPPORTED |
static java.lang.String |
M_EQUALS |
static java.lang.String |
M_MESSAGE_CLIENT_STARTED |
static java.lang.String |
M_MESSAGE_CLIENT_STOPPED |
static java.lang.String |
M_MESSAGE_FIELD_NULL |
static java.lang.String |
M_MESSAGE_NO_AVS_RESPONSE |
static java.lang.String |
M_MESSAGE_NO_VALID_RESPONSE |
static java.lang.String |
M_MESSAGE_TRANSACTION_FAILED |
static java.lang.String |
M_PARAM_AMOUNT |
static java.lang.String |
M_PARAM_AVS_ADDRESS_MATCH |
static java.lang.String |
M_PARAM_AVS_ZIP_MATCH |
static java.lang.String |
M_PARAM_CREDIT_CARD_NUMBER |
static java.lang.String |
M_PARAM_EXPIRATION_DATE |
static java.lang.String |
M_PARAM_NAME |
static java.lang.String |
M_PARAM_ORIGINATOR_ID |
static java.lang.String |
M_PARAM_PARTNER |
static java.lang.String |
M_PARAM_PASSWORD |
static java.lang.String |
M_PARAM_PAYMENT_REFERENCE |
static java.lang.String |
M_PARAM_RESPONSE_MESSAGE |
static java.lang.String |
M_PARAM_RESULT |
static java.lang.String |
M_PARAM_STREET |
static java.lang.String |
M_PARAM_TENDER |
static java.lang.String |
M_PARAM_TENDER_CREDIT_CARD |
static java.lang.String |
M_PARAM_TRANSACTION_TYPE |
static java.lang.String |
M_PARAM_TRANSACTION_TYPE_AUTHORIZATION |
static java.lang.String |
M_PARAM_TRANSACTION_TYPE_CREDIT |
static java.lang.String |
M_PARAM_TRANSACTION_TYPE_DELAYED_CAPTURE |
static java.lang.String |
M_PARAM_USER |
static java.lang.String |
M_PARAM_VENDOR |
static java.lang.String |
M_PARAM_ZIP |
static java.lang.String |
M_SPACE |
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
PayFlowProConnection()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
CreditCardStatus |
authorize(CreditCardInfo creditCardInfo)
authorize
Authorize the amount on the credit card
|
float |
convertToUSD(float amount,
java.lang.String currency)
convertToUSD
This function is used to convert from non USD currency to USD currency.
|
java.lang.String |
createParameterList(CreditCardInfo creditCardInfo,
CreditCardStatus creditCardStatus,
java.lang.String transactionType)
createParameterList
Creates the parameter list for presentation to the Verisign Payment Server.
|
CreditCardStatus |
credit(CreditCardInfo creditCardInfo)
credit
Credit when no previous debit exists (a new order)
|
CreditCardStatus |
credit(CreditCardInfo creditCardInfo,
CreditCardStatus creditCardStatus)
credit
Credit after the capture (previous debit) was processed
|
CreditCardStatus |
debit(CreditCardInfo creditCardInfo,
CreditCardStatus creditCardStatus)
debit
Capture the amount after the authorization was processed
|
CreditCardStatus |
decreaseAuthorization(CreditCardInfo pCreditCardInfo,
PaymentStatus pAuthStatus)
Decreases the authorized amount for the credit card.
|
void |
doStartService()
doStartService
Initialize data structures when service is started.
|
void |
doStopService()
doStopService
Release resources when service is stopped.
|
java.lang.String |
getHostAddress()
getHostAddress
|
int |
getHostPort()
getHostPort
|
java.lang.String |
getPartner()
getPartner
|
java.lang.String |
getPassword()
getPassword
|
java.lang.String |
getProxyAddress()
getProxyAddress
|
java.lang.String |
getProxyLogon()
getProxyLogon
|
java.lang.String |
getProxyPassword()
getProxyPassword
|
int |
getProxyPort()
getProxyPort
|
int |
getTimeout()
getTimeout
|
java.lang.String |
getUser()
getUser
|
java.lang.String |
getVendor()
getVendor
|
static void |
main(java.lang.String[] args)
main
|
PayFlowProStatus |
processExceptionMessage(java.lang.String exceptionMessage,
double amount)
processExceptionMessage
Create a PayFlowProStatus object from the internal exception.
|
PayFlowProStatus |
processTransactionResponse(java.lang.String responseParameterList,
double amount)
processTransactionResponse
Parse the transaction response.
|
void |
setHostAddress(java.lang.String hostAddress)
setHostAddress
|
void |
setHostPort(int hostPort)
setHostPort
|
void |
setPartner(java.lang.String partner)
setPartner
|
void |
setPassword(java.lang.String password)
setPassword
|
void |
setProxyAddress(java.lang.String proxyAddress)
setProxyAddress
|
void |
setProxyLogon(java.lang.String proxyLogon)
setProxyLogon
|
void |
setProxyPassword(java.lang.String proxyPassword)
setProxyPassword
|
void |
setProxyPort(int proxyPort)
setProxyPort
|
void |
setTimeout(int timeout)
setTimeout
|
void |
setUser(java.lang.String user)
setUser
|
void |
setVendor(java.lang.String vendor)
setVendor
|
java.lang.String |
toString()
toString
|
addLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
public static java.lang.String M_PARAM_TRANSACTION_TYPE
public static java.lang.String M_PARAM_TENDER
public static java.lang.String M_PARAM_PARTNER
public static java.lang.String M_PARAM_VENDOR
public static java.lang.String M_PARAM_USER
public static java.lang.String M_PARAM_PASSWORD
public static java.lang.String M_PARAM_TENDER_CREDIT_CARD
public static java.lang.String M_PARAM_TRANSACTION_TYPE_CREDIT
public static java.lang.String M_PARAM_TRANSACTION_TYPE_AUTHORIZATION
public static java.lang.String M_PARAM_TRANSACTION_TYPE_DELAYED_CAPTURE
public static java.lang.String M_PARAM_ORIGINATOR_ID
public static java.lang.String M_PARAM_AMOUNT
public static java.lang.String M_PARAM_CREDIT_CARD_NUMBER
public static java.lang.String M_PARAM_EXPIRATION_DATE
public static java.lang.String M_PARAM_NAME
public static java.lang.String M_PARAM_STREET
public static java.lang.String M_PARAM_ZIP
public static java.lang.String M_AMPERSAND
public static java.lang.String M_EQUALS
public static java.lang.String M_SPACE
public static java.lang.String M_PARAM_RESULT
public static java.lang.String M_PARAM_PAYMENT_REFERENCE
public static java.lang.String M_PARAM_RESPONSE_MESSAGE
public static java.lang.String M_PARAM_AVS_ADDRESS_MATCH
public static java.lang.String M_PARAM_AVS_ZIP_MATCH
public static java.lang.String M_AVS_MATCH
public static java.lang.String M_AVS_NOMATCH
public static java.lang.String M_AVS_NOT_SUPPORTED
public static java.lang.String M_MESSAGE_TRANSACTION_FAILED
public static java.lang.String M_MESSAGE_FIELD_NULL
public static java.lang.String M_MESSAGE_NO_VALID_RESPONSE
public static java.lang.String M_MESSAGE_NO_AVS_RESPONSE
public static java.lang.String M_MESSAGE_CLIENT_STARTED
public static java.lang.String M_MESSAGE_CLIENT_STOPPED
public void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if something went wrongpublic void doStopService() throws ServiceException
doStopService
in class GenericService
ServiceException
- if something went wrongpublic CreditCardStatus authorize(CreditCardInfo creditCardInfo)
authorize
in interface CreditCardProcessor
creditCardInfo
- The credit card data and customer informationpublic CreditCardStatus debit(CreditCardInfo creditCardInfo, CreditCardStatus creditCardStatus)
debit
in interface CreditCardProcessor
creditCardInfo
- The credit card data and customer informationcreditCardStatus
- The status object from a previous authorization callpublic CreditCardStatus credit(CreditCardInfo creditCardInfo, CreditCardStatus creditCardStatus)
credit
in interface CreditCardProcessor
creditCardInfo
- The credit card data and customer informationcreditCardStatus
- The status object from a previous billing callpublic CreditCardStatus credit(CreditCardInfo creditCardInfo)
credit
in interface CreditCardProcessor
creditCardInfo
- The credit card data and customer informationpublic java.lang.String createParameterList(CreditCardInfo creditCardInfo, CreditCardStatus creditCardStatus, java.lang.String transactionType) throws PayFlowProException
creditCardInfo
- The credit card data and customer information.PayFlowProException
public PayFlowProStatus processExceptionMessage(java.lang.String exceptionMessage, double amount)
exceptionMessage
- The internal exception message.amount
- The amount of the transaction.public PayFlowProStatus processTransactionResponse(java.lang.String responseParameterList, double amount) throws PayFlowProException
responseParameterList
- The list of parameters returned from the Verisign Payment ServerPayFlowProException
public java.lang.String getPartner()
public void setPartner(java.lang.String partner)
the
- new value for Partner.public java.lang.String getVendor()
public void setVendor(java.lang.String vendor)
the
- new value for Vendor.public java.lang.String getUser()
public void setUser(java.lang.String user)
the
- new value for User.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
the
- new value for Password.public java.lang.String getHostAddress()
public void setHostAddress(java.lang.String hostAddress)
the
- new value for Host Address.public int getHostPort()
public void setHostPort(int hostPort)
the
- new value for Host Portpublic int getTimeout()
public void setTimeout(int timeout)
the
- new value for Timeout.public java.lang.String getProxyAddress()
public void setProxyAddress(java.lang.String proxyAddress)
the
- new value for Proxy Address.public int getProxyPort()
public void setProxyPort(int proxyPort)
the
- new value for Proxy Port.public java.lang.String getProxyLogon()
public void setProxyLogon(java.lang.String proxyLogon)
the
- new value for Proxy Logon.public java.lang.String getProxyPassword()
public void setProxyPassword(java.lang.String proxyPassword)
the
- new value for Proxy Password.public float convertToUSD(float amount, java.lang.String currency)
amount
- The amount of the transaction.currency
- The currency code of the transaction.This currently is a dummy call, which returns what is passed in. The user needs to override this.
public java.lang.String toString()
toString
in class java.lang.Object
public CreditCardStatus decreaseAuthorization(CreditCardInfo pCreditCardInfo, PaymentStatus pAuthStatus)
This implementation does nothing but return a successful CreditCardStatus object.
Extend this method to do any payflow credit card specific processing.
decreaseAuthorization
in interface atg.payment.creditcard.DecreaseCreditCardAuthorizationProcessor
pCreditCardInfo
- the CreditCardInfo reference which contains all the credit datapublic static void main(java.lang.String[] args) throws java.lang.Exception
args
- the method argumentsjava.lang.Exception