public interface PrimePaymentCmd extends AEDPStoreTaskCmd
This task command is used to prepare payments in the payments rules subcomponent.
It's invoked by the ProcessOrderCmdImpl
Controller Command to prepare payment
processing for an order.
The returnData may be null
. In this case, OrderProcessCmd
will go to
the OrderOK View to display a confirmation page to the customer.
This command is called by the order capture. When the order is captured, this command provides some guarantee
that the customer has funds to pay for the order. Like the StoreAndValidatePaymentCmd
, the purpose of this command
is for the merchant to find out whether a payment is bad before the customer is disengaged. A Payment Rules
order and payment instructions can be created by this command. A Payment Rules�order corresponds to the payment
portion of a WebSphere Commerce order, and can have multiple releases associated with it. But normally the
Payment Rules order is created by StoreAndValidatePaymentCmd
and the payment instructions are added by PIAddCmd
.
During PrimePaymentCmd
,If the current charge of the order is zero. Then the user has the configuration to
either validate payment or approve the minimum amount or do nothing.
The PrimePaymentCmd
is not optional; it always occurs.
Two logics of the PrimePaymentCmd
exist: one with payment instructions, and one without payment instructions.
The following conditions apply to each:
StoreAndValidatePaymentCmd
and PIAddCmd
has already called.
The possible payment actions associated with this command are: Validation, Approve, and Deposit.
For example, a customer shops at a store, submits an order and specifies that a particular credit card should be used as the payment method.
A PrimePaymentCmd
is called and the Payment rules are read to determine what payment actions should take
place for the payment method. Payment actions are configurable. For example, for credit cards, the default
behavior is to check to ensure that the customer has sufficient credit and the card has not expired.
If the credit card is fine, the payment is approved. If a payment action with the payment back end system
fails, a tickler is created to notify a Customer Service Representative. Other scenarios might involve other
actions, such as depositing the funds immediately.
The default implementation of this command is PrimePaymentCmdImpl
.
ProcessOrderCmdImpl
,
OrderProcessCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
The IBM Copyright notice field.
|
static java.lang.String |
defaultCommandClassName
The default implementation of this command.
|
static java.lang.String |
NAME
The full name of this command.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEDPWarning()
This method returns the payments rules warning message.
|
java.util.Map |
getErrorMessageMap()
This method returns the map containing error message of each Payment Instruction.
|
TypedProperty |
getPaymentAttributes()
This method obtains the task command properties.
|
void |
setInitialAmount(java.math.BigDecimal initialAmount)
This method sets the initial amount to be used in the prime payment event request.
|
void |
setPaymentAttributes(TypedProperty requestProperties)
This method sets the payment attributes property of the command.
|
void |
setPaymentMethodId(java.lang.String paymentMethodId)
This method sets the payment method ID.
|
void |
setTotalAmount(java.math.BigDecimal totalAmount)
This method sets the total amount of the order.
|
getCurrency, getEDPResults, getLanguageId, getLocale, getOrderChannel, getOrderId, setEDPResults, setOrderId
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, performExecute, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
static final java.lang.String COPYRIGHT
static final java.lang.String NAME
static final java.lang.String defaultCommandClassName
java.lang.String getEDPWarning()
void setInitialAmount(java.math.BigDecimal initialAmount)
initialAmount
- A BigDecimal that specifies the initial amount to be used
in the prime payment event request.void setPaymentAttributes(TypedProperty requestProperties)
requestProperties
- A TypedProperty that represents the requestProperties object
that contains all the command parameters that are to be passed to this command.TypedProperty getPaymentAttributes()
void setPaymentMethodId(java.lang.String paymentMethodId)
paymentMethodId
- A String that specifies the payment method id.void setTotalAmount(java.math.BigDecimal totalAmount)
totalAmount
- A BigDecimal that specifies the total amount of the order.java.util.Map getErrorMessageMap()