aporat / store-receipt-validator

PHP receipt validator for Apple iTunes, Google Play and Amazon App Store
Apache License 2.0
633 stars 153 forks source link

getPurchaseState() undefined #147

Closed Andromeda606 closed 3 years ago

Andromeda606 commented 3 years ago

I'm trying to call getPurchaseState() but it doesn't work, what's the problem?

$response = $validator->setPackageName('com.code365.likers') ->setProductId($row["count"]) ->setPurchaseToken($row["token"]) ->validateSubscription(); print_r((($response->getPurchaseState())));

PHP Fatal error: Uncaught Error: Call to undefined method ReceiptValidator\GooglePlay\SubscriptionResponse::getPurchaseState() in /blablabla/blablabla/

url I used this starting from here.