This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of hook_someHook(). | |
*/ | |
function uc_boleto_someHook($someArgument) { | |
/** | |
* 1a Opcao: | |
*/ | |
$myArguments = array('library_location' => base_path().drupal_get_path('module', 'boleto').'/boleto-lib', //adjust to the location where you have stored Boleto's library. If it is outside your current application folder you gotta use ../ | |
'bank_code' => '001', //Merchant's bank code (NO check digit). Note that this is not the same as the branch number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of hook_someHook(). | |
*/ | |
function ub_boleto_someHook($someArgument) { | |
/** | |
* 2a Opcao - Usar o Modulo Libraries (RECOMMENDAVEL) | |
* Project: http://drupal.org/project/libraries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='ISO-8859-1'?> | |
<requisicao-transacao id='846f0af7e0cc7f8bd47ec7c99ee3056a' versao='1.1.0'> | |
<dados-ec> | |
<numero>1001734898</numero> | |
<chave>e84827130b9837473681c2787007da5914d6359947015a5cdb2b8843db0fa832</chave> | |
</dados-ec> | |
<dados-pedido> | |
<numero>4</numero> | |
<valor>100</valor> | |
<moeda>986</moeda> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[response] => Array | |
( | |
[@attributes] => Array | |
( | |
[versao] => 1.1.0 | |
[id] => 846f0af7e0cc7f8bd47ec7c99ee3056a | |
) | |
[tid] => 10017348980814F61001 | |
[dados-pedido] => Array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[response] => Array | |
( | |
[@attributes] => Array | |
( | |
[versao] => 1.1.0 | |
[id] => e12f2ffa513f26d03cb83d0b2d485daa | |
) | |
[tid] => 1001734898080DE3A001 | |
[dados-pedido] => Array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<transacao versao="1.1.0" id="dd07a04ebc4093747ef91b05f4d0b404" xmlns="http://ecommerce.cbmp.com.br"> | |
<tid>10017348980846041001</tid> | |
<pan>b1SQ6jpKCDt3n9C0dgD/ZkPQ1Bh+7aJESqr/CwP64P0=</pan> | |
<dados-pedido> | |
<numero>34</numero> | |
<valor>100</valor> | |
<moeda>986</moeda> | |
<data-hora>2012-05-29T17:08:31.874-03:00</data-hora> | |
<idioma>PT</idioma> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once '../boleto-lib/Boleto.class.php'; | |
$argumentos = array( | |
'bank_code' => '104', | |
'agencia' => 1234, | |
'agencia_dv' => '2', | |
'conta' => 12345678901, | |
'conta_dv' => 3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Unit testing. | |
*/ | |
require_once "../../../unit-testing/boleto.test.php"; | |
class TestOfXXX extends BoletoTestCase{ | |
protected $mockingArguments; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This code is released under the GNU General Public License. | |
* See COPYRIGHT.txt and LICENSE.txt. | |
* | |
* @author Fulano de Tal <[email protected]> | |
*/ | |
class Banco_XXX extends Boleto{ | |
function setUp(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once 'boleto-lib/Boleto.class.php'; | |
$argumentos = array( | |
// Argumentos aqui. | |
); | |
// Instancia o objeto. | |
$boleto = Boleto::load_boleto($argumentos); |
OlderNewer