jnbt / candy_check

Check and verify in-app receipts
MIT License
125 stars 70 forks source link

How to handle trial periods #30

Closed utiq closed 4 years ago

utiq commented 5 years ago

I don't understand how this works, I'm offering a trial period of 15 days to my users. I can see there is an attribute is_trial_period = true. But also purchase_date_pst and expires_date_pst are almost the same.

...
"in_app" => [
{
                              "quantity" => "1",
                            "product_id" => "xxx.yyyyy.zzzzzz",
                        "transaction_id" => "1000000472954795",
               "original_transaction_id" => "1000000472954795",
                         "purchase_date" => "2018-11-15 02:57:24 Etc/GMT",
                      "purchase_date_ms" => "1542250644000",
                     "purchase_date_pst" => "2018-11-14 18:57:24 America/Los_Angeles",
                "original_purchase_date" => "2018-11-15 02:57:29 Etc/GMT",
             "original_purchase_date_ms" => "1542250649000",
            "original_purchase_date_pst" => "2018-11-14 18:57:29 America/Los_Angeles",
                          "expires_date" => "2018-11-15 03:01:24 Etc/GMT",
                       "expires_date_ms" => "1542250884000",
                      "expires_date_pst" => "2018-11-14 19:01:24 America/Los_Angeles",
                "web_order_line_item_id" => "1000000041316425",
                       "is_trial_period" => "true",
              "is_in_intro_offer_period" => "false"
        }
]
jnbt commented 4 years ago

Sorry that I didn't managed to support you on this topic.