-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flutter - How to add unmanaged/non-consumable product for in app purchase in test app? #133
Comments
Did you find a solution? I modified this from the docs and the example. i just added setState to change the display when the purchase is made. I didn't add any checks for if the purchase went through (i don't think i need to?).
As for loading the purchases when you resume later.
My only problem is that i cant test again on the same iOS device. It's easy to clear on android (see docs) but i can't clear my purchase history in iOS. I tried making multiple sandbox accounts but my purchase history is the same across different sandbox accounts so it always shows up as being purchased. |
@DevonTomatoSandwich @hyochan @kwmt @Zil85 @lukepighetti @Rockvole I have the same issue on item purchase. If i refund for an item i still get the item as purchased. How to manage it? Also, can you please tell me if i purchase an item like, If item purchase is successful and then should i have to use finishTranscation or verifyreceipt methods? I have read somewhere that if i will not finish my transaction then i will get my item purchase refunded and will not be listed as purchased item after 3 days. If yes then, Can you please suggest what will be the minimal code to write or finish the transaction or verify purchase for both android and ios ? Thanks. |
Hi there~! You should always call |
do you mean changing
to
If so Edit: I realised the |
@DevonTomatoSandwich Yes, you should |
@DevonTomatoSandwich You can now just pass |
Awesome thanks for updating. The documentation is good btw, i think it's a lot better than flutter's in_app_purchase. @JayM96 's other question was
From the documentation i saw
But doesn't finishTransaction do this anyway? as it says
So do you only need to call finishTransaction to verify purchase? |
@DevonTomatoSandwich Yes, you can just use @JayM96 You can verify receipt locally with methods we've provided. However, if you care about more secure transactions, I'd recommend you do this in the backend. There are several other libraries that do this like node-iap. |
Ok thanks. I was getting errors on android using:
It works for the options "Test card, always approves" and "Test card, always declines" |
@hyochan You are doing great job. Also, Thanks for updating the plugin as well. @hyochan @DevonTomatoSandwich I also want to know even though i refund the item purchased. Still i am getting those items in the list of available purchases. If i have refunded for a managed product then even for waiting for 2-3 days still getting that item in the available purchases list. Also, i didn't found any parameter in any of the method which tells me the purchase state like item cancelled or not? Also, let me tell you what i am doing with your plugin is i am purchasing an item which is listed as a managed product in play console. Once purchased i am never calling consume method on it as i want it to treat that item as a non-consumable item. I am also completing the finishTransaction Method as follow. FlutterInappPurchase.instance.finishTransaction(purchaseToken,isConsumable:false); Also, in that method there is an argument with isConsumable argument. I am predicting that it is for declaring as a consumable or nonconsumable item. i am always passing isConsumable:false as i want it as a non consumable item. One more issue i was facing is when i was testing with test accounts and then when the in app purchase prompt opens and continues with payment process and somehow it fails at very late stage it is showing the item as a successful purchase. Is it happening as i have selected the "test card always approves" option or any other issues is still there. Please correct me if i wrong and what i can do for cancelled or refunded item or how can i manage them. Thanks. |
I've made a repo here if anyone wants to try to reproduce these issues. The app has a list of non-consumables you can purchase (smiley faces) check out the readme for more details and screenshots. The readme also has detailed instructions on how to set up. It's my first time making a GitHub repo so let me know if you want to add to it. Or start as many new issues as you want there :) I feel like these issues might be sorted if we work on the same project together but maybe this is too much work. |
This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days. |
Currently i am performing in app purchase in my test project.
I wanted to add an option in the app for unmanaged/non-consumable product. What i want to do is let say if a user has not purchased an unmanaged/non-consumable product then i will disable some features in the app for the user.
But, if i purchase that unmanaged/non-consumable product then user can access all the app features for the lifetime.
Currently, google play console is showing only managed products and subscriptions tab only. Is there a way to implement in app purchase for unmanaged/non-consumable product in the app ?
Currently i am using the FlutterInApp Plugin for my test project ?
I didn't find documentation for the unmanaged/non-consumable products in flutter anywhere?
Can anyone suggest a worksround?
Is there any way to add unconsumable products using "flutter_inapp_purchase" plugin?
Thanks.
The text was updated successfully, but these errors were encountered: