用户购买收据是否与他保持一致。如果他在另一台设备上获得相同的应用程序 [英] Does a user purchase receipt remain same for him. If he got the same app on another device

查看:55
本文介绍了用户购买收据是否与他保持一致。如果他在另一台设备上获得相同的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用付费的通用Windows平台应用。我使用
获得了购买收据

 await GetAppReceiptAsync(); 

我不确定每个用户的哪个收据元素是唯一的。因此,如果用户在另一台设备上获得相同的应用程序,则他不得购买,并且可以允许继续。我使用收据阅读了有关购买验证的文档。这是
示例应用收据。

< Receipt Version =" 1.0" ReceiptDate = QUOT; 2012-08-30T23:10:05Z" CertificateId = QUOT; b809e47cd0110a4db043b3f73e83acd917fe1336" ReceiptDeviceId = QUOT; 4e362949-ACC3-fe3a-e71b-89893eb4f528"> 
< AppReceipt Id =" 8ffa256d-eca8-712a-7cf8-cbf5522df24b"的AppId = QUOT; 55428GreenlakeApps.CurrentAppSimulatorEventTest_z7q3q7z11crfr"而purchaseDate = QUOT; 2012-06-04T23:07:24Z"授权类型= QUOT;全" />
< ProductReceipt Id =" 6bbf4366-6fb2-8be8-7947​​-92fd5f683530"产品编号= QUOT;产品1"而purchaseDate = QUOT; 2012-08-30T23:08:52Z"到期日期= QUOT; 2012-09-02T23:08:49Z" ProductType = QUOT;耐用"的AppId = QUOT; 55428GreenlakeApps.CurrentAppSimulatorEventTest_z7q3q7z11crfr" />
< Signature xmlns =" http://www.w3.org/2000/09/xmldsig#">
< SignedInfo>
< CanonicalizationMethod Algorithm =" http://www.w3.org/2001/10/xml-exc-c14n#" />
< SignatureMethod Algorithm =" http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
<参考URI ="">
<转换>
< Transform Algorithm =" http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
< / Transforms>
< DigestMethod Algorithm =" http://www.w3.org/2001/04/xmlenc#sha256" />
< DigestValue> cdiU06eD8X / w1aGCHeaGCG9w / kWZ8I099rw4mmPpvdU =< / DigestValue>
< /参考>
< / SignedInfo>
将的SignatureValue> SjRIxS / 2r2P6ZdgaR9bwUSa6ZItYYFpKLJZrnAa3zkMylbiWjh9oZGGng2p6 / gtBHC2dSTZlLbqnysJjl7mQp / A3wKaIkzjyRXv3kxoVaSV0pkqiPt04cIfFTP0JZkE5QD / vYxiWjeyGp1dThEM2RV811sRWvmEs / hHhVxb32e8xCLtpALYx3a9lW51zRJJN0eNdPAvNoiCJlnogAoTToUQLHs72I1dECnSbeNPXiG7klpy5boKKMCZfnVXXkneWvVFtAA1h2sB7ll40LEHO4oYN6VzD + uKd76QOgGmsu9iGVyRvvmMtahvtL1 / pxoxsTRedhKq6zrzCfT8qfh3C1w ==< /&的SignatureValue GT;
< / Signature>
< /收据>




我们非常感谢任何帮助。






解决方案

嗨Dektk,


收据仅用于验证相应的交易购买。 xml 文件不包含用于标识用户的元素。但它与后端服务器数据库中的用户帐户信息相关联。


我们会根据许可证类型元素检测用户的应用程序许可证。如果它已满,则表示该帐户还可以在其他设备上使用您应用的完整版本。


谢谢。


祝你好运,


Mattew Wu


I am working on a paid Universal Windows Platform app. I got the purchase receipt using

await GetAppReceiptAsync(); 

I am not sure which of the receipt element is unique per user. so that if the user got the same app on another device he must not purchase and may be allowed to proceed. I read the documentation it was about purchase verification using receipt .here's the example app receipt.

<Receipt Version="1.0" ReceiptDate="2012-08-30T23:10:05Z" CertificateId="b809e47cd0110a4db043b3f73e83acd917fe1336" ReceiptDeviceId="4e362949-acc3-fe3a-e71b-89893eb4f528">
    <AppReceipt Id="8ffa256d-eca8-712a-7cf8-cbf5522df24b" AppId="55428GreenlakeApps.CurrentAppSimulatorEventTest_z7q3q7z11crfr" PurchaseDate="2012-06-04T23:07:24Z" LicenseType="Full" />
    <ProductReceipt Id="6bbf4366-6fb2-8be8-7947-92fd5f683530" ProductId="Product1" PurchaseDate="2012-08-30T23:08:52Z" ExpirationDate="2012-09-02T23:08:49Z" ProductType="Durable" AppId="55428GreenlakeApps.CurrentAppSimulatorEventTest_z7q3q7z11crfr" />
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
        <SignedInfo>
            <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
            <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>cdiU06eD8X/w1aGCHeaGCG9w/kWZ8I099rw4mmPpvdU=</DigestValue>
            </Reference>
        </SignedInfo>
        <SignatureValue>SjRIxS/2r2P6ZdgaR9bwUSa6ZItYYFpKLJZrnAa3zkMylbiWjh9oZGGng2p6/gtBHC2dSTZlLbqnysJjl7mQp/A3wKaIkzjyRXv3kxoVaSV0pkqiPt04cIfFTP0JZkE5QD/vYxiWjeyGp1dThEM2RV811sRWvmEs/hHhVxb32e8xCLtpALYx3a9lW51zRJJN0eNdPAvNoiCJlnogAoTToUQLHs72I1dECnSbeNPXiG7klpy5boKKMCZfnVXXkneWvVFtAA1h2sB7ll40LEHO4oYN6VzD+uKd76QOgGmsu9iGVyRvvmMtahvtL1/pxoxsTRedhKq6zrzCfT8qfh3C1w==</SignatureValue>
    </Signature>
</Receipt>


any help regarding is highly appreciated.



解决方案

Hi Dektk,

Receipts are just used to verify the corresponding transaction purchases. The xml file does not contain an element for identifying users. But it's connected with user's account info in backend server database.

And we detect user's license to your app depending on License Type element. If it's full, it means that account could also use the full version of your app on another device.

Thank you.

Best regards,

Mattew Wu


这篇关于用户购买收据是否与他保持一致。如果他在另一台设备上获得相同的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆