kfoobar/laravel-fortnox 问题修复 & 功能扩展

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

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

kfoobar/laravel-fortnox

最新稳定版本:v0.1.3

Composer 安装命令:

composer create-project kfoobar/laravel-fortnox

包简介

Fortnox API Client for Laravel

README 文档

README

Simplifies integration with the Fortnox API.

Please notice! This package does not yet support all available resources in the Fortnox API

Requirements

  • Laravel 6 or higher
  • PHP 8.0 or higher
  • Valid client id (from Fortnox)
  • Valid client secret (from Fortnox)
  • Valid refresh token (from Fortnox)

Installation

You can install the package via Composer:

composer require kfoobar/laravel-fortnox

Settings for .env

FORTNOX_CLIENT_ID=
FORTNOX_CLIENT_SECRET=
FORTNOX_REFRESH_TOKEN=

Fortnox authorization

In order to use the Fortnox API, you need a valid refresh token. To get a refresh token, you need to grant access to the integration via Fortnox's OAuth2 authorization code flow. In that process, you are assigned an authorization code that you can use to exchange for a pair of token:

The access token - which is used to authenticate all API request - is only valid for 1 hour and needs to be refreshed using a refresh token. This package handles that process as long you have a valid refresh token.

The refresh token - which is used to renew the access token - is valid for 30 days. If it expires, you need to redo the OAuth2 authorization flow.

Every time you renew you access token, you will be assigned a new refresh token that is valid for another 30 days. It is therefore important that you regularly renew the tokens so that the refresh token does not expire.

You can renew your tokens with the following command:

php artisan fortnox:refresh

Both the access token and the refresh token are stored in your application's cache. Keep this in mind when you purge the cache or changes cache driver.

Instructions

Coming soon...

Contributing

Contributions are welcome!

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固