定制 hansvn/laravel-icepay 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

hansvn/laravel-icepay

最新稳定版本:v0.1

Composer 安装命令:

composer require hansvn/laravel-icepay

包简介

Laravel integration of the icepay api

README 文档

README

This package a Laravel integration of the icepay api. The package can also be used as-is (i.e. without Laravel)

!IMPORTANT the package has not been tested yet on all platforms!

Requirements

  • PHP >=5.4

Getting started

Laravel < 5.0

  1. Install the hansvn/laravel-icepay package

    $ composer require hansvn/laravel-icepay
  2. Update app/config/app.php` to activate the package

    # Add `Hansvn\Icepay\IcepayServiceProvider` to the `providers` array
    'providers' => array(
        ...
        'Hansvn\Icepay\IcepayServiceProvider',
    )
    
    # Add the Icepay alias
    'aliases' => array(
        ...
        'Icepay'          => 'Hansvn\Icepay\Facades\Icepay',
    )
  3. Publish the config file

    $ php artisan config:publish hansvn/laravel-icepay
  4. Update app/config/packages/hansvn/icepay/config.php with your Icepay API key:

    return array(
        'MERCHANTID'	=> xxxxx,//<--- Change this into your own merchant ID
        'SECRETCODE'	=> "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",//<--- Change this into your own merchant ID 
        ...
    );
  5. Optionally, you can set the log option to true or false to keep logs of the icepay packages

    return array(
    	...
        'log'			=> true,
    );

Usage

Below is a simple usage example of this package

Generate a payment link for €10,00:

$icepay = \Icepay::paymentObject();
$icepay->setAmount(1000)
			->setCountry("BE")
			->setLanguage("NL")
			->setReference("My Sample Website")
			->setDescription("My Sample Payment")
			->setCurrency("EUR");

$basic = Icepay::basicMode();
$basic->validatePayment($icepay);

return sprintf("<a href=\"%s\">%s</a>",$basic->getURL(),$basic->getURL());

You can also take a look at my example usage repo of this package that saves the orders in a database

Contributing

Contributions are welcome.

Todo's

  • Write tests

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-09-10