public class EditPaymentInstructionCompatiblePolicyCmdImpl extends BusinessPolicyCommandImpl implements EditPaymentInstructionPolicyCmd
This command edit payment instruction stored in the table ORDPAYINFO and ORDPAYMTHD. When payment rules component edits the payment instruction in payment rules related tables. It then calls this command to edit the payment instruction in the two tables above.
This class is used with Classical Payments.
Constructor and Description |
---|
EditPaymentInstructionCompatiblePolicyCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected ActionResults | cancelPaymentInstrution()
This method executes the action cancels a specific payment instruction.
|
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 executes the action creating a new payment instruction.
|
protected ActionResults | editPaymentInstrution()
This method executes the action updates a specific payment instruction.
|
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.lang.String | getOrderChannel()
This method gets the current order channel.
|
PaymentActionData | getPaymentActionData()
This method gets the payment action data that contains the necessary information for the payment instruction edit action.
|
java.lang.String | getPaymentGroupId()
This method gets the current payment group id.
|
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.
|
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 commands that edit the records in ORDPAYINFO and ORDPAYMETHOD by per action data type.
|
static java.lang.String | removeSpaceAndHyphenFromString(java.lang.String aCardNumber)
This 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 localLocale)
This method sets the current locale.
|
void | setOrderChannel(java.lang.String string)
This method sets the current order channel.
|
void | setPaymentActionData(PaymentActionData data)
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 current payment group id.
|
void | setStoreId(java.lang.Integer integer)
This method sets the current store id.
|
public EditPaymentInstructionCompatiblePolicyCmdImpl()
public PaymentActionData getPaymentActionData()
public ActionResults getActionResults()
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 the table ORDPAYINFO and ORDPAYMETHOD.
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 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)
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.
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 ActionResults cancelPaymentInstrution() throws ECException, 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.
protected java.math.BigDecimal getTotalAmount(OrderAccessBean abOrder) throws ECException
public void setPaymentActionData(PaymentActionData data)
public java.lang.String getOrderChannel()
public java.lang.String getPaymentGroupId()
public void setLocale(java.util.Locale localLocale)
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 static java.lang.String removeSpaceAndHyphenFromString(java.lang.String aCardNumber)
public void reset()