public class EditPaymentInstructionPolicyCmdImpl extends BusinessPolicyCommandImpl implements EditPaymentInstructionPolicyCmd
This class is used with new payment processing component.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
EditPaymentInstructionPolicyCmdImpl() |
Modifier and Type | Method and Description |
---|---|
ActionResults | cancelPaymentInstruction()
This method cancels a payment instruction in payment processing component.
|
protected void | checkCardExpiry(java.lang.Integer expiryYear, java.lang.Integer expiryMonth)
This method checks the card expiry date provided by the customer, which is called by createPaymentInstruction() of this command.
|
protected void | checkCardNumber(java.lang.String cardBrand, java.lang.String cardNumber)
This method checks the card number provided by the customer, which is called by createPaymentInstruction() of this command.
|
protected ActionResults | createPaymentInstruction()
This method create a new payment instruction in payment processing component.
|
protected ActionResults | editPaymentInstrution()
This method updates the payment instruction in payment processing component.
|
protected ActionResults | editUnboundPaymentInstruction()
This method updates the unbound payment instruction in payment processing component.
|
ActionResults | getActionResults()
This method gets the action results after the corresponding edit action is executed.
|
protected com.ibm.commerce.edp.activitylog.ActivityLoggerLocal | getActivityLoggerFacade()
This method gets the local interface of activity logger, which stores the history of payment/refund actions in database.
|
java.util.Locale | getLocale()
This method gets the locale from the CommandContext to be used in the action.
|
protected com.ibm.commerce.edp.model.ObjectModelFacadeLocal | getOMF()
This method gets the Object Model Facade.
|
java.lang.String | getOrderChannel()
This method gets the current order channel, which will be put into payment context where there is a corresponding attribute.
|
PaymentActionData | getPaymentActionData()
This method gets the payment action data that contains the necessary information for the payment instruction edit action.
|
protected PaymentContext | getPaymentContext()
This method gets the payment context on this edit action.
|
java.lang.String | getPaymentGroupId()
This method gets the current payment group id, which will be put into payment context where there is a corresponding attribute.
|
protected com.ibm.commerce.payments.plugincontroller.beans.PluginController | getPaymentsFacade()
This method gets interface of the payment processing component.
|
protected com.ibm.commerce.edp.refunds.RefundFacadeLocal | getRefundFacade()
This is the method Shortcut to obtain the Refund Facade.
|
java.lang.Integer | getStoreId()
This method gets the store id, which will be put into payment context where there is a corresponding attribute.
|
protected boolean | isCardExpirationDateCheckEnabled()
Check if credit card expiration date check is disabled.
|
static boolean | isCardExpiryDateValid(int expiryMonth, int expiryYear)
This method checks if the specified expiry date (expiryMonth and expiryYear) is valid.
|
void | performExecute()
This method performs the actions edit payment instruction through calling the edit API of payment processing component by per action data type.
|
protected void | processExecutionResult(ActionResults actionResult)
This method processes action execution result in finally section of each action method execute Activity log can determine the action result in String from ActionResult object.
|
static java.lang.String | removeSpaceAndHyphenFromString(java.lang.String aCardNumber)
The method returns a new string that is free of any spaces and hyphenated characters.
|
void | reset()
This method is called after a command has been executed.
|
void | setLocale(java.util.Locale localLocal)
This method sets the current locale, which will be put into payment context where there is a corresponding attribute.
|
void | setOrderChannel(java.lang.String string)
This method sets the current order channel, which will be put into payment context where there is a corresponding attribute.
|
void | setPaymentActionData(PaymentActionData ac)
This method sets the payment action data that contains the necessary information for the payment instruction edit action.
|
void | setPaymentGroupId(java.lang.String string)
This method sets the payment group id, which will be put into payment context where there is a corresponding attribute.
|
void | setStoreId(java.lang.Integer integer)
This method gets the store id, which will be put into payment context where there is a corresponding attribute.
|
void | updateActionStatusFromBackendResult(PaymentActionResults actionResult, Result ppcBackendResult)
This method determines action result status based on the status in backend result returned from payment processing component, which set from Plugin financial transaction status.
|
void | validate()
This method validates if the edit action is valid.
|
public static final java.lang.String COPYRIGHT
public final java.util.Locale getLocale()
protected PaymentContext getPaymentContext()
public void setPaymentActionData(PaymentActionData ac)
public PaymentActionData getPaymentActionData()
protected final com.ibm.commerce.edp.model.ObjectModelFacadeLocal getOMF() throws J2EEException
protected com.ibm.commerce.payments.plugincontroller.beans.PluginController getPaymentsFacade() throws J2EEException
protected final com.ibm.commerce.edp.refunds.RefundFacadeLocal getRefundFacade() throws J2EEException
protected com.ibm.commerce.edp.activitylog.ActivityLoggerLocal getActivityLoggerFacade() throws J2EEException
public void performExecute() throws ECException
This method is called by the commands of payment rules component. It's called when they decide to execute the actions edit the payment instructions in payment processing component.
There is the payment action data contains the necessary information for the payment instruction edit action that is passed to this command. Then this command execute the create/update/cancel operation according to the action name in the payment action data.
protected void processExecutionResult(ActionResults actionResult) throws EDPException
public void updateActionStatusFromBackendResult(PaymentActionResults actionResult, Result ppcBackendResult) throws CommunicationException
public void validate() throws EDPException
protected ActionResults editUnboundPaymentInstruction() throws EDPException, ECException
protected ActionResults editPaymentInstrution() throws EDPException, ECException
Regardless of the results of the update action, this execution will be stored in the database to record the history the payment instruction action.
protected boolean isCardExpirationDateCheckEnabled()
protected ActionResults createPaymentInstruction() throws EDPException, ECException
Regardless of the results of the create action, this execution will be stored in the database to record the history the payment instruction action.
public ActionResults cancelPaymentInstruction() throws EDPException
Regardless of the results of the cancel action, this execution will be stored in the database to record the history the payment instruction action.
public ActionResults getActionResults()
public java.lang.String getOrderChannel()
public java.lang.String getPaymentGroupId()
public void setLocale(java.util.Locale localLocal)
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)
protected void checkCardExpiry(java.lang.Integer expiryYear, java.lang.Integer expiryMonth) throws ECException
protected void checkCardNumber(java.lang.String cardBrand, java.lang.String cardNumber) throws ECException
This method calls the CheckCCNumberCmd Task Command to check the card number.
public static boolean isCardExpiryDateValid(int expiryMonth, int expiryYear)
public static java.lang.String removeSpaceAndHyphenFromString(java.lang.String aCardNumber)
public void reset()