jnbt / candy_check

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

Trial period check in Google Play doesn't work #33

Open catacs opened 5 years ago

catacs commented 5 years ago

When I try to call trial? method from CandyCheck::PlayStore::Subscription class i get false when a subscription is trial. Checking the google play documentation, the added a new payment_state with value 2 which is trial.

https://developers.google.com/android-publisher/api-ref/purchases/subscriptions

paymentState | integer | The payment state of the subscription. Possible values are:

  1. Payment pending
  2. Payment received
  3. Free trial
jnbt commented 4 years ago

This is a good point, we should allow also the value 2

jnbt commented 3 years ago

@christophweegen Can you please have a look here. I think we need to whitelist the value 2 on CandyCheck::PlayStore::Subscription#trail?.