I have spent the last two days figuring out how to verify WP8 in-app purchases in PHP. After no luck of finding any samples, I found the library called "xmlseclibs". While their example signed XML works nicely, it always seems to fail validating the Microsoft receipt at validateReference, where the calculated digest doesn't match the one in the Microsoft XML response.
I have found a question on the same topic, but it never seemed to get resolved: Verifying windows 8 purchases (receipts) using PHP
Has anyone had any experience with the topic? I would really appreciate it.