-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Windows Purchase Hangs #581
Comments
One thing I have just thought of is that I am using MVVM and maybe need to run this code on the main thread, ie using InvokeOnMainThreadAsync will try that and report back. UPDATE 2: Setting Testmode ie:
produces this exception:
When calling
|
Code looks correct to me.... I honestly may just suggest throwing the code in there yourself as the Windows code is so minimal and see if you can debug through it: without seeing the full code I don't see any exceptions or crashes when i run the app. it is as if the code isn't being called... IsBusyPurchasing is that set correct? |
Isolating that code (see below...) I get the same error (also below) unfortunately (in test mode) otherwise hangs. If this doesn't work directly, then I am at a bit of a loss on any next steps.. Another person on another computer (latest windows 10) says the purchase didn't work but the restore did work after doing the purchase via the voucher code link (but the restore only worked when running the app as an administrator) My tests have only been trying to do this via the published app from the store (where I have no logs etc) It seems that once the app is installed via the app store that when run via Visual studio, its seems to replace the "deployed" version.. does this mean its effectively deployed as a published one? ie as if deployed via the app store and would behave the same? do you have any info/comment on that? Any other ideas? error: ` ` namespace SocialTextEditor.Platforms.Windows; public static partial class WindowsInAppBilling
} |
Hmmm that is odd. My suggestion may be to use the new API that lives in Windows.Services.Store.... https://learn.microsoft.com/en-us/windows/uwp/monetize/in-app-purchases-and-trials I have been try to migrate the code slowly over to that. https://learn.microsoft.com/en-us/windows/uwp/monetize/enable-in-app-purchases-of-apps-and-add-ons The code is pretty straightforward. |
I have looked at that example and isolated that purchase code, and now have this working to popup the login / purchase window.. Notes:
Purchase Code:
Code in MauiProgram.cs to create handle; in class: before builder.Build: `
#endif |
This is includes the check for purchased add-on.
|
I've not dug deep into this yet but I'm seeing similar issues to those reported by @brightertools . Restoring purchases gives me a 400 error when debugging and a 404 when running the version downloaded from the store: When using the store version, if I press a button to initiate my purchase command, it seems to hang indefinitely (I've left it for minutes and the button stays disabled). Since @brightertools mentioned admin mode, I decided to give that a try (on Windows 10). When I do this, the button disables for a second or two and then re-enables (so it isn't hanging any more). However, it doesn't appear to succeed in this case and as it is the store version I'm not able to debug it. On Android, purchasing + restoring is working flawlessly for me. @brightertools seemed to suggest that the InAppBillingPlugin doesn't support paid apps with add-ons in the Microsoft Store. Is this the case @jamesmontemagno ? My use case is to have a paid app and separate in-app purchases. I assumed that the app being paid/free wouldn't change how the plugin worked. EDIT: I see |
For new MAUI/Windows apps I suspect the newest store code (from Windows.Services.Store) will need to be used and InAppBillingPlugin will need to be updated. The windows code is relatively straight forward. My app is now available in the store, have tested restoring against promo codes, but will need someone to do a full payment to verify a full payment. |
I will have to spend some time on this, i had started a bit... but really need to give it another go atleast for just normal consumables/non-consumables first. Open to PRs :) |
I just came here after trying a lot with the Microsoft store. The null response was something else. This needs to be implemented in the package when possible. It is hanging on my end |
I have implemented it directly. There are some things to consider. Windows.ApplicationModel.Store can follow the flow of the inappBillingPlugin system. I implemented the Windows.Services.Store and cannot verify the payment on the Windows Platform. |
I have implemented the In-App Billing, following the My Stream Timer example, the app is added to the store as well as the Add-On
When Initiating the Upgrade (purchase) My Laptop just tried to do face recognition without anything popping up, and got stuck doing that. I disabled the face recognition, which stops that but still hangs at that point?
Has anyone seen this issue?
In the My Stream Timer example, I see some kind of SetScreenSaver call that doesn't seem to do anything, I haven't implemented that, and assume its does nothing, but might have been something to try and mitigate some issue?
Code is very similar to the My Stream Timer Example
Note: I have downloaded the MyStreamTimer and that does popup the login (finger print verification, now that I have disabled the face recognition) The code is very similar (see below) but appreciate the My Stream Timer is not MAUI, specifically)
Latest VS 2022, Latest MAUI (.net8) Latest InAppBillingPlugin, Windows 11 (Latest update)
App is available at this direct link if interested: https://www.microsoft.com/store/apps/9NVZFCB6NW1Q
Happy to share some voucher codes if anyone wants to test this, and might find this app useful (might have to DM me if possible)
Feedback (and clarification)
It seems there are few fundamental options to purchasing apps (from a windows perspective)
It seems that a paid version can be setup (with or without a trial) where the user pays for the app in the store (ie not an in-app purchase) and seems this is not supported by the InAppBillingPlugin and is implemented a different way (is this correct?)
eg: https://learn.microsoft.com/en-us/windows/uwp/monetize/get-license-info-for-apps-and-add-ons
It would seem that this option is simple but doesn't lend itself well to "Upgrades" as users need to go back to the store to purchase and is not that seamless.
This is the purpose of the InAppBillingPlugin, where the purchase flow is all about a 'free' version (free in the store), plus the ability to purchase upgrades.
This flow naturally provides a way to offer upgrades within the app and get the user to upgrade directly.
Is the above correct, it might be worth mentioning this in the docs.
The text was updated successfully, but these errors were encountered: