PHPackages                             issamlk1/laravel7-netsuite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. issamlk1/laravel7-netsuite

ActiveLibrary[API Development](/categories/api)

issamlk1/laravel7-netsuite
==========================

A laravel5 wrapper around ryanwinchester/netsuite-php

2.0.2(6y ago)05MITPHP

Since Nov 17Pushed 5y agoCompare

[ Source](https://github.com/issamlk1/laravel7-netsuite)[ Packagist](https://packagist.org/packages/issamlk1/laravel7-netsuite)[ RSS](/packages/issamlk1-laravel7-netsuite/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (7)Used By (0)

based on usulix/laravel-netsuite just updated to laravel 7
==========================================================

[](#based-on-usulixlaravel-netsuite-just-updated-to-laravel-7)

[ryanwinchester/netsuite-php](https://github.com/ryanwinchester/netsuite-php) is a php package which wraps the [NetSuite PHP Toolkit](http://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml)in an easier to use API. ryanwinchester/netsuite-php targets NetSuite WebServices.

This package wraps ryanwinchester/netsuite-php in a standard Laravel 5 package and also adds a basic API for targeting NetSuite RESTlets

Installation
------------

[](#installation)

Will use the latest `ryanwinchester/netsuite-php` version up to `v2018.2.0`

```
    composer require issamlk1/laravel-netsuite

```

if an older version say `v2017.1.1` or `v2016.2.0` is required

```
    composer require ryanwinchester/netsuite-php v2017.1.1

```

Register the package

- Laravel 5.5 and up Uses package auto discovery feature, no need to edit the `config/app.php` file.
- Laravel 5.4 and below Register the package with laravel in `config/app.php` under `providers` with the following:

```
   'providers' => [
   /*
   * Laravel Framework Service Providers...

   Usulix\NetSuite\Providers\NetSuiteServiceProvider::class,
   Usulix\NetSuite\Providers\NetSuiteApiProvider::class,

```

NetSuiteServiceProvider - provides access to the ryanwinchester/netsuite-php WebServices Interface

NetSuiteApiProvider - provides access to the RESTlet API

Set Configuration in .env
-------------------------

[](#set-configuration-in-env)

by default, if '\*\_HOST' is NOT defined, the standard account specific URL, is be returned.

*note* (NETSUITE\_ENDPOINT, NETSUITE\_ACCOUNT, NETSUITE\_WEBSERVICES\_HOST, NETSUITE\_APP\_ID) needed for WebServices

*note* (NETSUITE\_WEBSERVICES\_HOST and NETSUITE\_RESTLET\_HOST) can be used to override as needed

```
  NETSUITE_ENDPOINT=2018_2
  NETSUITE_ACCOUNT=123456
  NETSUITE_EMAIL=sample@sample.com
  NETSUITE_PASSWORD=sup3rs3cr3t
  NETSUITE_ROLE=3
  NETSUITE_APP_ID=FFFFFFFF-1111-AAAA-9999-000000000000

```

using Token (account, consumer\_key, consumer\_secret, token, token\_secret required for either WebServices or RESTlets)

```
  NETSUITE_ENDPOINT=2016_1
  NETSUITE_ACCOUNT=123456
  NETSUITE_CONSUMER_KEY=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  NETSUITE_CONSUMER_SECRET=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
  NETSUITE_TOKEN=cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  NETSUITE_TOKEN_SECRET=dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd

```

*note* (if the sandbox or custom url is required) you can override the account specific URLs

```
  NETSUITE_WEBSERVICES_HOST=https://#######-sb1.suitetalk.api.netsuite.com
  NETSUITE_RESTLET_HOST=https://#######-sb1.restlets.api.netsuite.com/app/site/hosting/restlet.nl

```

Add values to .env which correspond to either token based authentication OR NlAuth based authentication but not both!

What if you need token for WebServices and NlAuth for RESTlets - or you need different accounts for each...

Submit a feature request as an issue or a pull request with a solution.

My experience with NetSuite is based upon a single integration, so coverage of all situations is probably not happening very well initially, but the project is public in order to obtain help in developing a more useful and time-saving solution.

Instantiate an instance of the service and make NetSuite call using the service
-------------------------------------------------------------------------------

[](#instantiate-an-instance-of-the-service-and-make-netsuite-call-using-the-service)

using a WebService

```
  use NetSuite\Classes\GetRequest;
  use NetSuite\Classes\RecordRef;

  $myWebService =  app('NetSuiteWebService');

  $request = new GetRequest();
  $request->baseRef = new RecordRef();
  $request->baseRef->internalId = "123";
  $request->baseRef->type = "customer";

  $getResponse = $myWebService->get($request);

  if ( ! $getResponse->readResponse->status->isSuccess) {
    echo "GET ERROR";
  } else {
    $customer = $getResponse->readResponse->record;
  }

```

using a RESTlet

```
    $myRESTletService = app('NetSuiteApiService');

    /**
    * You can set processing on the response Body returned
    * 'raw' - just return the stream retrieved (default)
    * 'singleDecode' - return json_decode($body, true)
    * 'doubleDecode' - return json_decode(json_decode($body,  true), true)
    * 'responseData' - return json_decode(json_decode($body,  true), true)['data']
    *
    * Your mileage may vary based upon how your NetSuite RESTlet is coded
    */

    $myRESTletService->setReturnProcessing('singleDecode');

    /**
    * You can set the Request Method (default is 'POST')
    */

    $myRESTletService->setMethod('POST');

    /**
    * retrieve your response by calling getNetsuiteData with your RESTlet Id and
    * any payload in an array
    */

    $myResults = $myRESTletService->getNetsuiteData('123',
       ['action' => 'myAction', 'user'=>'212121']
    );

    foreach($myResults as $res){
                $this->doSomething($res);
    }

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 79.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~223 days

Recently: every ~278 days

Total

6

Last Release

2345d ago

Major Versions

v0.1-beta.3 → 1.0.02019-06-13

1.0.3 → 2.0.22019-12-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/97dfd0ba457bccf998fd322ed8ada29871b4fe82df048a8cc97c9322759a8cac?d=identicon)[issamlk](/maintainers/issamlk)

---

Top Contributors

[![usulix](https://avatars.githubusercontent.com/u/4955172?v=4)](https://github.com/usulix "usulix (34 commits)")[![wattsie](https://avatars.githubusercontent.com/u/5244866?v=4)](https://github.com/wattsie "wattsie (4 commits)")[![issamlk1](https://avatars.githubusercontent.com/u/8859524?v=4)](https://github.com/issamlk1 "issamlk1 (3 commits)")[![JonahSdg](https://avatars.githubusercontent.com/u/41454347?v=4)](https://github.com/JonahSdg "JonahSdg (1 commits)")[![midnite81](https://avatars.githubusercontent.com/u/254850?v=4)](https://github.com/midnite81 "midnite81 (1 commits)")

### Embed Badge

![Health badge](/badges/issamlk1-laravel7-netsuite/health.svg)

```
[![Health](https://phpackages.com/badges/issamlk1-laravel7-netsuite/health.svg)](https://phpackages.com/packages/issamlk1-laravel7-netsuite)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[nickurt/laravel-postcodeapi

Universal PostcodeApi for Laravel 11.x/12.x/13.x

97221.2k](/packages/nickurt-laravel-postcodeapi)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)[spinen/laravel-clickup

SPINEN's Laravel Package for ClickUp.

282.2k](/packages/spinen-laravel-clickup)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
