public class DoPaymentActionsCompatiblePolicyCmdImpl extends BusinessPolicyCommandImpl implements DoPaymentActionsPolicyCmd
This class is used with Classical Payments.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
DoPaymentActionsCompatiblePolicyCmdImpl() |
Modifier and Type | Method and Description |
---|---|
ActionResults | approve(PaymentActionData actionData)
This method does the approve action.
|
ActionResults | cancel(PaymentActionData actionData)
This method executes the cancel action.
|
ActionResults | consumeAmount(PaymentActionData actionData)
This method does consume amount action.
|
ActionResults | deposit(PaymentActionData actionData)
This method executes the deposit action.
|
protected com.ibm.commerce.edp.activitylog.ActivityLoggerLocal | getActivityLoggerFacade()
This method gets the local interface of activity logger.
|
EDPResults | getEDPResults()
This method gets the payment action execution results, which indicates the payment action execution results is successful, pending or failed.
|
protected com.ibm.commerce.edp.model.ObjectModelFacadeLocal | getOMF()
This method gets the Object Model Facade.
|
OrderAccessBean | getOrderAccessBean()
This method gets the order access bean of current order.
|
java.lang.String | getOrderChannel()
This method gets the current order channel.
|
java.util.List | getPaymentActionDataList()
This method gets the list of payment action data.
|
java.lang.String | getPaymentGroupId()
The method gets the current payment group id.
|
java.util.List | getRefundActionDataList()
This method gets the list of refund action data.
|
RMAAccessBean | getRMAAccessBean()
This method gets the Return Mechanise Authorization(RMA) access bean of current RMA.
|
java.lang.Integer | getStoreId()
This method gets the current store id.
|
protected java.math.BigDecimal | getTotalAmount(OrderAccessBean abOrder)
This method gets the total payment amount of the order.
|
void | performExecute()
This method performs classic payment action per action data type.
|
ActionResults | refund(RefundActionData actionData)
This method executes the refund action.
|
void | reset()
This method is called after a command has been executed.
|
protected void | setAVSResponseCode(PaymentActionResults actionResults, CommandContext commandContext)
This method sets the AVS code.
|
void | setLocale(java.util.Locale currentLocale)
This method sets the current locale.
|
void | setOrderAccessBean(OrderAccessBean localOrderAccessBean)
This method sets the order access bean of current order.
|
void | setOrderChannel(java.lang.String string)
This method sets the current order channel.
|
void | setPaymentActionDataList(java.util.List dataList)
This method sets the list of payment action data.
|
void | setPaymentGroupId(java.lang.String string)
This method sets the current payment group id.
|
void | setRefundActionDataList(java.util.List dataList)
This method sets the list of refund action data.
|
void | setRMAAccessBean(RMAAccessBean localRMAAccessBean)
This method sets the RMA access bean of current RMA.
|
void | setStoreId(java.lang.Integer integer)
This method sets the current store id.
|
void | updateActionStatusFromOrderStatus(ActionData actionData, ActionResults actionResults, OrderAccessBean iabOrder)
This method sets the corresponding status of action data and action results according to the order status.
|
public static final java.lang.String COPYRIGHT
public DoPaymentActionsCompatiblePolicyCmdImpl()
public EDPResults getEDPResults()
protected com.ibm.commerce.edp.activitylog.ActivityLoggerLocal getActivityLoggerFacade() throws J2EEException
public OrderAccessBean getOrderAccessBean()
public void setOrderAccessBean(OrderAccessBean localOrderAccessBean)
public RMAAccessBean getRMAAccessBean()
public void setRMAAccessBean(RMAAccessBean localRMAAccessBean)
public void setPaymentActionDataList(java.util.List dataList)
public java.util.List getPaymentActionDataList()
public void setRefundActionDataList(java.util.List dataList)
public java.util.List getRefundActionDataList()
protected final com.ibm.commerce.edp.model.ObjectModelFacadeLocal getOMF() throws J2EEException
public void performExecute() throws ECException
This method will be called by the PaymentEventListenerImpl that listens the payment event and executes the corresponding payment action.
There is the list of payment/refund action data contains the necessary information for payment/refund action that is passed to this command. Then this command executes each payment/refund action in this list, respectively.
public ActionResults approve(PaymentActionData actionData) throws ECException, EDPException
The payment rules component decides the approve action should be executed through the payment rules configuration. And currently the payment cation name in payment action data equals "ApproveAction". Then this method is called, which calls DoPaymentCmd or CheckPaymentAcceptCmd which further calls the policy command in classical payments. The policy command in classical payments communicates with payment manager to actually execute the approve action.
Regardless of the results of the approve action, this execution will be stored in the database to record the history the payment/refund action.
protected void setAVSResponseCode(PaymentActionResults actionResults, CommandContext commandContext)
The method is called by approve(PaymentActionData) to set the AVS code into the approve action results.
public ActionResults deposit(PaymentActionData actionData) throws ECException, EDPException
The deposit action captures a payment for an order. In general, communication with a payment manager occurs at this stage. This action can occur during the following events: primePayment, reservePayment, and finalizePayment.
The payment rules component decides the deposit action should be executed in the specific business events. And currently the payment action name in payment action data equals "DepositAction". Then this method is called, which calls DoDepositCmd which further calls the policy command in classical payments.The policy command in classical payments communicates with payment manager to actually execute the deposit action.
Regardless of the results of the deposit action, this execution will be stored in the database to record the history the payment/refund action.
public ActionResults cancel(PaymentActionData actionData) throws ECException, EDPException
The cancel action voids an approval. Only full cancel is supported; the cancel of partial amounts is not supported. This action can occur during the following business events: reservePayment, finalizePayment, cancelOrder and edit.
The payment rules component decides the cancel action should be executed in the specific business events. And currently the payment action name in payment action data equals "ReverseApprovalAction", then this method is called, which calls DoCancelCmd which further calls the policy command in classical payments.The policy command in classical payments communicates with payment manager to actually execute the cancel action.
Regardless of the results of the cancel action, this execution will be stored in the database to record the history the payment/refund action.
public ActionResults refund(RefundActionData actionData) throws ECException, EDPException
The refundDeposit action issues a refund to return money to the customer, usually as a result of returning merchandise that was purchased. This action can occur during the following business events: finalizeRefund.
The payment rules component decides the refund action should be executed in the specific business events. And currently the payment action name in payment action data equals "Refund". Then this method is called, which calls DoRefundCmd which further calls the policy command in classical payments.The policy command in classical payments communicates with payment manager to actually execute the refund action.
Regardless of the results of the refund action, this execution will be stored in the database to record the history the payment/refund action.
protected java.math.BigDecimal getTotalAmount(OrderAccessBean abOrder) throws ECException
public void updateActionStatusFromOrderStatus(ActionData actionData, ActionResults actionResults, OrderAccessBean iabOrder) throws ECException, EDPException
If the result of order.getStatus() is: 1. 'C' or 'D', it will be treated as successful. 2. 'M', it will be treated as pending. 3. 'A', This is more complex because each store has different definition for the acceptable avs code. We will create a tickler for the 'A' status and block orders. 4. Other status: ignore it
public ActionResults consumeAmount(PaymentActionData actionData) throws ECException, EDPException
The payment rules component decides the consume action should be executed in the specific business events. And currently the payment action name in payment action data equals "ConsumeAmount". Then this method is called, which calls CheckPaymentAcceptCmd which further calls the policy command in classical payments.The policy command in classical payments communicate with payment manager to actually execute the consume action.
Regardless of the results of the consume action, this execution will be stored in the database to record the history the payment/refund action.
public java.lang.String getOrderChannel()
public java.lang.String getPaymentGroupId()
public void setLocale(java.util.Locale currentLocale)
public void setOrderChannel(java.lang.String string)
public void setPaymentGroupId(java.lang.String string)
public java.lang.Integer getStoreId()
public void setStoreId(java.lang.Integer integer)
public void reset()