Apple released the StoreKit and we cannot even get any callbacks for the cancel event when a user puts in his/her email and password for:
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions]
This event should not be confused with pushing cancel when cancelling a purchase.
The event we're interested in is pushing cancel when trying to restore transactions.
There are no callbacks for a user pushing cancel, or even pushing the OK button.
The only call back you get is when the information from the server comes back indicating if it was successful or not. Unacceptable.
Try this one:
@protocol SKPaymentTransactionObserver <NSObject>
....
@optional
// Sent when an error is encountered while adding transactions from the user's purchase history back to the queue.
- (void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
@end
来源:https://stackoverflow.com/questions/3365947/cancel-event-for-skpaymentqueue-defaultqueue-restorecompletedtransactions