Closed wrburgess closed 11 years ago
Hey @wrburgess — not knowing the specifics of how this package works, I'd triple-check that your datafeed key is set appropriately. It sounds like the datafeed XML is garbled at the point it's handed to Nokogiri. This can happen after the decryption step if your datafeed key is wrong.
Here's the tool that we use over at FoxyCart to diagnose these kind of problems: http://wiki.foxycart.com/integration/foxycart/test_xml_post
It'll let you set a datafeed key and XML body and then POST it to your datafeed endpoint.
Good tip @phred. Thanks for posting. @wrburgess definitely check the key. I had problems with it myself. The key as it appears under Store > Advanced > API key in the FC admin panel is actually longer than the text field it is in. You have to make sure you copy the entire thing. If that's not the issue try dumping the params to your logs before calling #datafeed_unwrap
. That should give us a start at debugging. Your controller as it is looks good.
Thanks for the feedback @phred and @cstump. That was the issue. I'm not sure why I was using the wrong key, but getting that synced up and using the test_xml_post app seemed to do the trick. Much appreciated.
Something is wrong with the datafeed processing aspect of the gem, but I can't figure out if it's my installation of foxy_sync or just an error in-general.
I run a purchase through FoxyCart which calls back correctly on http://[exampleapp].com/datafeed
Here's the route and controller:
Here's the error I'm getting on the staging site (on heroku).
Note: I also received this error locally when using test files, but I wanted to reproduce the error between FoxyCart and my staging site.