ReservePaymentCmdImplpublic class CheckPaymentAcceptCmdImpl extends TaskCommandImpl implements CheckPaymentAcceptCmd
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:
BuyerPurchaseOrderAccessBean
OrderAccessBean
OrderItemAccessBean
OrderPaymentMethodAccessBean
This command calls the following TaskCommands:
CheckAccountPaymentCmd
CheckPOSpendingLimitCmd
CheckTASpendingLimitCmd
UpdatePOSpendingCmd
UpdateTASpendingCmd
This command calls the following BusinessPolicyCommands:
defaultCommandClassName, ERRTASK_NAME, NAME| Constructor and Description |
|---|
CheckPaymentAcceptCmdImpl()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getReturnCode()
Deprecated.
Returns a code indicating the result of the check.
|
void |
performExecute()
Deprecated.
Performs the main business logic of the command.
|
void |
reset()
Deprecated.
Resets the instance variables of the command.
|
void |
setApproveAmount(java.math.BigDecimal approveAmount)
Deprecated.
Sets the approveAmount property of the command.
|
void |
setOrder(OrderAccessBean ab)
Deprecated.
Sets the order property of the command.
|
void |
setReleaseToFulfillment(java.lang.Boolean b)
Deprecated.
Sets the bRelease property of the command.
|
void |
setReturnCode(java.lang.String s)
Deprecated.
Sets the return code to be returned to the caller of the command.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParametersexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCachegetCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachegetCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputPropertiescheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameterspublic 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 CheckPaymentAcceptCmdpublic void performExecute()
throws ECException
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECExceptionpublic void reset()
This is useful if the command instance is to be called multiple times with different command parameters.
reset in interface com.ibm.websphere.command.Commandreset in class AbstractECTargetableCommandpublic void setApproveAmount(java.math.BigDecimal approveAmount)
setApproveAmount in interface CheckPaymentAcceptCmdapproveAmount - the approved amount to be checkedpublic void setOrder(OrderAccessBean ab)
setOrder in interface CheckPaymentAcceptCmdab - the OrderAccessBean representing the order for which the approved amount is to be checkedpublic void setReleaseToFulfillment(java.lang.Boolean b)
setReleaseToFulfillment in interface CheckPaymentAcceptCmdb - true to indicate the checking was requested as part of release to fulfillmentpublic void setReturnCode(java.lang.String s)
s - the return code stringgetReturnCode()