Please check 20.4pr5 with newer classes:
OK. Christian, I appreciate your patience, but I am still lost.
Let us say I want to check if the app Store ID 9NCMFFPJRVHC (Check Print’R+) has been purchased ?
I started with
dim wsku as WindowsStoreSKUMBS
wsku.StoreId = “9NCMFFPJRVHC”
And I am lost.
dim w as new WindowsStoreContextMBS
w.RequestPurchaseAsync addressOf YourCompletionHandler, “9NCMFFPJRVHC”
And see if you get a callback later.
I’ve updated the example to include this to show how to buy something:
Sub Action() Handles Action Log "RequestPurchaseAsync..." // please change ID for the item to purchase Const StoreID = "9NCMFFPJRVHC" context.RequestPurchaseAsync AddressOf RequestPurchaseCompleted, StoreID End Sub
and then we add a method to handle it:
Public Sub RequestPurchaseCompleted(AsyncStatus as Integer, result as WindowsStorePurchaseResultMBS) If AsyncStatus <> context.kAsyncStatusCompleted Then MsgBox "Async call failed." Return End If Select Case result.Status Case result.kStatusSucceeded MsgBox "Purchase Succeeded." Case result.kStatusAlreadyPurchased MsgBox "Already Purchased." Case result.kStatusNotPurchased MsgBox "Not Purchased." Case result.kStatusNetworkError MsgBox "Network error." Case result.kStatusServerError MsgBox "Server error." End Select Break // see in debugger End Sub
Thank you Christian.
I added a button with that to the project, as well as the RequestPurchaseCompleted method.
I downloaded 20pr5 and updated plugins in 2019R3.2.
Here are the plugins I currently have:
When I try to run the project, I get all these errors:
What gives ?
Looks like a problem with loading the plugins.
Maybe clear the caches via button in preferences dialog?
Is that on Windows? You could try without all the Mac plugins.
I removed the Mac plugins, I cleared the cache, I replaced again the plugins, making sure they come indeed from 204pr5.
Could you verify on your end ?
on Windows 10 with Xojo 2019r3, I dropped all plugins from pr5 download into plugins folder, launched Xojo, opened project and run it. No problems.
I used 2019R3.2.
I will have to check with 2019R3
the .2 should not make a difference.
So I dumped ALL the plugins into 2019R3.2, and now, the example project works flawlessly. So my error was before to keep only the win plugin and WinFramework.
WindowsStoreProductMBS must be in another plugin.
Now I will be able to create a free version with iAP.
Thank you Christian