Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When trying to connect to Xero using Xero's PHP API, an error is thrown. #375

Open
sanchyanchakraborty opened this issue Sep 19, 2024 · 3 comments

Comments

@sanchyanchakraborty
Copy link

sanchyanchakraborty commented Sep 19, 2024

SDK you're using (please complete the following information):

  • Version [2.1.3]

Describe the bug
When trying to connect to Xero using Xero's PHP API, the following error is thrown:
Message Crash: Invalid value for 'class', must be one of 'DEMO', 'TRIAL', 'STARTER', 'STANDARD', 'PREMIUM', 'PREMIUM_20', 'PREMIUM_50', 'PREMIUM_100', 'LEDGER', 'GST_CASHBOOK', 'NON_GST_CASHBOOK'

I am using this code, and the error occurs within this catch block.
try {
$apiResponse = $apiInstance->getOrganisations($xeroTenantId);
}
catch(Exception $e) {
echo 'Message Crash: ' .$e->getMessage();
}

We have multiple users, but this issue is only affecting one user.
The user says he's in the GROW plan. Could that be causing the issue? I have no idea about that.

In the Demo Company account or other live users' accounts, it's working fine. However, for one specific user on their real account, it throws an error.

Any suggestions on what to do?

Kind regards

Copy link

PETOSS-591

Copy link

Thanks for raising an issue, a ticket has been created to track your request

@dblazeski
Copy link

dblazeski commented Sep 29, 2024

You're probably on a Plan that added support in version 5 - https://github.com/XeroAPI/xero-php-oauth2/releases/tag/5.0.0
Upgrading the API version should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants