我正在使用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