Introduced in Feature Pack 1

Creating the policy for the payment method

To add a new payment business policy, update the WebSphere Commerce database with the policy name and attributes of the policy.

Procedure

Run an SQL statement to insert data into the database.
For instance, the SiTefVisa payment method uses the following SQL:
insert into policy
    (policy_id, policyname, policytype_id,storeent_id, properties )values( your_policy_id, 'SiTefVisa', 'Payment', yourStoreId,'attrPageName=StandardVisa&paymentConfigurationId=configurationGroup&display=true&compatibleMode=false');
insert into policydesc
    (policy_id, language_id, Description,longDescription )values( your_policy_id, -1, 'Visa-SiTef', 'Visa Credit Card For SiTef' );
insert into policydesc
    (policy_id, language_id, Description,longDescription )values( your_policy_id, -6, 'Visa-SiTef', 'Cartão de Crédito Visa para SiTef' );
insert into policycmd 
    (policy_id, businesscmdclass) values (your_policy_id, 'com.ibm.commerce.payment.actions.commands.DoPaymentActionsPolicyCmdImpl') ;
insert into policycmd 
    (policy_id, businesscmdclass) values (your_policy_id, 'com.ibm.commerce.payment.actions.commands.EditPaymentInstructionPolicyCmdImpl') ;
insert into policycmd 
    (policy_id, businesscmdclass) values (your_policy_id,
'com.ibm.commerce.payment.actions.commands.QueryPaymentsInfoPolicyCmdImpl');
Where:
your_policy_id
is an unused policy identification number. To determine an unused policy identification number run the following SQL statement:
select policy_id from policy; 
The value of policy_id in all the SQL statements should be the same.
yourstoreId
is the ID of the store you want to enable the plug-in for. To determine the store ID, run the following SQL statement:
Select * from storeent; 
configurationGroup
is the configuration group for your store. WebSphere Commerce provides a ready-to-use payment configuration group named default that you can use for your store.
Note: The language_id value -6 indicates Brazilian Portuguese.
Important:
  • OracleBefore executing the SQL statement, issue the following directive:
     set define off; 
    Otherwise, the ampersand symbol ("&") that the statement contains will cause unexpected behavior.
  • DB2Execute the last SQL statement in the DB2 Command Line Processor. Because it contains the ampersand symbol ("&"), executing the statement in the command window will cause unexpected behavior.

For more information, refer to the defined payment business policy properties.