2
votes

I have setup Ubercart 2.0 in my Drupal 6 website, and have enabled the necessary modules for its functionality, including: Cart, Store, Product, Order, Conditional Actions.

I have configured the google checkout module in test mode (Sandbox) and have put the Merchant ID and Merchant Key values accordingly.

Now when i added a product to the cart and clicked on Google Checkout, i got a big error message:

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in C:\xampp\htdocs\drupal\sites\all\modules\ubercart\payment\uc_google_checkout\uc_google_checkout.module:630 : SimpleXMLElement->__construct('') #1

Cant seem to figure out the cause of this error...

EDIT:

On line 630, i have the following line:

$response = new SimpleXMLElement($response_obj->data);

and i echoed the value of: $response_obj->data as:

https://sandbox.google.com/checkout/view/buy?o=shoppingcart&shoppingcart=537534598601272

1
Most likely the string that's fed into the SimpleXMLElement is not a valid XML document. Can you try to get hands on the XML string and post it in your question?Stefan Gehrig
One of my friends says that i need to buy an SSL certificate. But i wonder how my localhost works flawlessly with google checkout.shasi kanth

1 Answers

1
votes

Figured it out. When i debugged my code, i got this error:

"Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?"

Then after some research, i found that the php.ini file where i enabled the php_openssl.dll extension is not the one that php is using. So after enabling it in correct file, everything went smooth. :)