{"action":"created","issue":{"url":"https://api.github.com/repos/bizz84/SwiftyStoreKit/issues/67","repository_url":"https://api.github.com/repos/bizz84/SwiftyStoreKit","labels_url":"https://api.github.com/repos/bizz84/SwiftyStoreKit/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/bizz84/SwiftyStoreKit/issues/67/comments","events_url":"https://api.github.com/repos/bizz84/SwiftyStoreKit/issues/67/events","html_url":"https://github.com/bizz84/SwiftyStoreKit/issues/67","id":170343760,"number":67,"title":"App store constantly asking for password, even if I cancel the it.","user":{"login":"aksswami","id":1496758,"avatar_url":"https://avatars2.githubusercontent.com/u/1496758?v=3","gravatar_id":"","url":"https://api.github.com/users/aksswami","html_url":"https://github.com/aksswami","followers_url":"https://api.github.com/users/aksswami/followers","following_url":"https://api.github.com/users/aksswami/following{/other_user}","gists_url":"https://api.github.com/users/aksswami/gists{/gist_id}","starred_url":"https://api.github.com/users/aksswami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aksswami/subscriptions","organizations_url":"https://api.github.com/users/aksswami/orgs","repos_url":"https://api.github.com/users/aksswami/repos","events_url":"https://api.github.com/users/aksswami/events{/privacy}","received_events_url":"https://api.github.com/users/aksswami/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-10T07:03:18Z","updated_at":"2017-05-08T09:26:41Z","closed_at":null,"body":"I am implementing an in-app purchase with consumable products. The problem I am facing is dialogue box asking for password constantly start appearing, even if I cancel, it pop up again.\n\nWhile debugging I found that `finishTransaction is not called` in `InAppCompleteTransactionObserver`.\n\nBelow method didn't call complete transaction on `callbackCalled = true`, which is causing dialogue box to appear again and again.\n\n```\nfunc paymentQueue(queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {\n\n        if callbackCalled {\n            return\n        }\n        if SwiftyStoreKit.hasInFlightPayments {\n            return\n        }\n\n        var completedTransactions: [SwiftyStoreKit.CompletedTransaction] = []\n\n        for transaction in transactions {\n\n            #if os(iOS) || os(tvOS)\n                let transactionState = transaction.transactionState\n            #elseif os(OSX)\n                let transactionState = PaymentTransactionState(rawValue: transaction.transactionState)!\n            #endif\n\n            if transactionState != .Purchasing {\n\n                let completedTransaction = SwiftyStoreKit.CompletedTransaction(productId: transaction.payment.productIdentifier, transactionState: transactionState)\n\n                completedTransactions.append(completedTransaction)\n\n                print(\"Finishing transaction for payment \\\"\\(transaction.payment.productIdentifier)\\\" with state: \\(transactionState.stringValue)\")\n\n                paymentQueue.finishTransaction(transaction)\n            }\n        }\n        callbackCalled = true\n\n        callback(completedTransactions: completedTransactions)\n    }\n```\n"},"comment":{"url":"https://api.github.com/repos/bizz84/SwiftyStoreKit/issues/comments/299817957","html_url":"https://github.com/bizz84/SwiftyStoreKit/issues/67#issuecomment-299817957","issue_url":"https://api.github.com/repos/bizz84/SwiftyStoreKit/issues/67","id":299817957,"user":{"login":"aksswami","id":1496758,"avatar_url":"https://avatars2.githubusercontent.com/u/1496758?v=3","gravatar_id":"","url":"https://api.github.com/users/aksswami","html_url":"https://github.com/aksswami","followers_url":"https://api.github.com/users/aksswami/followers","following_url":"https://api.github.com/users/aksswami/following{/other_user}","gists_url":"https://api.github.com/users/aksswami/gists{/gist_id}","starred_url":"https://api.github.com/users/aksswami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aksswami/subscriptions","organizations_url":"https://api.github.com/users/aksswami/orgs","repos_url":"https://api.github.com/users/aksswami/repos","events_url":"https://api.github.com/users/aksswami/events{/privacy}","received_events_url":"https://api.github.com/users/aksswami/received_events","type":"User","site_admin":false},"created_at":"2017-05-08T09:26:41Z","updated_at":"2017-05-08T09:26:41Z","body":"@bizz84 Not facing this issue with the latest SwiftyStoreKit. Thanks for help."}}
{"actor":{"display_login":"aksswami"}}