You asked....
"How are we supposed to handle the following:
- display a proper error message if there was an actual error
- not display an error message if the transaction fails and is then followed by a "StatePurchased" notification"
Here is a direct answer to that question:
Either:
1) use a "performSelector:withObject:afterDelay:2.0F" to display the error message and cancel that with a "cancelPreviousPerformRequestsWithTarget:" if you get another transaction
Or:
display the error message with a global scope to retain the UIAlertController reference so that you can dismiss the UIAlertController if another transaction comes in.