PHP Classes

API Getnet PHP Client: Access Getnet e-commerce Web services via its API

Recommend this page to a friend!
  Info   View files Example   View files View files (1)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 33 All time: 10,833 This week: 174Up
Version License PHP version Categories
getnet-api-client 1.0.0Custom (specified...5PHP 5, E-Commerce, Web services


This package is specific mainly for applications used in Brazil Brazil .

This package can be used to access Getnet e-commerce Web services via its API.

It provides classes that can send HTTP requests to the Getnet API Web server to execute several actions accessing its services. Currently it can:

- Generate a payment boleto and returning an id to access the page that presents that boleto
- Request a payment using a given credit card and obtain its authorization status

Picture of Jonatas Matheus Gino de Souza
Name: Jonatas Matheus Gino de ... <contact>
Classes: 1 package by
Country: Brazil Brazil
Age: ???
All time rank: 4494363 in Brazil Brazil
Week rank: 568 Up33 in Brazil Brazil Up


require_once $_SERVER['DOCUMENT_ROOT'] . '/GETNET-API-Client/Boleto.php';

$boleto = new Boleto();

$data = [
'amount' => '1000',
'name' => 'Payer Name',
'email' => '',
'document_type' => 'CPF', // CPF or CNPJ
'document_number' => '00000000000',
'phone_number' => '99999999999',
'street' => 'Street name',
'number' => '22',
'complement' => 'complement',
'district' => 'district name',
'city' => 'city name',
'state' => 'state name',
'country' => 'Brazil',
'postal_code' => 'postal_code',
'cardholder_name' => 'cardholder name',
'security_code' => 'security code',
'brand' => 'brand',
'expiration_date' => '12/23',
'card_number' => 'card number'

$retData = $boleto->doPayment($data);

$err = false;
$message = '';
$retData['payment_id'])) {
$message = '<b>The billing was successfully generated! <br> You can download your billing by clicking ate the following link: <b> <br><br>';
$message .= '<a href="' . $boleto->getServer(). $retData['boleto']['_links'][0]['href'] . '" target="_BLANK"> Download! </a>';
else {
$message = 'Payment unauthorized';


  Files folder image Files  
File Role Description
Files folder imagesamples (1 file)

  Files folder image Files  /  samples  
File Role Description
  Accessible without login Plain text file boleto.php Example Example script

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:10,833
This week:174Up