PHP Classes

HMRC error it was not returned a valid JSON definition....

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  How to Implement PHP ...  >  All threads  >  HMRC error it was not returned a...  >  (Un) Subscribe thread alerts  
Subject:HMRC error it was not returned a...
Summary:HMRC error it was not returned a valid JSON definition of the...
Messages:2
Author:GB Systems
Date:2018-12-14 12:24:24
 

  1. HMRC error it was not returned a...   Reply   Report abuse  
Picture of GB Systems GB Systems - 2018-12-14 12:24:24
Calling the HMRC MTD API to view a VAT return using test credentials returns the error " it was not returned a valid JSON definition of the API call values "
This message does not appear in the class source so i'm unsure if it's being generated by the class or being returned from the HMRC server.
Another user on this forum with this same error speculated that it was due to an especially large response from the server.
Is it possible to view the raw response from the server before this class tries to process it ?

  2. Re: HMRC error it was not returned a...   Reply   Report abuse  
Picture of GB Systems GB Systems - 2018-12-21 09:22:09 - In reply to message 1 from GB Systems
In case anyone in the future encounters this problem. Ignore the HMRC documentation. Despite intimating that test VAT returns data exists, it doesn't really, you have to post data first. This error really indicates that no data has been found and HMRC don't return the expected "code" and "message" JSON error for the view vat return api