Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/railken/unicredit
- Owner: railken
- License: mit
- Archived: true
- Created: 2016-09-16T09:29:39.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-06T03:47:22.000Z (about 6 years ago)
- Last Synced: 2024-09-30T15:17:33.615Z (about 1 month ago)
- Topics: composer, example, library, php, unicredit
- Language: PHP
- Size: 117 KB
- Stars: 6
- Watchers: 3
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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;
}```