Created
November 26, 2013 21:35
-
-
Save gstpereira/7666674 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
$payer = new \BUBB\Gateway\Clients\Payer(); | |
$payer->setName('Fernando Maia'); | |
$payer->setDocument('023.434.234-34'); | |
$payer->setAddress('ABC 302 Bloco N'); | |
$payer->setCity('Brasília'); | |
$payer->setZipCode('72000-000'); | |
$payer->setState('DF'); | |
$transferor = new \BUBB\Gateway\Clients\Transferor(); | |
$transferor->setName('Empresa de cosméticos LTDA'); | |
$transferor->setDocument('02.123.123/0001-11'); | |
$transferor->setAddress('CLS 403 Lj 23'); | |
$transferor->setCity('Brasília'); | |
$transferor->setZipCode('72000-000'); | |
$transferor->setState('DF'); | |
$sale = new \BUBB\Gateway\Clients\Sale(); | |
$sale->setValue(12.5); | |
$billet = new \BUBB\Gateway\Clients\Billet(); | |
$billet->setExpirationDate('25/11/2013'); | |
$billet->setSequential(1234567); | |
$billet->setAgency(1724); | |
$billet->setWallet(18); | |
$billet->setAccount(10403005); | |
$billet->setAgreement(1234); | |
$billet->setInstruction( | |
array( | |
'Após o dia 30/11 cobrar 2% de mora e 1% de juros ao dia.', | |
'Não receber após o vencimento.', | |
) | |
); | |
$billet->setDemonstrative( | |
array( | |
'Compra de materiais cosméticos', | |
'Compra de alicate', | |
) | |
); | |
$billet->setLogoPath('http://bubb.com.br/assets/img/logo.gif'); | |
$billet->setBank('BANCO_DO_BRASIL'); | |
$payment = new \BUBB\Gateway\Clients\Payment(); | |
$payment->setPaymentForm('boleto'); | |
$payment->setPayer($payer); | |
$payment->setTransferor($transferor); | |
$payment->setSale($sale); | |
$payment->setBillet($billet); | |
Gateway::execute($payment); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment