Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/railken/unicredit

unicredit library for online payments
https://github.com/railken/unicredit

composer example library php unicredit

Last synced: about 1 month ago
JSON representation

unicredit library for online payments

Awesome Lists containing this project

README

        

# Unicredit
A very very very simple library that performs online payments with unicredit.
This is more an example than an actual library.

# Links
[Unicredit Backoffice](https://testeps.netswgroup.it/UNI_CG_BO_WEB/app/login/show)

User: UNIBO

Password: UniBo2014

[Unicredit Documentation](https://testeps.netswgroup.it/UNI_CG_BRANDING/UNI/doc/api_manual.pdf)

[Unicredit Assistance](https://trasparenza.unicredit.it/pdfprod/GP49-PAGAMENTI-ELETTRONICI--SERVIZIO-PAGONLINE-CARTE_IT.pdf)

The original library can be found in the Backoffice under the following path:

```PROFILO ESERCENTE >> Documentazione e Supporto >> API Pack```

# Installation
```
$ composer require railken/unicredit
```

# Basic configuration

```php
'UNI_ECOM',
'api_key' => 'UNI_TESTKEY',
'currency' => 'EUR',
'lang' => 'IT',
'base_url' => 'https://testuni.netsw.it',
'verify_url' => 'http://localhost/verify.php',
'error_url' => 'http://localhost/error.php'
]);
```

# Checkout page

```php
payment($order_id, '[email protected]', 10);

if (!$response->error) {

# IMPORTANT !!!
# Save $order_id and $transaction_id in DB or Cookie in order to retrieve in the next page

# Redirect to the checkout
$response->redirect_url;

}else{

# Get error
$error = $response->error->message;
}

```

# Verify page

```php
verify($order_id, $transaction_id);

if (!$response->error) {

# Success

} else {
# Get error
$error = $response->error->message;
}

```