PHP code example of inicial / itaucripto-php
1. Go to this page and download the library: Download inicial/itaucripto-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
inicial / itaucripto-php example snippets
cripto = new \Itaucripto\Itaucripto();
$itaucripto->setCompanyCode('J0098765430001220000002598');
$itaucripto->setEncryptionKey('12ASDFG456KWE078');
$itaucripto->setOrderNumber(substr(time(),-8));
$itaucripto->setAmount('1,57');
$itaucripto->setDraweeName('Fabiano Couto');
$itaucripto->setDraweeDocTypeCode('01');
$itaucripto->setDraweeDocNumber('61022645099');
$itaucripto->setDraweeAddress('Av Presidente Vargas');
$itaucripto->setDraweeAddressDistrict('Centro');
$itaucripto->setDraweeAddressCity('Rio de Janeiro');
$itaucripto->setDraweeAddressState('RJ');
$itaucripto->setDraweeAddressZipCode('20070006');
// $itaucripto->setCallbackUrl('http://www.domain.com/callback');
$itaucripto->setBankSlipDueDate(date('dmY', strtotime('+7 day')));
$itaucripto->setBankSlipNoteLine1('Sr. Caixa,');
$itaucripto->setBankSlipNoteLine2('Não receber após o vencimento.');
$itaucripto->setBankSlipNoteLine3('Obrigado.');
$itaucripto->setNote('3'); // Needed to display the three lines on the bank slip
$data = $itaucripto->generateData();
shell
$ composer