PHP code example of personaliza / pag_seguro

1. Go to this page and download the library: Download personaliza/pag_seguro 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/ */

    

personaliza / pag_seguro example snippets


App::build(array('Plugin' => array(ROOT . '/Plugin/', ROOT . '/app/Plugin/')));

Configure::write('PagSeguro', array(
    'email' => 'seu-email-cadastrado@pagseguro',
    'token' => 'seu-token',
    'isSandbox' => true, // true|false
));

$this->Checkout->defineCredenciais('email cadastrado', 'token gerado');

public $components = array('PagSeguro.PagSeguro', 'PagSeguro.Checkout', 'PagSeguro.RetornoPagSeguro');

public $components = array('Outros componentes', 'PagSeguro.PagSeguro', 'PagSeguro.Checkout', 'PagSeguro.RetornoPagSeguro');