chargify icon indicating copy to clipboard operation
chargify copied to clipboard

"String could not be parsed as XML" when in use with CakePHP

Open dagumak opened this issue 12 years ago • 4 comments

I had a few oddities here and there when using with Cake, but I couldn't figure out this one when just using the library.

"String could not be parsed as XML"

I wish I could be more helpful, but at least I've taken the first step to open a discussion.

dagumak avatar Apr 15 '12 07:04 dagumak

Exactly on this line: $customer_xml_node = new SimpleXMLElement($xml);

dagumak avatar Apr 15 '12 07:04 dagumak

Hi, I am getting the same error with my application too. [Exception : String could not be parsed as XML ]

public function createSubscription($chargify_subscription) { $xml = $this->requestCreateSubscription($chargify_subscription->getXML()); 424 ---> $subscription = new SimpleXMLElement($xml); return new ChargifySubscription($subscription, $this->test_mode); }

can somebody help me.

mazraara avatar Feb 17 '13 14:02 mazraara

I know it's been a while, but apparently the wrapper can't work if you set $test = TRUE, you should use $test to FALSE and set test environment in your chargify account.

arungpisyadi avatar Mar 12 '14 18:03 arungpisyadi

Even after changing $test = FALSE, same error

abkiran avatar Dec 29 '17 09:12 abkiran