I have a client where p.OrderId picks up the original subscription in 2019 but I need the latest one in 2022
Attached is a screen shot from my app showing the productid.
No doubt I'm doing something wrong but how do I get the latest renewal not the original.
My Code
Attached is a screen shot from my app showing the productid.
No doubt I'm doing something wrong but how do I get the latest renewal not the original.
My Code
B4X:
public Sub RestorePurchases
Wait For (billing.ConnectIfNeeded) Billing_Connected (Result As BillingResult)
If Result.IsSuccess Then
Wait For (billing.QueryPurchases("subs")) Billing_PurchasesQueryCompleted (Result As BillingResult, Purchases As List)
If Result.IsSuccess Then
For Each p As Purchase In Purchases
productID = p.OrderId
purchaseTime = p.PurchaseTime
SKU_Purchased = p.Sku
token = p.PurchaseToken
subsID = p.Sku
Next
End If
End If
End Sub
Attachments
Last edited: