|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.commerce.payment.InvoiceRequestProcessorImpl
public class InvoiceRequestProcessorImpl
A payment processor for billing by invoice whose debit
method calls on an InvoiceManager to generate a repository item
representing the invoice and emit JMS messages notifying any interested
listeners of invoice creation and update.
The authorize
and credit
methods are no-ops
in this implementation. Subclasses could provide implementations that
interoperate with particular financial systems, generate JMS messages,
etc.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected static java.util.ResourceBundle |
sDefaultResources
|
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
InvoiceRequestProcessorImpl()
|
Method Summary | |
---|---|
PaymentStatus |
authorize(InvoiceRequestInfo pInvoiceInfo)
Authorize the use of a invoice for payment. |
protected PaymentStatus |
createErrorStatus(double pAmount,
java.lang.String pErrorMsg)
Create an instance of a PaymentStatus reflecting an unsuccessful transaction. |
protected PaymentStatus |
createSuccessStatus(double pAmount)
Create an instance of a PaymentStatus reflecting a successful transaction. |
PaymentStatus |
credit(InvoiceRequestInfo pInvoiceInfo)
Process refunds/credits on payments made by invoice as a new order. |
PaymentStatus |
credit(InvoiceRequestInfo pInvoiceInfo,
PaymentStatus pStatus)
Process refunds/credits on payments made by invoice. |
PaymentStatus |
debit(InvoiceRequestInfo pInvoiceInfo,
PaymentStatus pStatus)
Process payment by invoice, calling on the InvoiceManager to generate an invoice repository item from the payment group. |
CurrentDate |
getClock()
Return the "clock" component used to generate timestamps |
InvoiceManager |
getInvoiceManager()
Get the InvoiceManager to use when generating invoices |
protected java.lang.String |
nextTransactionId()
Generate a unique transaction id. |
void |
setClock(CurrentDate pClock)
Set the "clock" component used to generate timestamps |
void |
setInvoiceManager(InvoiceManager pInvoiceManager)
Set the InvoiceManager to use when generating invoices |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
protected static java.util.ResourceBundle sDefaultResources
Constructor Detail |
---|
public InvoiceRequestProcessorImpl()
Method Detail |
---|
public void setInvoiceManager(InvoiceManager pInvoiceManager)
public InvoiceManager getInvoiceManager()
public PaymentStatus authorize(InvoiceRequestInfo pInvoiceInfo)
authorize
in interface InvoiceRequestProcessor
pInvoiceRequestInfo
- the InvoiceRequestInfo that contains authorization data
public PaymentStatus debit(InvoiceRequestInfo pInvoiceInfo, PaymentStatus pStatus)
debit
in interface InvoiceRequestProcessor
pInvoiceRequestInfo
- the InvoiceRequestInfo that contains debit datapStatus
- the PaymentStatus object that contains information about the
transaction. This will be the object that was returned by the
last call to authorize().
public PaymentStatus credit(InvoiceRequestInfo pInvoiceInfo, PaymentStatus pStatus)
credit
in interface InvoiceRequestProcessor
pInvoiceRequestInfo
- the InvoiceRequestInfo that contains credit datapStatus
- the PaymentStatus object that contains information about the
transaction. This will be the object that was returned by the
last call to debit().
public PaymentStatus credit(InvoiceRequestInfo pInvoiceInfo)
credit
in interface InvoiceRequestProcessor
pInvoiceRequestInfo
- the InvoiceRequestInfo that contains credit data
protected java.lang.String nextTransactionId()
protected PaymentStatus createSuccessStatus(double pAmount)
protected PaymentStatus createErrorStatus(double pAmount, java.lang.String pErrorMsg)
public void setClock(CurrentDate pClock)
public CurrentDate getClock()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |