我正在使用Windows Phone 8應用。我的應用將包含應用內購買。我試圖理解收據概念。根據我的理解,在用戶在我的應用程序內購買產品後,會生成收據。驗證Windows Phone應用內購買收據
<?xml version="1.0"?>
<Receipt Version="1.0" CertificateId="{Identifier1}" xmlns="http://schemas.microsoft.com/windows/2012/store/receipt">
<ProductReceipt PurchasePrice="${PurchaseAmount}" PurchaseDate="{DateTime}" Id="{Guid1}" AppId="{Guid2}" ProductId="{ProductName}" ProductType="Consumable" PublisherUserId="{Identifier2}" PublisherDeviceId="{Identifier3}" MicrosoftProductId="{Guid3}" />
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
<Reference URI="">
<Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /></Transforms>
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<DigestValue>{Identifier4}</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>{HashedValue}</SignatureValue>
</Signature>
</Receipt>
太好了!我不確定如何判斷這個收據是否來自微軟的服務器。有人可以向我解釋如何驗證?我看到這個:http://code.msdn.microsoft.com/wpapps/In-app-purchase-receipt-c3e0bce4但是,它對我沒有意義。我不明白例子中的證書。 「IapReceiptProduction.cer」是一套嗎?或者只是爲了這個樣本?
對不起,如果這是一個愚蠢的問題。
http://blogs.msdn.com/b/lighthouse/archive/2013/08/28/faqs-about-in-app-purchase-for-windows-phone-8.aspx FYI – 2014-05-29 02:56:47