How to set up PagSeguro payment gateway with the system?

Integration with PagSeguro https://pagseguro.uol.com.br/

PagSeguro side:

1. Login to your Pagseguro merchant account and navigate to a page Preferências->Integrações

2. Generate TOKEN, save the value somewhere

3. Put in the field Retorno automático de dados (https://pagseguro.uol.com.br/integracao/retorno-automatico-de-dados.jhtml): https://YOURDOMAINNAME/exec/payment/pagseguro.jsp


*Replace YOURDOMAINNAME with your actual domain name

 

Website side:

1. Log in to admin area of your website

2. Go to Payment Engines: yourdomainname.com/exec/manager/paymentsystems

3. Add Pagseguro payment system with the following parameters:

  • Name - could be any

  • Short Name - could be any

  • Description - could be any

  • URL:
    post:https://pagseguro.uol.com.br/checkout/checkout.jhtml?email_cobranca=<pagseguro_email_account>&tipo=CP&moeda=BRL&item_id_1=1&item_quant_1=1&item_valor_1=%package_ext_id%&ref_transacao=%customer_id%:%package_id%:SHA1(%package_ext_id%<pagseguro_token>)&encoding=UTF-8&item_frete_1=0&item_peso_1=0&tipo_frete=EN

    *Replace <pagseguro_email_account> with your real PagSeguro email and <pagseguro_token> with generated Token value

  • Cancel URL - http://pagseguro.uol.com.br/

  • Required Params - item_descr_1

4. Check “Visible”

5. Click “Add”.

6. Go to Payment Packages: yourdomainname/exec/manager/paymentpackages

7. Add Payment packages with the following parameters:

Field

Example value

Note

Package ID

15.00

a price customer would pay in BRL

Price(credits)

15

how much credits customer will receive for this price

Description:

could be any text

this text customer will see at the add funds page

Additional parameters:

item_descr_1=R$15 credits for 15

a text after “item_descr_1=” visible on the PagSeguro website during the payment

8. Click “Add”

Should be something like this:

9. Ready.

 

If you would like to test it in SandBox mode, you need to add ''sandbox.'' prefix to URL

https://pagseguro.uol.com.br https://sandbox.pagseguro.uol.com.br https://ws.pagseguro.uol.com.br https://ws.sandbox.pagseguro.uol.com.br https://stc.pagseguro.uol.com.br https://stc.sandbox.pagseguro.uol.com.br