更新时间:2023-02-03 09:21:20
您当然可以使用VerificationController中的代码摘录对transaction.transactionReceipt进行设备上的收据验证我修改了这个并在开发人员论坛上发布了名为VerificationControllerPBKSimple的代码。收据由Apple签署,因此这个过程相当安全,除非有人在他们的设备上弄乱你编译的Objective-C代码 - 直到不推荐使用的transaction.transactionReceipt消失。
You can certainly do on-device receipt validation of a transaction.transactionReceipt using excerpts of the code in VerificationController posted by Apple. I modified that and posted code on the Developers Forum called VerificationControllerPBKSimple. The receipt is signed by Apple so this process is reasonably secure unless someone messes with your compiled Objective-C code on their device - and until the deprecated transaction.transactionReceipt disappears.
您还可以对iOS7收据(不是transaction.transactionReceipt)进行设备上收据验证,但这需要一些奇特的编码。
You can also do on-device receipt validation of an iOS7 receipt (not a transaction.transactionReceipt) but that requires some fancy coding.