I have use the SetApplePromotionalPurchaseInterceptorCallback to intercepts the promotional purchase. Sometimes I dont want to resume the purchase, so i will skip “ContinuePromotionalPurchases”
. But it will resume with another promotional purchase. It seem like there is a queue to save these payments. So how to discard the queue if i dont want to resume.
sorry for my poor english
Are you using the code mentioned here? Unity - Manual: iOS & Mac App Stores
Yes , but in my app there is not always has a “ContinuePromotionalPurchases” after each promotional purchase
code like as follows:
private IEnumerator ContinuePromotionalPurchases() {
Debug.Log("Continuing promotional purchases in 5 seconds");
yield return new WaitForSeconds(5);
Debug.Log("Continuing promotional purchases now");
if (condition) //check in my app
{
m_AppleExtensions.ContinuePromotionalPurchases (); // iOS and tvOS only
}
}
problem produce steps:
- Click purchase in app store, then the app is opened, if this time the “condition” is false, ContinuePromotionalPurchases will not be called.
- App enter background, switch to app store and click another promotional purchase in this app. This time the “condition” is true, then ContinuePromotionalPurchases is called. You will notice that the previous purchase will also be added to payment queue.
Understood, I suspect this is the current behavior. I will put in a feature request to the team, and hopefully we will see this feature in a future release, if the Apple store API supports it. Have you found any Apple documentation to this effect?
Thanks! I think this behavior is controlled by your side. There is a “payment” generated after each click. The UnityIAP maybe have a list to save it. What I want is just to add a function like “ClearPromotionalPurchases” to clear this payment list. Thanks again!