Enabling dependent credit support

You must perform the following procedure to enable support for dependent credit transactions.

Before you begin

Before enabling dependent credit support, ensure that the contract terms and conditions allow dependent credit. If the terms and conditions do not allow dependent credit; then add a condition for dependent credit.

Procedure

  1. Check whether this new policy has been registered in the database.
    1. Determine whether the policy is registered in the POLICY table.
      You can determine this using the following SQL statement:
      SELECT * FROM POLICY WHERE POLICYTYPE_ID='ReturnPayment' AND POLICY_ID=-2002;
      If the record does not exist, insert a new record for this policy using the following SQL statement:
      INSERT INTO POLICY 
         VALUES(-2002,'DependentCreditSupport','ReturnPayment',-1,NULL,NULL,NULL,NULL);
    2. Determine whether the policy is registered in the POLICYDESC table.
      You can determine this using the following SQL statement:
      SELECT * FROM POLICYDESC WHERE POLICY_ID=-2002;
      If the record does not exist, insert a new record for the corresponding policy description using an SQL statement similar to the following example for each language that your store supports:
      INSERT INTO POLICYDESC 
         VALUES(-2002,-1,'Dependent Credit Support',
            'Use Original Payment Methods with Dependent Credit Support',NULL,NULL,NULL);
    3. Determine whether the policy is registered in the POLICYCMD table.
      You can determine this using the following SQL statement:
      SELECT * FROM POLICYCMD WHERE POLICY_ID=-2002;
      If the record does not exist, insert a new record to register this policy with the dependent credit policy command using the following SQL statement:
      INSERT INTO POLICYCMD 
         VALUES(-2002,
            'com.ibm.commerce.returns.commands.RefundWithDependentSupportPolicyCmdImpl',
            NULL,NULL);
  2. Configure whether the specified payment method requires dependent credit.
    For each configuration of the payment method requiring dependent credit in the PaymentMethodConfigurations.xml file, add a new attribute dependentCreditRequired="true". For example, the following sample illustrates the CreditCardOffline payment method configuration file with the new attribute highlighted in bold.
    <?xml version="1.0" encoding="UTF-8"?>
    <PaymentMethodConfigurations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:noNamespaceSchemaLocation="com/ibm/commerce/edp/parsers/PaymentMethodConfigurations.xsd">
       <PaymentMethodConfiguration 
             name="CreditCardOffline" 
             paymentSystemName="OfflineCreditCardSystem" 
             systemEditable="true" 
             humanEditable="true" 
             refundAllowed="true" 
             minimumAmount="0" 
             maximumAmount="Unbounded" 
             priority="MEDIUM" 
             partiallyConsumable="true" 
             dependentCreditRequired="true" />
    </PaymentMethodConfigurations>
  3. Configure a new keyword of protocol data that needs to be persisted for the originalPaymentInstructionId payment method indicating original payment instruction ID.
    In the PaymentSystemPluginMapping.xml, add a new originalPaymentInstructionId retain Keywords. For example, the following sample illustrates the updated section of the mapping file with the new keyword highlighted in bold.
    <RetainKeywords>
       <Keyword name="billing_address_id"/>
       <Keyword name="payment_method"/>
       <Keyword name="paymentTCId"/>
       <Keyword name="purchaseorder_id"/>
       <Keyword name="originalPaymentInstructionId"/>
    </RetainKeywords>