Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What should the app do in response to a deferred SKPaymentTransaction?

I have in-app purchases in my app, and new to iOS 8 are "deferred" transactions, partially described in a tech note

I understand what it does and that I need to not block the UI, and update my UI to reflect that the transaction state is deferred. But what am I supposed to place in the method -(void)transactionDeferred:(SKPaymentTransaction *)transaction to disregard the transaction for the time being?

Do I only have update the UI? Also what should the content of the UI be? Do I need to replace the price label with something like "Your purchase is deferred"? I don't think there is a way to test this, at least I haven't seen anything about it with my sandbox test account. If there was a way to go through the process and see how it works, it would make a lot more sense to me.

like image 286
SaleenS7 Avatar asked Oct 03 '14 21:10

SaleenS7


1 Answers

What I am doing is:

  1. Stopping indicator animation
  2. Activating buy and restore buttons
  3. Showing an alert:

Waiting For Approval
Thank you! You can continue to use Altershot while your purchase is pending an approval from your parent.

I watched WWDC 14 video. Apple says you should't block UI and allow to click on buy button again. I think we need this in case parent miss alert, so child can send one more.

What I know is that we should not call following method for deferred transactions:

[[SKPaymentQueue defaultQueue] finishTransaction:transaction];

like image 70
Boris Y. Avatar answered Oct 04 '22 05:10

Boris Y.