codedge/laravel-sofortlib
最新稳定版本:0.1.1
Composer 安装命令:
composer require codedge/laravel-sofortlib
包简介
Laravel package for use with SofortLib/SOFORT API, provides a facade to work with.
README 文档
README
Laravel integration for Sofortlib
This repository implements a simple ServiceProvider that creates a singleton instance of the Sofortlib client easily accessible via a Facade.
See SofortLib for more information about the usage.
Installation
$ composer require codedge/laravel-sofortlib
The package registers itself.
Next run
php artisan vendor:publish --provider="Codedge\Sofortlib\SofortlibServiceProvider" --tag=config
to publish the configuration file for the SOFORT API to config/sofortlib.php.
Note: Open this file and enter your correct API credentials and other settings.
Usage
To use the static interfaces (facades) you need to add the following lines to your config/app.php.
Sofortüberweisung
// app/Http/routes.php Route::get('/', function () { Sofortueberweisung::setAmount(5); Sofortueberweisung::setCurrencyCode('EUR'); Sofortueberweisung::sendRequest(); if(Sofortueberweisung::isError()) { // do something... } });
Billcode
// app/Http/routes.php Route::get('/', function () { Billcode::setAmount(47.11); Billcode::setCurrencyCode('USD'); Billcode::createBillcode(); if(Billcode::isError()) { // do something... } });
统计信息
- 总下载量: 2.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-05-23