1. Go to this page and download the library: Download echowine/unicredit library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Railken\Unicredit\Unicredit;
# Make a new instance
$uc = new Unicredit();
# Create a random ID for an order
$order_id = md5(time());
# Make a payment for 10,00 EUR
# Return the Payment ID
$response = $uc->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;
}
use Railken\Unicredit\Unicredit;
# Retrieve $transaction_id and $order_id from DB/Cookie
# Make a new instance
$uc = new Unicredit();
$response = $uc->verify($order_id, $transaction_id);
if (!$response->error) {
# Success
} else {
# Get error
$error = $response->error->message;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.