Reputation: 61388
I'm trying to implement in-app purchases for a Windows Phone 8 app. The docs for RequestProductPurchaseAsync
don't exist specifically for the phone. In the Windows Store docs, there's a funny line:
You should treat a success result as indicating the async process completed without errors. To ensure that the transaction itself was successful, check the LicenseInformation element in the returned receipt.
There's no LicenseInformation
element (or attribute) in the receipt. There's Receipt
, ProductReceipt
, and Signature
. Question - did anyone work with in-app purchases before? How is transaction failure/cancellation reported?
Upvotes: 3
Views: 874
Reputation: 61388
Got my hands on a real phone.
Cancellation is reported by an async completion (parameters Info
, Status
) with Status=AsyncStatus.Error, Info.ErrorCode is COMException with HResult=0x80004005 (E_FAIL).
For at least some of the genuine transaction failures (e. g. product ID not found in the catalog), the reported status and HRESULT are the same. I don't think there's a good way to catch a cancellation with the current API. Reporting AsyncStatus.Canceled
would be a good idea, but so far it's not implemented.
Upvotes: 2