Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fortnox API wrapper in PHP

Dependencies

  • php 7.0+
  • composer

Installation

Add this git as a repository in your composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/VinniaAB/fortnox.git"
    }
  ]
}

And then require the package:

composer require vinnia/fortnox --save

Usage

Aquire access token & client secret from fortnox. See http://developer.fortnox.se/documentation/general/authentication/

use Vinnia\Fortnox\Client;
use Vinnia\Fortnox\Util;

$accessToken = 'my-token';
$clientSecret = 'my-secret';

$client = Client::make($accessToken, $clientSecret);

$response = $client->getCustomer(1);
$customer = Util::parseResponse($response)['Customer'];
$customer['Name'] = 'Some Other Name';
$client->updateCustomer($customer['CustomerNumber'], $customer);

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages