phpxmlapichargify

Chargify API - XML issue - '<' not found


I'm trying to run some API scripts found in this github https://github.com/abraham/chargify
with this library https://github.com/jforrest/Chargify-PHP-Client/

When I run the subscriptions.php file, I get this error:

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : Start tag expected, '<' not found in /Applications/MAMP/htdocs/abraham-chargify-ace5a40/lib/ChargifyConnector.php on line 557

What is causing this error/How do I get rid of it?


Solution

  • Well sorry to say this problem turned out to be a settings problem. If the customer doesn't submit a shipping address (required) then that apparently generates the above error. Just input an address or remove the shipping address requirement if you fall into this error with Chargify.