Closed MichSimi closed 1 year ago
Usually it means that you're trying to validation non-subscription purchase.
Could you share more details about the product? Maybe a screenshot from Google Play Console of the page with that product?
The product that i'm trying to validate is a subscription, i'm sure, i have also some single product purchases in the same application so i know that the productId in the response is a valid subscription. If i try to "acknowledge" the purchase i have an other error: The product purchase is not owned by the user.
Any idea? Still having the same error trying to validate a test subscription. In your example you do not use "acknowledge" the subscription, is "validateSubscription" enough or it use internally the acknowledge at some point?
The product purchase is not owned by the user. It means you're trying to acknowledge subscription that was acknowledged before (maybe on client side).
By default acknowledge functionality does not used in validation process.
I was able to validate the subscription by creating a function that uses v2 subscriptions service. There is the code:
public function validateSubscriptionV2() { return new SubscriptionResponse( $this->_androidPublisherService->purchases_subscriptionsv2->get( $this->_package_name, $this->_purchase_token ) ); }
@MichSimi what version of billing do you use in application? Version 5?
Related to #161
Validating a subscription in test with validateSubscription() return an error "subscriptionInvalidArgument" with message "Your request is invalid for this subscription purchase".
Scope: https://www.googleapis.com/auth/androidpublisher
$response = $validator->setPackageName($packageName) ->setValidationModePurchase(false) ->setProductId($productId) ->setPurchaseToken($purchaseToken) ->validateSubscription();
The verification of a single purchase (validatePurchase) of the same application is ok