Bypassing the Payments subsystem in HCL Commerce

If you want to bypass or disable the Payment subsystem for HCL Commerce, replace the Payment Rules task commands with void implementations.

About this task

When you replace the following Payment Rules task commands with void implementations, the Payment subsystem is bypassed for a store and Payment processing does not occur:
Payment Rule task command Void implementation
com.ibm.commerce.edp.commands.PrimePaymentCmd com.ibm.commerce.edp.commands.PrimePaymentVoidCmdImpl
com.ibm.commerce.edp.commands.ReservePaymentCmd com.ibm.commerce.edp.commands.ReservePaymentVoidCmdImpl
com.ibm.commerce.edp.commands.FinalizePaymentCmd com.ibm.commerce.edp.commands.FinalizePaymentVoidCmdImpl
com.ibm.commerce.edp.commands.TriggerPaymentActionsCmd com.ibm.commerce.edp.commands.TriggerPaymentActionsVoidCmdImpl
com.ibm.commerce.edp.commands.CancelOrderCmd com.ibm.commerce.edp.commands.CancelOrderVoidCmdImpl
com.ibm.commerce.edp.commands.StoreAndValidatePaymentCmd com.ibm.commerce.edp.commands.StoreAndValidatePaymentVoidCmdImpl
com.ibm.commerce.edp.commands.PIAddCmd com.ibm.commerce.edp.commands.PIAddVoidCmdImpl
com.ibm.commerce.edp.commands.QueryPIsCmd com.ibm.commerce.edp.commands.QueryPIsVoidCmdImpl
com.ibm.commerce.edp.commands.EDPPaymentInstructionsBeanCmd com.ibm.commerce.edp.commands.EDPPaymentInstructionsVoidBeanCmdImpl

To disable Payments for the whole site, replace STOREENT_ID with STOREENT_ID=0 when you perform the following procedure.

Procedure

  1. Update the CMDREG table to disable the default implementation. Insert the following SQL to replace the task commands with void implementations:
    
    INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET) VALUES
    (10001,'com.ibm.commerce.edp.commands.PrimePaymentCmd','com.ibm.commerce.edp.commands.PrimePaymentVoidCmdImpl','Local'); 
    INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET) VALUES
    (10001,'com.ibm.commerce.edp.commands.ReservePaymentCmd','com.ibm.commerce.edp.commands.ReservePaymentVoidCmdImpl','Local'); 
    INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET) VALUES
    (10001,'com.ibm.commerce.edp.commands.FinalizePaymentCmd','com.ibm.commerce.edp.commands.FinalizePaymentVoidCmdImpl','Local'); 
    INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET) VALUES
    (10001,'com.ibm.commerce.edp.commands.TriggerPaymentActionsCmd','com.ibm.commerce.edp.commands.TriggerPaymentActionsVoidCmdImpl','Local'); 
    INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET) VALUES
    (10001,'com.ibm.commerce.edp.commands.CancelOrderCmd','com.ibm.commerce.edp.commands.CancelOrderVoidCmdImpl','Local'); 
    INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET) VALUES
    (10001,'com.ibm.commerce.edp.commands.StoreAndValidatePaymentCmd','com.ibm.commerce.edp.commands.StoreAndValidatePaymentVoidCmdImpl','Local'); 
    INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET) VALUES
    (10001,'com.ibm.commerce.edp.commands.PIAddCmd','com.ibm.commerce.edp.commands.PIAddVoidCmdImpl','Local'); 
    INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET) VALUES
    (yourstoreid,'com.ibm.commerce.edp.commands.QueryPIsCmd','com.ibm.commerce.edp.commands.QueryPIsVoidCmdImpl','Local'); 
    INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET) VALUES
    (yourstoreid,'com.ibm.commerce.edp.commands.EDPPaymentInstructionsBeanCmd','com.ibm.commerce.edp.commands.EDPPaymentInstructionsVoidBeanCmdImpl','Local');
    
    Note: If the interfaces for a particular STOREENT_ID are defined, 'UPDATE' the tables with the related void implementation changes.
  2. For these changes to be recognized, restart the Commerce server.