Deprecated feature

Creating a payment policy

By default, WebSphere Commerce uses the Payment plug-in controller payment policies. To use WebSphere Commerce Multipayment Framework payment policies you need to register the payment policies in the database using compatibleMode.

Procedure

  1. Query the POLICY table to determine an unused payment policy_id: select max(policy_id)+1 as policy_id from policy

    The number returned is referred to as newPolicyID in the following steps.

  2. Add a new policy for your store into the POLICY database table. Insert a new row for your store in the POLICY database table for the cassette your are using:
    OracleNote: set define off; before executing the SQL statement.
    insert into policy values(newPolicyID,'OfflineCard','Payment',yourStoreID,'profileName=cassetteProfileName&cassetteName=cassetteName&attrPageName=JSPNameForCassette&display=true&compatibleMode=true',NULL,NULL,NULL) 
    For example:
    insert into policy values(11601,'OfflineCard','Payment',10051,'profileName=WC51_OfflineCard&cassetteName=valuesOfflineCard&
    attrPageName=StandardCreditCard&display=true&compatibleMode=true',NULL,NULL,NULL)

    Where:

    cassetteName
    The name of the cassette you want to configure.
    cassetteProfileName
    The Cashier profile name for the cassette. For more detail, refer standard Cashier profiles provided with WebSphere Commerce :
    JSPNameForCassette
    The JSP snippet name used by this payment method to generate an HTML page to prompt the user for payment attributes or parameter. For more detail, refer Defined payment business policy properties
  3. Insert a new row into the POLICYDESC database table that corresponds to the row you inserted into the POLICY database table. Ensure that the policy_id of the row you insert into the POLICYDESC database table matches the policy_id of the row you inserted into the POLICY database table.
     insert into policydesc values((newPolicyID,-1,'description','long description',NULL,NULL,NULL) 
    This example assumes that you are using English as your language that is why "-1" is used in the preceding SQL statement. For example:
    insert into policydesc values(11601,-1,'Credit Card','Credit Card(Offline)',NULL,NULL,NULL)
  4. Insert the rows for the Payments policy commands for compatible mode in the POLICYCMD database table. This corresponds to the rows you inserted into the POLICY database table.
    insert into policycmd values(newPolicyID,'com.ibm.commerce.payment.actions.commands.DoPaymentActionsCompatiblePolicyCmdImpl',NULL,NULL) 
    insert into policycmd values(newPolicyID,'com.ibm.commerce.payment.actions.commands.EditPaymentInstructionCompatiblePolicyCmdImpl',NULL,NULL) 
    insert into policycmd values(newPolicyID,'com.ibm.commerce.payment.actions.commands.QueryPaymentsInfoCompatiblePolicyCmdImpl',NULL,NULL) 
    insert into policycmd values(newPolicyID,'com.ibm.commerce.payment.commands.CheckPaymentAcceptPMCmdImpl' ,NULL,NULL) 
    insert into policycmd values(newPolicyID,'com.ibm.commerce.payment.commands.DoCancelPMCmdImpl',NULL,NULL) 
    insert into policycmd values(newPolicyID,'com.ibm.commerce.payment.commands.DoDepositPMCmdImpl',NULL,NULL) 
    insert into policycmd values(newPolicyID,'com.ibm.commerce.payment.commands.DoPaymentPMCmdImpl',NULL,NULL) 
    insert into policycmd values(newPolicyID,'com.ibm.commerce.payment.commands.DoRefundPMCmdImpl',NULL,NULL) 
    

What to do next

You have finished configuring WebSphere Commerce Payments. To verify that the configuration was successful, test that you can complete a shopping flow.