Private Sub ReshowPurchases
Wait For(cBBsGlobals.gBillingClient.ConnectIfNeeded) Billing_Client_Connected(Result As BillingResult)
Dim ALLPurchases As List
ALLPurchases.Initialize
If Result.IsSuccess Then
Wait For(cBBsGlobals.gBillingClient.QueryPurchases("inapp")) Billing_Client_PurchasesQueryCompleted(Result As BillingResult, Purchases As List)
Log($"pSubscriptions::Query completed for inapp: ${Result.IsSuccess} Size: ${Purchases.Size}"$)
If Result.IsSuccess Then
For Each p As Purchase In Purchases
If p.PurchaseState <> p.STATE_PURCHASED Then
Continue
End If
If cBBsGlobals.gBillingClient.VerifyPurchase(p, cBBsGlobals.gBMK) = False Then
Log("pSubscriptions::RestorePurchases - inapp Purchase NOT Verified")
Continue
End If
Log($"pSubscriptions::RestorePurchases - inapp Purchase Acknowledged1:${p.IsAcknowledged} ProductID:${p.Sku}"$)
ALLPurchases.Add(p)
Next
End If
Wait For(cBBsGlobals.gBillingClient.QueryPurchases("subs")) Billing_Client_PurchasesQueryCompleted(Result As BillingResult, Purchases As List)
Log($"pSubscriptions::Query completed for subs: ${Result.IsSuccess} Size: ${Purchases.Size}"$)
If Result.IsSuccess Then
For Each p As Purchase In Purchases
If p.PurchaseState <> p.STATE_PURCHASED Then
Continue
End If
If cBBsGlobals.gBillingClient.VerifyPurchase(p, cBBsGlobals.gBMK) = False Then
Log("pSubscriptions::RestorePurchases - subs Purchase NOT Verified")
Continue
End If
Log($"pSubscriptions::RestorePurchases - subs Purchase Acknowledged1:${p.IsAcknowledged} ProductID:${p.Sku}"$)
ALLPurchases.Add(p)
Next
End If
End If
' If AllPurchases.Size > 0 then
' end if
Return
End Sub