question

robstrv avatar image
robstrv asked

Purchasing two different products returns receipts with the same sku

Hi all, We are developing an Android app using IAP v2.0. In this app the user has to choose between two subscription plans: monthly or annual. The SKUs have the following format: [vendorId].[planId] [vendorId] is common to both plans and [planId] is unique to each plan. When we call PurchasingService.getProductData() we indeed get two different Product objects with the right SKUs. Here's my issue: When we try to purchase one of those products using PurchasingService.purchase([vendorId].[planId]): - First Amazon is again giving the user a choice between both plans regardless of which plan we initially requested before letting the user pay. - Then when the purchase is succesful and we call receipt.getSku(), it returns only [vendorId], making it impossible to determine which plan has been purchased. Also, I don't know if it is relevant to our issue but it returns it in uppercase letters while our initial sku is in lowercase. If anyone has encountered this issue and is able to help us, I'd be really grateful. Message was edited by: robstrv
iap
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Nick Gardner avatar image
Nick Gardner answered
Hi, Both of these functions appear to be working properly. The application should check whether there is an active subscription when it is started and/or resumed, regardless of which subscription period is chosen. The purchasing popup also is intended to display the various period options for a subscription since it treats them all as subplans of a single IAP item. -Nick
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

robstrv avatar image
robstrv answered
Indeed it is because of two periods for the same subscription. Should be solved on server side. Thanks! Message was edited by: robstrv
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.