Introduced in Feature Pack 1

Configuring the payment policy for the BoletoBancario payment method

To implement the Boleto Bancário payment method, you have to configure this payment method to map to the SimpleOffline plug-in.

Procedure

  1. Configure payment rules and payment mappings in the PaymentSystemPluginMapping XML file, which is located in the following directory:
    • WC_eardir/xml/config/payments/ppc/plugins
    • WebSphere Commerce Developerworkspace_dir/xml/config/payments/ppc/plugins
    For example:
    <PaymentSystemName name="BoletoOfflineSystem" >
        <Mapping paymentConfigurationId="default" pluginName="SimpleOffline" ></Mapping>
    </PaymentSystemName>
  2. Configure the SimpleOffline plug-in.
    Open SimpleOfflinePlugin.xml in the following path:
    • WC_eardir/xml/config/payments/ppc/plugins/SimpleOffline
    • WebSphere Commerce Developerworkspace_dir/xml/config/payments/ppc/plugins/SimpleOffline
    Add the following to this file:
    <PaymentMethod name="BoletoBancario" paymentConfiguration="default" keepPending>
         <Property name="billto_address1"/>
         <Property name="billto_country"/>
    </PaymentMethod>
  3. Configure the payment method mapping.
    Perform these steps in the following directory:
    • WC_eardir/xml/config/payments/edp/groups/yourGroup
    • WebSphere Commerce Developerworkspace_dir/xml/config/payments/edp/groups/yourGroup
    where yourGroup is the group you want to configure the payment mapping for.
    1. Create a directory called BoletoBancarioOffline.
    2. Copy all the files under the CreditCardOffline directory to the BoletoBancarioOffline directory.
    3. Configure payment rules and payment mappings in the PaymentMappings XML file. For example:
      <Mapping
               paymentMethod="BoletoBancario"
               paymentConfiguration="BoletoBancarioOffline"
               paymentActionRule="Early Deposit"/>
      where BoletoBancario is the name of the new policy you are working with.
      Note: If you already have a merchant configured, use the same merchant.
    4. Configure settings in the PaymentMethodConfigurations XML file.
      For example:
      <PaymentMethodConfiguration 
              name="BoletoBancarioOffline"
              paymentSystemName="BoletoOfflineSystem" 
              systemEditable="true"
              humanEditable="true"
              refundAllowed="true"
              minimumAmount="0"
              maximumAmount="Unbounded"
              priority="MEDIUM"
              dependentCreditRequired="true"
              partiallyConsumable="true"/>
      Note: If you already have a merchant configured for a store, use the same merchant.
    5. Configure refund methods in the RefundMethodConfigurations XML file. For example:
      <RefundMethodConfiguration 
       name="BoletoBancarioOffline"
       paymentSystemName="BoletoOfflineSystem" />
    6. Configure refund settings in the RefundMappings XML file.
      For example:
      <RefundMapping refundMethod="BoletoBancario" 
       refundConfiguration="BoletoBancarioOffline" />
  4. Create a payment method snippet for this policy.
    1. Create a new JSP file based on the sample file, BoletoBancario.jsp.
      Create the file in the following path:
      • WC_eardir/Stores.war/Brazil/Snippets/EDP/PaymentMethods
      • WebSphere Commerce Developerworkspace_dir/Stores/WebContent/Madisons/Snippets/EDP/PaymentMethods
      The name of the JSP file should be the same as payment policy you created. In this example, it is BoletoBancario.jsp.

      SolarisLinuxAIX Set the file permissions to ensure the files are readable to the user who starts the WebSphere Commerce server.

    2. Configure the new JSP file to the struts-config-ext.xml of the store.
      Open the struts-config-ext.xml in the following path:
      • WC_eardir/Stores.war/WEB-INF
      • WebSphere Commerce Developerworkspace_dir/Stores/WebContent/WEB-INF
    3. Find the following line in the new JSP file:
      <action path="/StandardVisa" type="com.ibm.commerce.struts.BaseAction"/>
      and append the following after it:
      <action path="/BoletoBancario" type="com.ibm.commerce.struts.BaseAction"/>
      <action path="/BoletoBancarioFormDisplayView" type="com.ibm.commerce.struts.BaseAction">
      <set-property property="https" value="storeId:1"/>
      </action>
      where the storeId is the ID of the store in which the Boleto payment will be used.
    4. Find the following line in the new JSP file:
      <forward className="com.ibm.commerce.struts.ECActionForward" name="StandardVisa/storeId" path="/Snippets/EDP/PaymentMethods/StandardVisa.jsp"/>
      and append the following after it:
      <forward className="com.ibm.commerce.struts.ECActionForward" name="BoletoBancario/storeId" path="/Snippets/EDP/PaymentMethods/BoletoBancario.jsp"/>
      <forward className="com.ibm.commerce.struts.ECActionForward" name="BoletoBancarioFormDisplayView/storeId" path="/Snippets/EDP/PaymentMethods/BoletoBancarioFormDisplay.jsp"/>
      where the storeId is the ID of the store in which the Boleto payment will be used.