
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
- 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
workspace_dir/xml/config/payments/ppc/plugins
<PaymentSystemName name="BoletoOfflineSystem" > <Mapping paymentConfigurationId="default" pluginName="SimpleOffline" ></Mapping> </PaymentSystemName>
- Configure the SimpleOffline plug-in.Open SimpleOfflinePlugin.xml in the following path:
- WC_eardir/xml/config/payments/ppc/plugins/SimpleOffline
workspace_dir/xml/config/payments/ppc/plugins/SimpleOffline
<PaymentMethod name="BoletoBancario" paymentConfiguration="default" keepPending> <Property name="billto_address1"/> <Property name="billto_country"/> </PaymentMethod>
- Configure the payment method mapping.Perform these steps in the following directory:
- WC_eardir/xml/config/payments/edp/groups/yourGroup
workspace_dir/xml/config/payments/edp/groups/yourGroup
- Create a directory called BoletoBancarioOffline.
- Copy all the files under the CreditCardOffline directory to the BoletoBancarioOffline directory.
- Configure payment rules and payment mappings in the PaymentMappings
XML file. For example:
where<Mapping paymentMethod="BoletoBancario" paymentConfiguration="BoletoBancarioOffline" paymentActionRule="Early Deposit"/>
BoletoBancario
is the name of the new policy you are working with.Note: If you already have a merchant configured, use the same merchant. - 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. - Configure refund methods in the RefundMethodConfigurations
XML file. For example:
<RefundMethodConfiguration name="BoletoBancarioOffline" paymentSystemName="BoletoOfflineSystem" />
- Configure refund settings in the RefundMappings
XML file.For example:
<RefundMapping refundMethod="BoletoBancario" refundConfiguration="BoletoBancarioOffline" />
- Create a payment method snippet for this policy.
- 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
workspace_dir/Stores/WebContent/Madisons/Snippets/EDP/PaymentMethods
Set the file permissions to ensure the files are readable to the user who starts the WebSphere Commerce server.
- 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
workspace_dir/Stores/WebContent/WEB-INF
- Find the following line in the new JSP file:
and append the following after it:<action path="/StandardVisa" type="com.ibm.commerce.struts.BaseAction"/>
where the storeId is the ID of the store in which the Boleto payment will be used.<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>
- Find the following line in the new JSP file:
and append the following after it:<forward className="com.ibm.commerce.struts.ECActionForward" name="StandardVisa/storeId" path="/Snippets/EDP/PaymentMethods/StandardVisa.jsp"/>
where the storeId is the ID of the store in which the Boleto payment will be used.<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"/>
- Create a new JSP file based on the sample file, BoletoBancario.jsp.