如何在ios应用

时间:2015-11-26 06:58:18

标签: ios iphone in-app-purchase

我看过与应用内购买相关的帖子,并且无法找到我正在寻找的任何解决方案,或者可能无法正确获得答案。

现场是我已成功实施了应用程序并通过在NSUserDefaults中将值设置为YES来解锁所购买的内容。

问题在于,如果用户获得应用程序的退款,则NSUserDefaults中的值仍为YES,并且他仍然可以使用高级功能。

我已阅读有关使用Apple服务器验证收据并检查取消日期字段的帖子,但是当我从Apple服务器获取JSON响应时,它不包含取消日期字段。

这就是我从Apple那里收到的JSON。

{
environment = Sandbox;
receipt =     {
    "adam_id" = 0;
    "app_item_id" = 0;
    "application_version" = 1;
    "bundle_id" = "com.company.bundleidentifier";
    "download_id" = 0;
    "in_app" =         (
                    {
            "is_trial_period" = false;
            "original_purchase_date" = "2015-11-24 15:15:01 Etc/GMT";
            "original_purchase_date_ms" = 1448378101000;
            "original_purchase_date_pst" = "2015-11-24 07:15:01 America/Los_Angeles";
            "original_transaction_id" = 1000000181657877;
            "product_id" = myinappid;
            "purchase_date" = "2015-11-24 15:15:01 Etc/GMT";
            "purchase_date_ms" = 1448378101000;
            "purchase_date_pst" = "2015-11-24 07:15:01 America/Los_Angeles";
            quantity = 1;
            "transaction_id" = 1000000181657877;
        }
    );
    "original_application_version" = "1.0";
    "original_purchase_date" = "2013-08-01 07:00:00 Etc/GMT";
    "original_purchase_date_ms" = 1375340400000;
    "original_purchase_date_pst" = "2013-08-01 00:00:00 America/Los_Angeles";
    "receipt_creation_date" = "2015-11-26 06:38:22 Etc/GMT";
    "receipt_creation_date_ms" = 1448519902000;
    "receipt_creation_date_pst" = "2015-11-25 22:38:22 America/Los_Angeles";
    "receipt_type" = ProductionSandbox;
    "request_date" = "2015-11-26 06:52:30 Etc/GMT";
    "request_date_ms" = 1448520750619;
    "request_date_pst" = "2015-11-25 22:52:30 America/Los_Angeles";
    "version_external_identifier" = 0;
};
status = 0;

}

任何人都可以告诉我解决问题,并建议我一些可能的解决方案,以便在用户获得退款时锁定优质内容。

0 个答案:

没有答案