WebService::BR::AceitaFacil - Perl low level implementation of the https://aceitafacil.com.br brazilian payment gateway.
use WebService::BR::AceitaFacil; my $gateway = new WebService::BR::AceitaFacil( api_key => 'YOUR SECRET KEY' ); # Or, if you want to use the sandbox: my $gateway = new WebService::BR::AceitaFacil( api_key => 'YOUR SECRET KEY', target => 'sandbox' ); # Create a new bankslip and the the PDF download URL of the document. my $response = $gateway->post( 'operation', { buyer => { id => "..." }, items => [{ vendor => { id => "..." }, amount => 123.45, description => 'My cool product' }], payment_method => "BOLETO_UNREGISTERED" } ); # Error if ( !$response || $response->{ErrorStatus} || !$response->{boleto_url} ) { print $response->{ErrorStatus} || 'UNKNOWN ERROR'; # OK } else { print $response->{boleto_url}; } # Check if a previously created bankslip was is paid or not. my $invoice = $gateway->get( 'invoice/< INVOICE ID HERE >' ); print $invoice->{paid_amount}; print $invoice->{total_amount};
This is a straight brindge to the AceitaFacil.com.br payment gateway API.
Please check AceitaFacil's full API docs at http://www.aceitafacil.com.br/ (you will need an API key to access this page).
Diego de Lima, <diego_de_lima@hotmail.com>
This module was kindly made available by the https://modeloinicial.com.br/ team.
Copyright (C) 2017 by Diego de Lima
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
To install WebService::BR::AceitaFacil, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::BR::AceitaFacil
CPAN shell
perl -MCPAN -e shell install WebService::BR::AceitaFacil
For more information on module installation, please visit the detailed CPAN module installation guide.