public interface EditCmd extends AEDPPaymentTaskCmd
This command occurs when certain payment information needs to be updated, added, or deleted from
an order. EditCmd
can occur as long as the order is not closed. For example, EditCmd
occur under
the following circumstances:
This command is used to ensure the new payment information is valid and the new payment instruction amounts add up to the order amount. It also ensures that if payment instructions are removed, all related payment actions are reversed whenever possible. Payment instructions can be created during the processing of this type of event.
Payment instructions can be added during StoreAndValidateCmd
, after StoreAndValidateCmd
and before
PrimePaymentCmd
, and after PrimePaymentCmd
. They can also be added before and after ReservePaymentCmd
.
This command verifies that no payment reservation exists with outstanding releases. For example, if two
ReservePaymentCmd
occur for an order, there should be two FinalizePaymentCmd
for the order
(assuming two releases occur; the number of FinalizePaymentCmd
corresponds to the number of releases).
If the number of FinalizePaymentCmd
is 2, an EditCmd
can occur. If a FinalizePaymentCmd
request still
needs to occur, an EditCmd
does not occur and an error is returned.
An EditCmd
command can occur if a deposit already happened during the PrimePaymentCmd
(or ReservePaymentCmd
followed by a FinalizePaymentCmd
) as long as the amount does not need to be
reduced below the deposited amount. An EditCmd
to increase the amount is always allowed. A decrease
might not be allowed if funds were already deposited (however, the EditCmd
can be forced to allow
the increase).
The possible payment actions associated with this occurrence are not configurable.
Edits will trigger reversals and validation of payment instructions. A TriggerPaymentActionsCmd
command
will trigger equivalent actions for the PrimePaymentCmd
.
If a deposit has already happened against a payment instruction that is being removed, the EditCmd
will fail unless it is forced. In this case, a tickler will be created to notify a Customer Support
Representative that an amount might need to be refunded to the customer.
Example: A customer's credit card order has been captured. The customer later contacts the
Customer Support Representative to switch brand of credit cards. The Customer Support Representative
edits the payment information to make the change and an EditCmd
command occurs. In the
TriggerPaymantActionsCmd
command, the system does the following things.
It verifies that the payment instructions can indeed
be changed (that is, payments have not already been reserved for the order).
It reads the payment action rules required for the payment method.
EditCmdImpl
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 |
---|---|
EDPEditResults |
getEditResults()
This method returns the aggregated result of each individual payment instruction.
|
void |
setEditResults(EDPEditResults edpEditResults)
This method sets the aggregated result of each individual payment instruction.
|
void |
setForcedPaymentInstructionChangeFlag(boolean forcedChange)
This method sets the forced flag indicating if the payment instruction
change will be forced or not.
|
void |
setOrderAmount(java.math.BigDecimal orderAmount)
This method sets the new total order amount.
|
void |
setPaymentInstructions(java.util.ArrayList pis)
This method sets the list of payment instructions to be modified, created and removed.
|
void |
setPONumber(java.lang.String aPONumber)
This method sets the purchase order number to be used with the payment instruction.
|
void |
systemEditableAddOrderAmount(java.lang.Long edpOrderId,
java.math.BigDecimal addToPIAmount)
This method adds the order amount to the current order when the order is edited.
|
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 defaultCommandClassName
static final java.lang.String NAME
void setForcedPaymentInstructionChangeFlag(boolean forcedChange)
forceFlag
whether they
want to do a forced request or not.forcedChange
- A boolean that indicates if the request is forced or not.void setOrderAmount(java.math.BigDecimal orderAmount)
orderAmount
- A BigDecimal that specifies the new total order amount.void setEditResults(EDPEditResults edpEditResults)
edpEditResults
- An EDPEditResults that represents the event-driven payment request results.EDPEditResults getEditResults()
void setPONumber(java.lang.String aPONumber)
aPONumber
- A String that specifies the purchase order number.void setPaymentInstructions(java.util.ArrayList pis)
pis
- An ArrayList that represents the payment instructions of the type EDPPaymentInstruction.void systemEditableAddOrderAmount(java.lang.Long edpOrderId, java.math.BigDecimal addToPIAmount) throws EDPException, ECException
edpOrderId
- A Long that specifies the id of the payment order which will be add amount.addToPIAmount
- A BigDecimal That specifies the amount which will be added to the order.EDPException
ECException