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 (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 34 All time: 10,987 This week: 455Up
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: 4507366 in Brazil Brazil
Week rank: 271 Up21 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';




A client to consume Getnet API services

  Files folder image Files  
File Role Description
Files folder imageGETNET-API-Client (3 files)
Files folder imagesamples (2 files)
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  GETNET-API-Client  
File Role Description
  Plain text file Auth.php Class Class source
  Plain text file Boleto.php Class Class source
  Plain text file Credit.php Class Class source

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

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