Simulate purchase with Windows.Services.Store Addons
Asked Answered
H

1

6

I've written up an in app purchase system, built on Windows.Services.Store

Now I wish to make sure my users get what they pay for. In the older API, I could simulate purchases.

How can I get each purchase to succeed without needing to feed it real money from my credit card/paypal each time?

I can't return to the older API.

Hendershot answered 19/9, 2017 at 8:51 Comment(3)
github.com/Microsoft/Windows-universal-samples/tree/master/… follow this linkProbabilism
That link is good for people new to IAP, but I've already got 83 add ons and an in game place where users can access them. I'm trying to test.Hendershot
Just making the price Zero initially will help you test an AddOn purchase. Of course, this is before release to the public.Tarter
D
4

How can I get each purchase to succeed without needing to feed it real money from my credit card/paypal each time?

In testing phase, the new API does not provide a class that you can use to simulate license info during testing. So, to simulate the purchase process, you need to buy the real product.

If you just need to get the product to ensure the correct feature or service could be unlocked after the add-on gets purchased, you could generate promotional code through Dev Center to get your product without feeding money:

enter image description here

Also, note this in that document:

In some cases the customer may see a Buy button instead of Install, even though the app was successfully redeemed via the promotional code. The customer can click Buy to install the app for no charge.

Deboradeborah answered 20/9, 2017 at 3:1 Comment(4)
With this in mind, should developers have at least two MS accounts testing their applications? Account 1: No addons unlocked. To test un-availibility Account 2: All addons unlocked. To test full availability. Accounts n: To handle conflicting IAP. //I'm accustomed to the older API depending on a lack of persistence for IAP Purchase testing.Hendershot
MSFT is working on optimizing this testing process. If you have any good suggestion, please feel free to submit your idea in User Voice site so that MSFT might will add it to their to-do-list.Deboradeborah
This is a partial workaround. After purchasing the iap once, there won't be a way to test the purchase process again.Pasteur
Any news on this? This is particularly important for automated testing.Beirut

© 2022 - 2024 — McMap. All rights reserved.