苹果官方文档对 store receipt 的介绍,根据我在sandbox 下面做的测试,基本符合~

我也觉得挺奇怪的,叫工作室负责内购这块的伙计把 iap 防护做一做,

他说 receipt 的键是变动的,然后就没弄了,当时我也没太在意。

但后来我一想这么马虎了事真心不行,国内破解猖獗,游戏被破解的话不就相当于撒钱么?

而且如果不做处理,当前的 iap free 十有八九是秒内购压力一点儿都不大~

相关链接:https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/VerifyingStoreReceipts/VerifyingStoreReceipts.html#//apple_ref/doc/uid/TP40008267-CH104-SW1

原文如下:

The Store Receipt

The receipt data you send to the App Store encodes information about the transaction. When the App Store validates a receipt, the data stored in the receipt data are decoded and returned in the receipt key of the response. The receipt response is a JSON dictionary that includes all of the information returned to your application in theSKPaymentTransaction object. Your server can query these fields to retrieve the details of the purchase. Apple recommends that you send only the receipt data to your server and use receipt validation to retrieve the purchase details. Because the App Store verifies that the receipt data has not been tampered with, retrieving this information from the response is more secure than transmitting both receipt data and the transaction data to your server.

Table 5-1 provides a list of keys that you may use to retrieve information about the purchase. Many of these keys match properties on the SKPaymentTransaction class. All keys not specified in Table 5-1 are reserved for Apple.

Note: Some keys vary depending on whether your application is connected to the App Store or the sandbox testing environment. For more information on the sandbox, see “Testing a Store.”

Table 5-1  Purchase info keys

Key

Description

quantity

The number of items purchased. This value corresponds to the quantity property of the SKPayment object stored in the transaction’s payment property.

product_id

The product identifier of the item that was purchased. This value corresponds to the productIdentifier property of theSKPayment object stored in the transaction’s payment property.

transaction_id

The transaction identifier of the item that was purchased. This value corresponds to the transaction’s transactionIdentifierproperty.

purchase_date

The date and time this transaction occurred. This value corresponds to the transaction’s transactionDate property.

original_transaction_id

For a transaction that restores a previous transaction, this holds the original transaction identifier.

original_purchase_date

For a transaction that restores a previous transaction, this holds the original purchase date.

app_item_id

A string that the App Store uses to uniquely identify the application that created the payment transaction. If your server supports multiple applications, you can use this value to differentiate between them. Applications that are executing in the sandbox do not yet have an app-item-id assigned to them, so this key is missing from receipts created by the sandbox.

version_external_identifier

An arbitrary number that uniquely identifies a revision of your application. This key is missing in receipts created by the sandbox.

bid

The bundle identifier for the application.

bvrs

A version number for the application.

IAP 对 Receipt 做验证相关推荐

  1. IOS 内购IAP 自动订阅收据验证文档服务端翻译

    将收据数据发送到App Store: 提交此JSON对象作为HTTP POST请求的有效负载. 中文文档:https://help.apple.com/app-store-connect/#/dev7 ...

  2. [vue] prop是怎么做验证的?可以设置默认值吗?

    [vue] prop是怎么做验证的?可以设置默认值吗? 单个类型就用Number等基础类型,多个类型用数组,必填的话设置require为true,默认值的话设置default,对象和数组设置默认用工厂 ...

  3. Unity内IAP支付二次验证/服务器验证————最白话,手把手教你做系列。

    之前的一篇写了Unity支付的IAP支付接入. 后来就出现了一些问题,数据统计的时候出现大量购买订单.但是实际上账户的钱却没有增加.@¥--&¥--*@¥&@初步判定可能存在部分用户通 ...

  4. 【IAP支付之三】苹果IAP安全支付与防范 receipt收据验证

    这里网上的朋友已经介绍的很详细了,具体的链接已经无法找到了. 这里主要说几点本人在开发中遇到的问题: 1.漏单必须要处理,玩家花RMB购买的东西却丢失了,是绝对不能容忍的.所谓的漏单就是玩家已经正常付 ...

  5. 使用 Python 的 jsonschema 对 json 做验证

    在OpenStack中, 使用了Python的 jsonschema包, 对json字符串做了验证. Python JSON Schema Library https://pypi.python.or ...

  6. 用计算机辅助实验系统做验证牛顿第三定律,用计算机辅助实验系统(

    ◎ 平衡力的定义 平衡状态: 物体保持静止或匀速直线运动的状态称为平衡状态.静止状态称为静平衡,匀速直线运动状态称为动平衡. ①对静止的理解静止与速度v=0不是一回事,物体保持静止状态,说明a=0,a ...

  7. win10下使用certutil工具对文件的SHA1、MD5和SHA256哈希结果做验证(超简单,附图)

    初步介绍 众所周知,当我们从网上下载软件时,发行商为了保证用户在下载过程中自己的软件没有被更改,都会通过一些哈希函数来确保他们软件的完整性.比如:在网上有一些攻击者会在其中植入像插件,广告或病毒等等恶 ...

  8. 问答项目---登陆也要做验证!(JS和PHP验证)

    简单JS示例: var login = $( 'form[name=login]' );login.submit( function () {if (validate.loginAccount &am ...

  9. input失去焦点验证格式_input获取、失去焦点对输入内容做验证

    注册 {#form添加novalidate参数,代表取消前端h5的验证,比如邮箱格式验证#}{% csrf_token %} {{ form_obj.username.label }} {{ form ...

最新文章

  1. 《JavaScript面向对象精要》——第1章 原始类型和引用类型1.1 什么是类型
  2. Python+selenium 自动化高级应用篇:借助pyautogui实现web前端带轨迹拖拽功能,解决ActionChains拖拽失效问题
  3. mongDB update 修改器
  4. shell把mysql每句导出_shell实现,将mysql每个存储过程导出为单个文件_MySQL
  5. wamp惯用的php框架_wamp集成环境php多版本搭建(php5.5,php5.6,php7.0.6)
  6. 雪城大学信息安全讲义 4.1~4.2
  7. 贝佐斯正接受14小时训练 以为周二进行的首次太空飞行做准备
  8. 一个服务器启动2套mysql_一个服务器启动两个mysql实例
  9. Microsoft Office Visio 2010如何创建UML 用例图
  10. python练手经典100例-20个Python练手经典案例,能全做对的人确实很少!
  11. Delphi通过MSHTML实现一个HTML解析类
  12. 图像处理MATLAB(图像分割)
  13. linux运行speex,linux 用speex库压缩音频
  14. 微信小程序 转发功能的实现
  15. 信息安全基础练习题(看完包过)
  16. useradd 命令的常见用法
  17. python中patch的使用
  18. 你的人生,就是从这一刻开始毁掉的
  19. 非结构化数据的存储与查询
  20. 限定特定的IP访问服务器

热门文章

  1. JS中‘${}‘什么意思
  2. VBA代码自学收集(150例)
  3. Excel工作表目录以及链接
  4. 政企专属的IM即时通讯平台,促进团队安全沟通与协作
  5. 10. 第三课---苹果促销
  6. 华为鸿蒙系统会用于平板吗,谷歌始料不及,任正非正式宣布:鸿蒙OS将用于手机平板等全系产品...
  7. 新版的百度网盘,自定义分享提取码
  8. 基于web的计算机配件销售系统,基于ASP.NET的计算机配件销售企业门户网站系统...
  9. jquery简洁版滑动下拉菜单问题解决-22
  10. 赛马网基本算法之--将功赎过