gameroasters / iap-rs

async google/apple receipt validation using hyper
https://crates.io/crates/iap
MIT License
7 stars 1 forks source link

exposed response functions #2

Closed lyonbeckers closed 3 years ago

lyonbeckers commented 3 years ago
  1. Added exposed functions for granular response handling on the client side (so instead of creating a validator and calling validate, users could call apple_response(), debug with the response, then call validate_apple_subscription(), for instance).
  2. Created more in-depth validation in preparation for being able to handle other purchase types from validate()
  3. More complete error handling on the google side so we actually get a PurchaseResponse with invalid input.

I figure this way, we get the best of both worlds. A convenience struct and function for those who just want to know "is this a valid purchase", and specific functions for people who want more in-depth error handling.