You can also have a look at this module:

https://www.magentocommerce.com/magento-connect/pagseguro-transparente.html

According to the module description:

> This extensions allows your store to acept payments using credit cards with PagSeguro without needing to redirect customer to Pagseguro's website. To use PagSeguro Transparente you should require authorization of PagSeguro UOL. You can find more details at official website.