PHPackages                             webgriffe/lib-unicredit-imprese - 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. webgriffe/lib-unicredit-imprese

ActiveLibrary

webgriffe/lib-unicredit-imprese
===============================

2.0.10(3y ago)37.5k3proprietaryPHP

Since Feb 20Pushed 3y ago2 watchersCompare

[ Source](https://github.com/webgriffe/lib-unicredit-imprese)[ Packagist](https://packagist.org/packages/webgriffe/lib-unicredit-imprese)[ RSS](/packages/webgriffe-lib-unicredit-imprese/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (13)Used By (0)

Webgriffe UnicreditImprese PHP library
======================================

[](#webgriffe-unicreditimprese-php-library)

[![Run Status](https://camo.githubusercontent.com/38416983ff73642ea927eac859cfca104239824a47e133d4bc43af2e6bffca80/68747470733a2f2f7472617669732d63692e6f72672f7765626772696666652f6c69622d756e696372656469742d696d70726573652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/webgriffe/lib-unicredit-imprese)

This library provides an integration with the WebServices of Unicredit PagOnline Imprese payment gateway. It was developed by following the technical documentation v.07 of 07/02/2017 provided by Unicredit.

Installation
------------

[](#installation)

In order to use this library you have to import it through composer:

```
composer require webgriffe/lib-unicredit-imprese

```

Usage
-----

[](#usage)

**Payment Initialization**

First of all, get an instance of the *Webgriffe\\LibUnicreditImprese\\Client* class. Then, before starting the actual payment, call the *init()* method to set a few basic values, such as whether the library must work in test mode or live mode, the ksig key (provided by Unicredit), the terminal id (provided by Unicredit) and the WSDL URL (which changes between the live and test environments). This call will prepare the client for the actual work.

After executing the *init()* call, you can call the *paymentInit()* method to initiate an actual payment request. This method takes a number of arguments including the transaction type (authorize-only or authorize-and-capture), the payment amount, the payment page language code, the payment currency and so on. The notifyUrl argument is the URL that Unicredit will redirect the customer to if the payment is succesful. However, if a serious error occurs, the customer will be redirected to the error URL.

The *paymentInit()* method takes care to format all arguments in the correct way, sign them using the secret ksig value and send them to Unicredit. Afterwards the returning response is received and parsed, and the result of this operation is a *Webgriffe\\LibUnicreditImprese\\PaymentInit\\Response* object. This ibject contains the outcome of the *paymentInit()* operation; If an error occurred, the *getError()* and *getErrorDesc()* methods of this object van be used to check what error occurred. If there was no error, then Unicredit will return a payment id and a redirect URL, which can be accessed using the *getPaymentId()* and *getRedirectUrl()* methods of the Response object.

If the *paymentInit()* operation is succesful, then the payment id contained in the response should be saved and the user should be redirected to the URL provided by Unicredit. This will take the user to a page where he/she will be asked to provide the actual payment information required to complete the transaction (credit card number and the like).

After this phase, if an error occurs, then the user is redirected to the error URL. Otherwise he/she is redirected to the notify URL. In the latter case it's necessary to verify the payment outcome manually, even if the customer reaches the notify URL.

**Payment verification**

To verify the status of a payment it's possible to use the *paymentVerify()* method. This method requires a shop-id (a manually-generated transaction identifier, usually an order id) and the payment id that was provided by Unicredit with the *paymentInit()* call.

With these values the *paymentVerify()* method can check the state of the corresponding payment, returning it as a *Webgriffe\\LibUnicreditImprese\\PaymentVerify\\Response* object. Once again, the *getError()* and *getErrorDesc()* methods can be used to check for errors, but here it's possibile to use the *getRc()*, *getTranId()*, *getAuthCode()*, *getEnrStatus()* and *getAuthStatus()* methods to retrieve pieces of information from the verification result.

Unlike other payment gateways, Unicredit does not perform a server-to-server call to notify about payment approvals. Instead it is the responsibility of the merchant to periodically check the status of each payment. This can be easily done using the aforementioned *paymentVerify()* method.

Contributing
------------

[](#contributing)

Fork this repository, make your changes and submit a pull request. Please run the tests and the coding standards checks before submitting a pull request. You can do it with:

```
composer install
vendor/bin/phpspec run
vendor/bin/phpcs

```

License
-------

[](#license)

This library is under the MIT license. See the complete license in the LICENSE file.

Credits
-------

[](#credits)

Developed by [Webgriffe®](http://www.webgriffe.com/).

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 85.3% 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 ~178 days

Recently: every ~384 days

Total

12

Last Release

1405d ago

Major Versions

1.0.0 → 2.0.02017-10-30

### Community

Maintainers

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

---

Top Contributors

[![azambon](https://avatars.githubusercontent.com/u/2920227?v=4)](https://github.com/azambon "azambon (29 commits)")[![LucaGallinari](https://avatars.githubusercontent.com/u/5822554?v=4)](https://github.com/LucaGallinari "LucaGallinari (4 commits)")[![mmenozzi](https://avatars.githubusercontent.com/u/1199914?v=4)](https://github.com/mmenozzi "mmenozzi (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/webgriffe-lib-unicredit-imprese/health.svg)

```
[![Health](https://phpackages.com/badges/webgriffe-lib-unicredit-imprese/health.svg)](https://phpackages.com/packages/webgriffe-lib-unicredit-imprese)
```

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k4](/packages/elgg-elgg)[neos/flow

Flow Application Framework

862.0M449](/packages/neos-flow)[api-platform/metadata

API Resource-oriented metadata attributes and factories

223.5M96](/packages/api-platform-metadata)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[flowwow/cloudpayments-php-client

cloudpayments api client

2188.2k](/packages/flowwow-cloudpayments-php-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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