Commerce Boleto

This is a Brazilian Payment Method for Drupal Commerce. Learn more about Boleto at http://en.wikipedia.org/wiki/Boleto.

See module screenshots here

Main Features:
  • Out of the box it works with any Issuer Bank if you install their plugins.
  • Configuration option to enable / disable Issuer Banks.
  • Any number of banks can be enabled and therefore available to the buyer for picking one at the checkout payment pane.
  • Buyers can re-print the boleto by visiting their user page any time they want. The re-print option will be available as long as the Order has a pending status.
  • Custom modules and themes can implement hook_boleto_alter() for manipulating the boleto field values and theming before they get rendered. Here is a code example:

    <span style="color: #000000"><span style="color: #0000BB">&lt;?php<br></span><span style="color: #FF8000">/**<br> * Implements hook_boleto_alter().<br> */<br></span><span style="color: #007700">function </span><span style="color: #0000BB">MYMODULE_boleto_alter</span><span style="color: #007700">(&amp;</span><span style="color: #0000BB">$output</span><span style="color: #007700">, &amp;</span><span style="color: #0000BB">$template_file</span><span style="color: #007700">, </span><span style="color: #0000BB">$order</span><span style="color: #007700">) {<br>&#2013266080; </span><span style="color: #0000BB">$output</span><span style="color: #007700">[</span><span style="color: #DD0000">'sacado'</span><span style="color: #007700">] = </span><span style="color: #DD0000">'Nome do Sacado'</span><span style="color: #007700">;<br>&#2013266080; </span><span style="color: #0000BB">$output</span><span style="color: #007700">[</span><span style="color: #DD0000">'endereco1'</span><span style="color: #007700">] = </span><span style="color: #DD0000">'Endere&#2013265927;o 1'</span><span style="color: #007700">;<br>&#2013266080; </span><span style="color: #0000BB">$output</span><span style="color: #007700">[</span><span style="color: #DD0000">'endereco2'</span><span style="color: #007700">] = </span><span style="color: #DD0000">'Endere&#2013265927;o 2'</span><span style="color: #007700">;<br>&#2013266080; </span><span style="color: #FF8000">// Use boleto.tpl.php as example for creating your own boleto template.<br>&#2013266080; </span><span style="color: #0000BB">$template_file </span><span style="color: #007700">= </span><span style="color: #DD0000">'/home/public_html/meu_boleto_template.php'</span><span style="color: #007700">;<br>}<br></span><span style="color: #0000BB">?&gt;</span></span>

  • Dependencies:

    Installing Boleto Library PHP:

    1. Download it from here and copy the folder boleto-lib in to either sites/all/libraries or sites/<yourDomain>/libraries.
    2. Download at least one Issuer Bank plugin from this list here and copy it into ../boleto-lib/bancos/XXX Where XXX is the Issuer Bank code.
    3. It might perhaps be a good idea for you to read the Boleto Library PHP's instructions at https://github.com/drupalista-br/Boleto/blob/1.x-dev/README.md.

    Testing it:

    1. You might want to install Commerce Kickstart. It does all the tedious settings for Drupal Commerce and creates some dummy products.
    2. Enable Commerce Boleto module normally as you would with any other module
    3. Enable Boleto Payment Method at admin/commerce/config/payment-methods
    4. Edit the configuration settings at admin/commerce/config/payment-methods/manage/commerce_payment_boleto (Click on the "Edit" operation under Actions)
    5. Enable one or more Banks from the collapsible list.

    You can also help out by submitting issues for bugs and help support. It is worthy checking out the watch dog log if any unexpected result comes out.
    You are very much encoraged, if being the case for, to submit patches along too.