承接 railken/unicredit 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

railken/unicredit

最新稳定版本:v1.0.1

Composer 安装命令:

composer require railken/unicredit

包简介

README 文档

README

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

Links

Unicredit Backoffice

User: UNIBO

Password: UniBo2014

Unicredit Documentation

Unicredit Assistance

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

use Railken\Unicredit\Unicredit;

$uc = new Unicredit([
    'terminal_id' => '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

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@customer.com', 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

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;
}

统计信息

  • 总下载量: 3.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-02-27