Closed cnkygmr closed 5 months ago
@cnkygmr Can you provide us complete error log ? Also, is it replicable by running locally in debug mode ?
@darshankawar
There is no error, the problem is that the in_app_purchase library is not suitable for the new version. queryPurchasesAsync() does not return this. The type of SKU, either "inapp" or "subs" as in SkuType. In the latest version, there is no this selection in the in_app_purchase library and it goes as inapp, but it gives an error because it is a subscription.
@darshankawar
queryPurchasesAsync() is not have offlical example still have old queryProductDetails()
@cnkygmr Can you check this and see if it helps in your case or not ?
@darshankawar
Nope, i need GooglePlayProductDetails for productType but standart example has ProductDetails when i use queryProductDetails().
So ProductDetails not have productType.
@darshankawar
What I want to know is what should I do with the current official example? Invalid SKU type. To avoid getting the error?
@darshankawar
I tried such a way, but it still gave the same error.
purchaseParam = GooglePlayPurchaseParam(
productDetails: productDetails as GooglePlayProductDetails, // like that
);
@darshankawar
I made a ridiculous mistake, I used buyConsumable for subscription.
Does that mean the reported behavior isn't a bug in plugin ?
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Steps to reproduce
Active in app purchase example https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase/example
Expected results
According to the new version, sku type is not included in the subscription
Actual results
BillingClient: Error consuming purchase with token. Response code: 5 source: google_play message: BillingResponse.developerError details: Invalid sku type. code: consume_purchase_failed
Code sample
Active in app purchase example https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase/example
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]Logs
Logs
```console [Paste your logs here] ```Flutter Doctor output
Doctor output
```console [Paste your output here] ```