hkucuk/iyzico 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

hkucuk/iyzico

最新稳定版本:v1.0.0

Composer 安装命令:

composer require hkucuk/iyzico

包简介

iyzico payment system laravel package

README 文档

README

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

This package offers simply iyzico laravel bundled payment system API for PHP Framework.

Installation

The hkucuk/iyzico Service Provider can be installed via Composer by requiring the hkucuk/iyzico package in your project's composer.json.

{
    "require": {
        "hkucuk/iyzico": "v1.0.0"
    }
}

After need update composer

composer update

To use the hkucuk/iyzico Service Provider, you must register the provider when bootstrapping your Laravel application.

Find the providers key in your config/app.php and register the hkucuk/iyzico Service Provider.

    'providers' => array(
        // ...
        'Hkucuk\Iyzico\IyzicoServiceProvider',
    )

Find the aliases key in your config/app.php and add the AWS facade alias.

    'aliases' => array(
        // ...
        'Iyzico'		  => 'Hkucuk\Iyzico\Facades\Iyzico',
    )

Configuration

By default, the package uses the following environment variables to auto-configure the plugin without modification:

api_id
secret

To customize the configuration file, publish the package configuration using Artisan.

php artisan vendor:publish

Update your settings in the generated app/config/packages/hkucuk/iyzico/config.php configuration file.

return array(

    'api_id' => 'iyzico-api-id',

    'secret' => 'iyzico-secret'

);

Usage

İyzico working principle is two request, two response. We want the first payment forms iyzico like this:

  $data = array(
		"customer_language" => "tr",
		"mode" => "test",
		"external_id" => rand(),
		"type" => "CC.DB",
		"installment" => true,
		"amount" => 1099,
		"return_url" => "http://example.com/iyzicoResponse",
		"currency" => "TRY"
	);

	$response = Iyzico::getForm($data);

	echo $response->code_snippet;

code_snippet will return to us with means of payment form iyzico.

After payment form approved will send the results to return iyzico mentioned URLs.

  $data = json_decode(Input::get("json"), true);
  var_dump($data);

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-08-19