Skip to content

Instantly share code, notes, and snippets.

@drupalista-br
Created July 24, 2012 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drupalista-br/3167333 to your computer and use it in GitHub Desktop.
Save drupalista-br/3167333 to your computer and use it in GitHub Desktop.
Sample code on how to implement the bank plugin class.
<?php
/**
* This code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*
* @author Fulano de Tal <fulanodetal@servidor.com>
*/
class Banco_XXX extends Boleto{
function setUp(){
$this->bank_name = 'Nome do Banco Sendo Implementado';
}
function febraban_20to44() {
// Calcule as posições 20 a 44 do número febraban de acordo com
// os argumentos em $this->arguments e com as regras da(s)
// carteira(s) do banco.
// ...
// Salve o número com 25 digitos na propriedade febraban['20-44'].
$this->febraban['20-44'] = $numero_calculado;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment