Closed parthk-hkis closed 4 years ago
Nice issue.
Could you add any details?
Make sure service account was properly configured.
Make sure you validate subscription purchase using validateSubscription
, and not a one-time purchase.
As displayed in the above code, I'm validating subscription only, it works the first time but when it auto-renews, it is not validating the same purchase token which we've stored on our database. Not sure what I'm missing? I'm pretty sure that the service account is properly configured.
$client = new \Google_Client();
$client->setScopes($scope);
$client->setApplicationName($applicationName);
$client->setAuthConfig($configLocation);
$validator = new PlayValidator(new \Google_Service_AndroidPublisher($client));
$response = $validator->setPackageName($packageName)
->setProductId($productId)
->setPurchaseToken($purchaseToken)
->validateSubscription();
What kind of error you see? Production/Sandbox? Could you share successful validation response before it starts to fail?
Close because of no details were provided.
In case auto renew subscription in android, when we validate receipt it always fails. I tried using below code