Skip to content

Instantly share code, notes, and snippets.

@jeiting
Created November 29, 2017 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeiting/cc785ed29ff3b874a55fd6f9dfe69be5 to your computer and use it in GitHub Desktop.
Save jeiting/cc785ed29ff3b874a55fd6f9dfe69be5 to your computer and use it in GitHub Desktop.
func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
for transaction in transactions {
switch(transaction.transactionState) {
case .purchasing:
break;
case .purchased:
case .restored:
handlePurchase(transaction);
case .failed:
handleFailure(transaction);
case .deferred:
break;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment