locked
Received receipt different from receipt example

    Question

  • Hello,

    I have noticed that the receipt received from the CurrentAppSimulator contains a xml header : <?xml version="1.0" encoding="utf-8"?>.

    In the receipt example, there are no xml header. (http://msdn.microsoft.com/en-us/library/windows/apps/jj649137.aspx)

    Should I remove this header? Will the store ignore it?

    Thanks.

    Friday, October 24, 2014 4:34 PM

Answers

  • You don't send the receipt to the store to validate it. As demonstrated in Using receipts to verify product purchases you get the certificate and then use the cert to validate the signed XML as it was received from the store.

    --Rob

    • Marked as answer by BatRocchia Tuesday, October 28, 2014 12:24 AM
    Tuesday, October 28, 2014 12:20 AM
    Owner

All replies

  • Accept the header in your code.

    The example is explicitly "something like this" with generic fields removed for simplicity.

    I'm not sure what you mean by "Will the store ignore it?" You don't send the receipt to the store. The store returns the receipt to you.

    --Rob

    Friday, October 24, 2014 11:29 PM
    Owner
  • I check the receipt server-side, so I have to recontact the store with the same receipt. Do I need the xml header in this case?

    Saturday, October 25, 2014 7:19 AM
  • You don't send the receipt to the store to validate it. As demonstrated in Using receipts to verify product purchases you get the certificate and then use the cert to validate the signed XML as it was received from the store.

    --Rob

    • Marked as answer by BatRocchia Tuesday, October 28, 2014 12:24 AM
    Tuesday, October 28, 2014 12:20 AM
    Owner