NAME
PagSeguro::API::Payment - Classe que implementa features de pagamento da API
SYNOPSIS
use PagSeguro::API;
# new instance
my $p = PagSeguro::API->new;
#configure
$p->email('foo@bar.com');
$p->token('95112EE828D94278BD394E91C4388F20');
# new payment
my $payment = $p->payment_request;
$payment->reference('XXX');
$payment->notification_url('http://google.com');
$payment->redirect_url('http://url_of_love.com.br');
$payment->add_item(
id => $product->id,
description => $product->title,
amount => $product->price,
weight => $product->weight
);
my $response = $payment->request;
# or by html form
my $html_form = $payment->request_form;
# error
die "Error: ". $response->error if $response->error;
my $data = $response->data;
say $data->{payment_url};
DESCRIPTION
Esta classe implementa a parte de pagamento da API do PagSeguro.
AUTHOR
Daniel Vinciguerra <daniel.vinciguerra@bivee.com.br>