IsraelOrtuno/pipedrive

Can't get fields

Closed this issue · 3 comments

when I trie to get pipedrive person fields I get the following error:
Fatal error: Uncaught Error: Class 'Devio\Pipedrive\Resources\Personfields' not found in /home/jongensv/public_html/wp-content/plugins/pipedrive_klantenportaal/vendor/devio/pipedrive/src/Pipedrive.php:55 Stack trace: #0 /home/jongensv/public_html/wp-content/plugins/pipedrive_klantenportaal/vendor/devio/pipedrive/src/Pipedrive.php(131): Devio\Pipedrive\Pipedrive->make('personfields') #1 /home/jongensv/public_html/wp-content/plugins/pipedrive_klantenportaal/test.php(7): Devio\Pipedrive\Pipedrive->__get('personfields') #2 {main} thrown in /home/jongensv/public_html/wp-content/plugins/pipedrive_klantenportaal/vendor/devio/pipedrive/src/Pipedrive.php on line 55
The weird thing is that it is working on my local wamp machine but not on my production cpanel server.
And loading deals also works great on both my local wamp machine and production cpanel server.

Code:
`<?php
require_once( dirname(FILE) . '/vendor/autoload.php' );
use Devio\Pipedrive\Pipedrive;
$apikey = "";
$pipedrive = new Pipedrive($apikey);

$person_fields = $pipedrive->personfields->all();
$person_fields = $person_fields->getData();
var_dump($person_fields);
`

Looks like in your dev machine your system is not case sensitive and it is on your production server. Replace personfields by personFields

Thanks! Wasted 5hours because of this :(

Enjoy the package and I really hope it's helpful to you :)