PHPackages                             erilshk/vinti4net-legacy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. erilshk/vinti4net-legacy

Abandoned → [erilshk/vinti4net](/?search=erilshk%2Fvinti4net)Library[Payment Processing](/categories/payments)

erilshk/vinti4net-legacy
========================

SDK Legacy de integração com o Vinti4Net (SISP Cabo Verde) para pagamentos online, compatível com PHP 5.6+.

v2.0.0(7mo ago)04MITPHPPHP &gt;=5.6CI failing

Since Nov 17Pushed 7mo agoCompare

[ Source](https://github.com/erilshackle/vinti4net-legacy-php)[ Packagist](https://packagist.org/packages/erilshk/vinti4net-legacy)[ RSS](/packages/erilshk-vinti4net-legacy/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

📦 **vinti4net-legacy**
======================

[](#-vinti4net-legacy)

[![PHP Version](https://camo.githubusercontent.com/2f5805f5ae27c68008912e0acdc313d495e588d441dba9a042f1a79f5250eae7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6572696c73686b2f76696e7469346e65742d6c65676163793f636f6c6f723d707572706c65)](https://camo.githubusercontent.com/2f5805f5ae27c68008912e0acdc313d495e588d441dba9a042f1a79f5250eae7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6572696c73686b2f76696e7469346e65742d6c65676163793f636f6c6f723d707572706c65) [![Packagist Version](https://camo.githubusercontent.com/438c1f533322581953ad2a1d4d1117f453db92aaa023a2a64856fd53fb933be5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6572696c73686b2f76696e7469346e65742d6c65676163793f636f6c6f723d626c7565266c6162656c3d76657273696f6e)](https://camo.githubusercontent.com/438c1f533322581953ad2a1d4d1117f453db92aaa023a2a64856fd53fb933be5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6572696c73686b2f76696e7469346e65742d6c65676163793f636f6c6f723d626c7565266c6162656c3d76657273696f6e) [![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE) [![Tests](https://github.com/erilshackle/vinti4net-legacy-php/actions/workflows/phpunit.yml/badge.svg)](https://github.com/erilshackle/vinti4net-legacy-php/actions/workflows/phpunit.yml/badge.svg)

> ##### ⚠️ Considere usar **[erilshk\\vinti4net](https://packagist.org/packages/erilshk/vinti4net)** para **php +8.1**
>
> [](#️-considere-usar-erilshkvinti4net-para-php-81)

---

Biblioteca PHP **estável** e compativel com `erilshk\vinti4net` para integração com o **Vinti4Net (SISP – Cabo Verde)**, com suporte total a:

- **Compras (3D Secure)**
- **Pagamentos de serviços**
- **Recargas**
- **Estornos (Refund)**
- **DCC (Dynamic Currency Conversion)**
- **Fingerprints SHA512**

*Apesar de ter sido projetada para funcionar em ambientes modernos, a biblioteca mantém **compatibilidade com PHP 5.6+**, tornando-a ideal para sistemas legados que precisam de uma solução atualizada, segura e bem estruturada.*

---

📚 Instalação
------------

[](#-instalação)

Via Composer:

```
composer require erilshk/vinti4net-legacy
```

Ou manualmente, incluindo a classe diretamente no seu projeto legado.

[baixar aqui](https://github.com/erilshackle/vinti4net-legacy-php/releases/download/v1.0.0/Vinti4NetLegacy.php)

---

🔧 Exemplo rápido de uso
-----------------------

[](#-exemplo-rápido-de-uso)

### Criar pagamento (3D Secure)

[](#criar-pagamento-3d-secure)

```
require 'Vinti4NetLegacy.php';

$vinti4 = new Vinti4NetLegacy('POS123', 'ABCDEF123456');

$html = $vinti4
    ->preparePurchasePayment(1500, [
        'user' => [
            'email'   => 'cliente@example.com',
            'country' => '132',
            'city'    => 'Praia',
            'address' => 'Safende',
            'postCode'=> '7600'
        ]
    ])
    ->createPaymentForm('https://seusite.cv/retorno');

echo $html;
```

> Isso irá gerar um formulário HTML com auto-submit apontando para o Vinti4Net.

---

🔄 Processar retorno do pagamento
--------------------------------

[](#-processar-retorno-do-pagamento)

```
$response = $vinti4->processResponse($_POST);

if ($response['status'] === 'SUCCESS') {
    echo "Pagamento concluído!";
} elseif ($response['status'] === 'CANCELLED') {
    echo "O utilizador cancelou a operação.";
} else {
    echo "Falha: " . $response['message'];
}
```

A resposta já vem normalizada e inclui:

- `success`
- `message`
- `dcc` (se aplicável)
- `debug` (em caso de fingerprint inválido)

---

🧩 Métodos principais
--------------------

[](#-métodos-principais)

### 🔹 **preparePurchasePayment()**

[](#-preparepurchasepayment)

Prepara um pagamento de compra com 3D Secure.

### 🔹 **prepareServicePayment()**

[](#-prepareservicepayment)

Pagamentos de serviços com entidade + referência.

### 🔹 **prepareRechargePayment()**

[](#-preparerechargepayment)

Recargas de contas ou cartões.

### 🔹 **prepareRefundPayment()**

[](#-preparerefundpayment)

Reembolso de transações anteriores.

### 🔹 **setRequestParams()**

[](#-setrequestparams)

Define parâmetros adicionais opcionais.

### 🔹 **createPaymentForm()**

[](#-createpaymentform)

Gera o formulário HTML que inicia a transação.

### 🔹 **processResponse()**

[](#-processresponse)

Valida e interpreta as respostas do SISP.

---

🛠️ Requisitos
-------------

[](#️-requisitos)

- **PHP 5.6+**
- Extensões:

    - `json`
    - `bcmath`

---

🔐 Segurança
-----------

[](#-segurança)

- Fingerprint SHA512 implementado conforme especificações do SISP no código *MOP021*
- Sanitização e normalização de todos os campos enviados
- Prevenção de valores inesperados durante preparação do pedi

---

📜 Licença
---------

[](#-licença)

MIT — livre para uso pessoal e comercial.

---

👨‍💻 Autor
---------

[](#‍-autor)

**Eril TS Carvalho**Criador e mantenedor do SDK Legado.

[![GitHub Stars](https://camo.githubusercontent.com/fcbe74a4e3a47c0d078dff5c12f27a9340d417779bdbe664e9594fc42424e673/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6572696c736861636b6c652f76696e7469346e65742d6c65676163792d7068703f636f6c6f723d79656c6c6f77)](https://github.com/erilshackle/vinti4net-legacy-php/stargazers)

---

[![Coverage](https://camo.githubusercontent.com/d27add5991d8e42602eab7d074f9820efdd8dc1593dd5aa396205df38e535580/68747470733a2f2f636f6465636f762e696f2f67682f6572696c736861636b6c652f76696e7469346e65742d6c65676163792d7068702f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d34613335356262612d636434302d343931392d383038652d343066363439663761393961)](https://codecov.io/gh//erilshackle/vinti4net-legacy-php) [![GitHub Issues](https://camo.githubusercontent.com/af961bc02b94d4c8d712632589168e58e845c996bfc864105d640759c1941fd3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6572696c736861636b6c652f76696e7469346e65742d6c65676163792d7068703f636f6c6f723d726564)](https://github.com/erilshackle/vinti4net-legacy-php/issues) [![GitHub Forks](https://camo.githubusercontent.com/a342a7842cdfe6f7be5bdd2b9f885307246a764cb171a91256666bfcbbee0db1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6572696c736861636b6c652f76696e7469346e65742d6c65676163792d7068703f636f6c6f723d626c7565)](https://github.com/erilshackle/vinti4net-legacy-php/network/members)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance63

Regular maintenance activity

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

2

Last Release

223d ago

Major Versions

v1.0.0 → v2.0.02025-11-23

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/74083037?v=4)[Eril TS Carvalho](/maintainers/erilshackle)[@erilshackle](https://github.com/erilshackle)

---

Top Contributors

[![erilshackle](https://avatars.githubusercontent.com/u/74083037?v=4)](https://github.com/erilshackle "erilshackle (29 commits)")

---

Tags

caboverdephp-legacyphp-payment-libraryphp56portuguesevinti4netphpsdkpaymentsphp 7legacyPHP 5cabo-verdesispvinti4netRedeVinti4

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/erilshk-vinti4net-legacy/health.svg)

```
[![Health](https://phpackages.com/badges/erilshk-vinti4net-legacy/health.svg)](https://phpackages.com/packages/erilshk-vinti4net-legacy)
```

###  Alternatives

[kingflamez/laravelrave

A Laravel Package for Flutterwave Rave

153310.9k4](/packages/kingflamez-laravelrave)[yandex-money/yandex-money-sdk-php

Yandex.Money API SDK for PHP

105168.9k2](/packages/yandex-money-yandex-money-sdk-php)[cryptonator/merchant-php-sdk

Cryptonator.com Merchant API SDK for PHP

2714.4k](/packages/cryptonator-merchant-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
