PHPackages                             faxi-online/sisp-php - 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. faxi-online/sisp-php

ActiveLibrary[Payment Processing](/categories/payments)

faxi-online/sisp-php
====================

Implementation of a library to process SISP vinti4 payment in a easy way.

11154PHP

Since May 17Pushed 4y agoCompare

[ Source](https://github.com/Faxi-online/sisp-php)[ Packagist](https://packagist.org/packages/faxi-online/sisp-php)[ RSS](/packages/faxi-online-sisp-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SISP php
========

[](#sisp-php)

This is implementation of a library to process SISP vinti4  payment in a easy way.

Install
-------

[](#install)

Download the project folder on your project. Or install it using composer:

```
composer require faxi-online/sisp-php:dev-main

```

Include in your project
-----------------------

[](#include-in-your-project)

Import the library file;

```
include "../Sisp.php";
```

Or include the composer autoload

```
include "vendor/autoload.php";
```

Create Transaction Object
-------------------------

[](#create-transaction-object)

Create the transaction object from the **Sisp** class. You can pass three parameters:

- Your POS Id/Identifier
- The respective POS authentication code
- The VBV api URL, and it is set by default as "", remember to define it value in production, without the path "/CardPayment" because it will be added automatically according the transaction code

```
use Faxi\Sisp;

$payment = new Sisp(
        "90000045",
        "kfyhhKJH875ndu44"
    );
```

Generate Transaction id
-----------------------

[](#generate-transaction-id)

Generate your transaction id, it can be max of 15 characters, after a successful payment you should not reuse that id for new transaction.

```
// sample to generate id from timestamp
$transaction_id = "T" . date('YmdHms');
```

Generate the HTML buy form
--------------------------

[](#generate-the-html-buy-form)

You can generate the HTML form by calling the **buyForm** method. It receives three parameters:

- The transaction Id, you will receive it in the transaction callback
- The amount of the transaction
- The callback url, the transaction result will be sent to here

```
$buyForm = $payment->buyForm(
		$transaction_id,
		1000,
		"http://localhost/sisp-php/src/Faxi/samples/callback-buy.php"
	);
```

Put the form on your HTML page
------------------------------

[](#put-the-form-on-your-html-page)

Just put that form in your HTML page and submit it by calling **document.forms\[0\].submit();**

```

		Do payment

			Do payment

                            Start Transaction

			function startTransaction()
			{
				document.forms[0].submit();
			}

```

After submitted the form, you should be redirect to a page like the below.
[![Payment form](/docs/payment-form.png)](/docs/payment-form.png)

Transaction result callback
---------------------------

[](#transaction-result-callback)

To process callback result we should use the method **onTransactionResult**, it receive three parameters:

- The success callback function
- The error callback function
- The cancellation callback function

```
$payment = new Sisp(
        "90000045",
        "kfyhhKJH875ndu44"
    );

$payment->onTransactionResult(

	// success callback
	function ($transaction_id, $clearingPeriod, $sisp_transaction_id){

		echo "Payment sucessfully for $transaction_id";

		// save clearingPeriod and sisp_transaction_id
		// you will need them to do refund later
		echo "merchantRespCP: " . $clearingPeriod. "";
		echo "merchantRespTid: " . $sisp_transaction_id . "";

	},

	// error callback
	function ($transaction_id, $errorDescription, $errorDetail, $errorAdditionalMessage){

		echo "Error on transaction $transaction_id";
		echo "Error: description $errorDescription";
		echo "Error: detail $errorDetail";
		echo "Error: additional $errorAdditionalMessage";

	},

	// cancellation callback
	function (){

		echo "Transaction cancelled";

	}

);
```

Generate phone recharge HTML form
---------------------------------

[](#generate-phone-recharge-html-form)

You can generate the HTML form by calling the **phoneRechargeForm** method. It receives five parameters:

- The transaction Id, you will receive it in the transaction callback, it can be max of 15 characters
- The amount of the transaction
- The phone number you want to recharge
- The operator id (it will be provided by SISP)
- The callback url, the transaction result will be sent to here

```
$buyForm = $payment->phoneRechargeForm(
		$transaction_id,
		1000,
		9112233,
		2,
		"http://localhost/sisp-php/src/Faxi/samples/callback-buy.php"
	);
```

Generate service payment HTML form
----------------------------------

[](#generate-service-payment-html-form)

You can generate the HTML form by calling the **servicePaymentForm** method. It receives five parameters:

- The transaction Id, you will receive it in the transaction callback, it can be max of 15 characters
- The amount of the transaction
- The reference number of the bill you want to pay
- The enity id (it will be provided by SISP)
- The callback url, the transaction result will be sent to here

```
$buyForm = $payment->servicePaymentForm(
		$transaction_id,
		1000,
		"123456789",
		"6",
		"http://localhost/sisp-php/src/Faxi/samples/callback-buy.php"
	);
```

Generate refund HTML form
-------------------------

[](#generate-refund-html-form)

Call the **refundForm** method. It receives five parameters:

- The transaction Id, you will receive it in the transaction callback, it can be max of 15 characters, (It must not be the same as the transaction to be refunded)
- The amount to be refunded
- The clearing period number of transaction that is being refunded, it is received in transaction result
- The SISP transaction id received in transaction result
- The callback url, the refund result will be sent to here

```
$transaction_id = "T" . date('YmdHms');

$refundForm = $payment->refundForm(
		$transaction_id,
		1000,
		1765,
		76133,
		"http://localhost/sisp-php/src/Faxi/samples/callback-refund.php"
	);
```

To handle the refund result you must do the following code.

```
$payment->onRefundResult(

	// success callback
	function ($transaction_id){

		echo "Refunded done for $transaction_id";

	},

	// error callback
	function ($transaction_id, $errorDescription, $errorDetail, $errorAdditionalMessage){

		echo "Error on refund for $transaction_id";
		echo "Error: description $errorDescription";
		echo "Error: detail $errorDetail";
		echo "Error: additional $errorAdditionalMessage";

	},

	// cancellation callback
	function (){

		echo "Refund cancelled";

	}

);
```

Internationalization
--------------------

[](#internationalization)

If you want you can change the language of payment form presented to user, it supports en and pt.

```
$payment->lang = "pt";
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity26

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ddea7476f3b9f6e45ddfd0d32cb6b3c40f76041ab51aa330fa8bc0f75c43c3c8?d=identicon)[assisfery](/maintainers/assisfery)

---

Top Contributors

[![assisfery](https://avatars.githubusercontent.com/u/21959865?v=4)](https://github.com/assisfery "assisfery (24 commits)")

### Embed Badge

![Health badge](/badges/faxi-online-sisp-php/health.svg)

```
[![Health](https://phpackages.com/badges/faxi-online-sisp-php/health.svg)](https://phpackages.com/packages/faxi-online-sisp-php)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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