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"><?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">(&</span><span style="color: #0000BB">$output</span><span style="color: #007700">, &</span><span style="color: #0000BB">$template_file</span><span style="color: #007700">, </span><span style="color: #0000BB">$order</span><span style="color: #007700">) {<br>� </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>� </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�o 1'</span><span style="color: #007700">;<br>� </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�o 2'</span><span style="color: #007700">;<br>� </span><span style="color: #FF8000">// Use boleto.tpl.php as example for creating your own boleto template.<br>� </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">?></span></span>
- 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:
- Drupal Commerce and its dependencies.
- Libraries API 7.x-1.x
- Brazilian Tax Number Fields
- Boleto Library PHP 1.1 or higher| this is an external library also written by me.
- You have to install at least one Issuer Bank plugin, see list of all current available ones here | If the desired bank is not in the list, you can easily write a plugin for it. There is a link for instructions on that page on how to do just that.
Installing Boleto Library PHP:
-
- Download it from here and copy the folder boleto-lib in to either sites/all/libraries or sites/<yourDomain>/libraries.
-
- 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.
-
- 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:
-
- You might want to install Commerce Kickstart. It does all the tedious settings for Drupal Commerce and creates some dummy products.
-
- Enable Commerce Boleto module normally as you would with any other module
-
- Enable Boleto Payment Method at admin/commerce/config/payment-methods
-
- Edit the configuration settings at admin/commerce/config/payment-methods/manage/commerce_payment_boleto (Click on the "Edit" operation under Actions)
-
- 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.