/ Published in: PHP

Method can that easily used in a PHP class to generate a connection to netsuite. The method below is built using the Kohana library.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
protected function getNetsuiteConnection() { // setup the netsuite connection require SYSPATH."vendor/netsuite/PHPtoolkit.php"; require SYSPATH."vendor/netsuite/directory_v2009.2.php"; $this->netsuiteConnection = new nsClient(nsHost::live); // set request level credentials. (email, password, account#, internal id of role) $this->netsuiteConnection->setPassport( Kohana::config('netsuite_email'), Kohana::config('netsuite_password'), Kohana::config('netsuite_account'), Kohana::config('netsuite_role') ); } return $this->netsuiteConnection; }
Comments
