java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.payment.commands.CheckPaymentAcceptCmdImpl
Default
CheckPaymentAccept
task command implementation class.
Parameters:
Parameter Name | Type | Descriptions |
abOrder | OrderAccessBean | The Order Access Bean |
dApproveAmount | BigDecimal | The approved amount to be checked |
bReleaseToFulfillment | Boolean | The command is called as part of release to fulfillment. |
This Task Command implements the
CheckPaymentAccept
Interface. This Task Command is normally
called during ReleaseToFulfillment. It checks if the previously approved
payment for an order is still valid and if the Approved Amount is the same as
the Order Amount.
The command returns one of three possible answers:
PaymentConstants.APPROVAL_YES
- The authorization is still
valid and the Approved Amount is the same as the Order Amount.PaymentConstants.APPROVAL_NO
- A re-authorization was
attempted but was declined.PaymentConstants.APPROVAL_WORKING
- Working on it, check back
later.Behavior:
CheckAccountPayment
Task command to see if the payment
previously authorized by the external Accounting System is still valid.UpdateTASpending
Task command. then calls
UpdatePOSpending
Task command.CheckTASpendingLimit
Task command then calls
CheckPOSpendingLimit
Task command.CheckPaymentAcceptPolicy
command for the Payment Policy used
for the Purchase. (The ID of the Payment Policy is stored in the ORDPAYMTHD
Table).PaymentConstants.APPROVAL_NO
or if the command receives one of
these Error Codes (ERR_CODE_CURRENCY_CONVERT_FAIL,
ERR_CODE_PURCHASE_AMOUNT_EXCEED_LIMIT_OF_TA,
ERR_CODE_PURCHASE_AMOUNT_EXCEED_LIMIT_OF_LPO,
ERR_CODE_INVALID_PO_INDIVIDUAL_PO_NOT_ALLOWED,
ERR_CODE_INVALID_PO_INDIVIDUAL_PO_NOT_UNIQUE,
ERR_CODE_INVALID_PO_PO_NOT_ACTIVE) from any of the Task Commands above, the
AdminOrderCancel
command will be called to cancel the
order.Error View Name:
ErrorCodes:
This command uses the following AccessBeans:
This command calls the following TaskCommands:
CheckAccountPaymentCmd
CheckPOSpendingLimitCmd
CheckTASpendingLimitCmd
UpdatePOSpendingCmd
UpdateTASpendingCmd
This command calls the following BusinessPolicyCommands:
Field Summary |
---|
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.payment.commands. CheckPaymentAcceptCmd |
COPYRIGHT,
defaultCommandClassName,
ERRTASK_NAME,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
CheckPaymentAcceptCmdImpl() |
Method Summary | |
---|---|
protected
java.math.BigDecimal |
getApproveAmount() Returns the approveAmount property of the command. |
protected
OrderAccessBean |
getOrder() Returns the OrderAccessBean representing the order for which the approved amount is to be checked. |
protected
java.lang.Boolean |
getReleaseToFulfillment() Returns the bRelease property of the command. |
java.lang.String |
getReturnCode() Returns a code indicating the result of the check. |
void |
performExecute() Performs the main business logic of the command. |
void |
reset() Resets the instance variables of the command. |
void |
setApproveAmount(java.math.BigDecimal approveAmount) Sets the approveAmount property of the command. |
void |
setOrder(
OrderAccessBean ab) Sets the order property of the command. |
void |
setReleaseToFulfillment(java.lang.Boolean b) Sets the bRelease property of the command. |
void |
setReturnCode(java.lang.String s) Sets the return code to be returned to the caller of the command. |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Constructor Detail |
---|
public CheckPaymentAcceptCmdImpl()
Method Detail |
---|
protected java.math.BigDecimal getApproveAmount()
protected OrderAccessBean getOrder()
protected java.lang.Boolean getReleaseToFulfillment()
public java.lang.String getReturnCode()
Possible return codes are:
PaymentConstants.APPROVAL_YES
- The authorization is still
valid and the Approved Amount is the same as the Order Amount.PaymentConstants.APPROVAL_NO
- A re-authorization was
attempted but was declined.PaymentConstants.APPROVAL_WORKING
- Working on it, check back
later.
getReturnCode
in interface
CheckPaymentAcceptCmd
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void reset()
This is useful if the command instance is to be called multiple times with different command parameters.
reset
in class
AbstractECTargetableCommand
public void setApproveAmount(java.math.BigDecimal approveAmount)
setApproveAmount
in interface
CheckPaymentAcceptCmd
approveAmount
- the approved amount to be
checkedpublic void setOrder(OrderAccessBean ab)
setOrder
in interface
CheckPaymentAcceptCmd
ab
- the OrderAccessBean representing the order for which the
approved amount is to be checkedpublic void setReleaseToFulfillment(java.lang.Boolean b)
setReleaseToFulfillment
in interface
CheckPaymentAcceptCmd
b
- true to indicate the checking was requested as part of
release to fulfillmentpublic void setReturnCode(java.lang.String s)
s
- the return code stringgetReturnCode