Closed canatufkansu closed 2 years ago
Can you share your domain details, code snippet and the timestamp when you next encounter this issue? It will be helpful for us to debug.
Hi. I got same error when i create or get all subscriptions.
Response not in JSON format. Might not be a ChargeBee Response.
Here is code for getting all subscriptions
$api_key = "test_8GRSM***********";
$site_url = "m*****-test.chargebee.com/";
Environment::configure($site_url, $api_key);
$all = Subscription::all(array(
"limit" => 2,
));
One thing more in documentation like this
ChargeBee_Environment::configure("{site}","{site_api_key}");
but in library and some documentation code
Environment::configure($site_url, $api_key);
What is the difference between them ?
Hi @canatufkansu and @haseebmirza We tested it from dev end and getting proper json response and response code for both ChargeBee_ItemFamily::all()/ItemFamily::all and ChargeBee_Subscription::all()/ Subscription::all(). Could you Please send us the respJson when you next encounter this issue? It will help us to know the issue better.
@haseebmirza Regrading your question related to documentation, Currently we are having 2 versions of chargebee-php i.e v3.x.x and v2.x.x. For v3.x.x ---> Environment::configure($site_url, $api_key); For v2.x.x ---> ChargeBee_Environment::configure("{site}","{site_api_key}");
I got this error as well. It was working for months. And all of a sudden, it starts pulling this error.
This is on our production/live server.
try { $method = ChargeBee_Subscription::retrieve($subscription_id); echo '<pre>'.print_r($method).'</pre>' } catch (Exception $e) { echo $e->getMessage(); }
What do I need to provide for you guys to help me. Thanks
as @nicozarris said, we are seeing the same issue right now. This seems a systemic problem on your end. We have not made any changes on our side and the error started occurring. Please fix this is urgent.
Thank you for notifying us. We are looking into this issue. Could you please help us with the below information?
composer show
command or what chargebee-php version are you using.As per this our servers were returning intermittent errors. We sincerely regret the inconvenience caused. We have resolved the issue, and the service is back to normal now. If you are still facing this issue, please reopen.
Getting this message for paymentsource for 12/29/2021. Been working for months with no code change on our end as well.
Hi,
We are using Chargebee for almost 2 months. Sometimes we are getting errors that disturbs our services. When we check the logs we found that sometimes ItemFamilies response that returns from Chargebee API in not a valid json format. For this reason we cannot list ItemFamilies to our customers in some cases. We are using Chargebee API V2
Following is our code that returns all of the ItemFamilies from Chargebee API
in some cases we get he following error
when we check the code we can see that Chargebee's API response is not a valid json response