{"action":"created","issue":{"url":"https://api.github.com/repos/jamesmontemagno/InAppBillingPlugin/issues/177","repository_url":"https://api.github.com/repos/jamesmontemagno/InAppBillingPlugin","labels_url":"https://api.github.com/repos/jamesmontemagno/InAppBillingPlugin/issues/177/labels{/name}","comments_url":"https://api.github.com/repos/jamesmontemagno/InAppBillingPlugin/issues/177/comments","events_url":"https://api.github.com/repos/jamesmontemagno/InAppBillingPlugin/issues/177/events","html_url":"https://github.com/jamesmontemagno/InAppBillingPlugin/issues/177","id":344978891,"node_id":"MDU6SXNzdWUzNDQ5Nzg4OTE=","number":177,"title":"Potential BUG: Unable to get purchases","user":{"login":"Bmahecha123","id":15313318,"node_id":"MDQ6VXNlcjE1MzEzMzE4","avatar_url":"https://avatars3.githubusercontent.com/u/15313318?v=4","gravatar_id":"","url":"https://api.github.com/users/Bmahecha123","html_url":"https://github.com/Bmahecha123","followers_url":"https://api.github.com/users/Bmahecha123/followers","following_url":"https://api.github.com/users/Bmahecha123/following{/other_user}","gists_url":"https://api.github.com/users/Bmahecha123/gists{/gist_id}","starred_url":"https://api.github.com/users/Bmahecha123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bmahecha123/subscriptions","organizations_url":"https://api.github.com/users/Bmahecha123/orgs","repos_url":"https://api.github.com/users/Bmahecha123/repos","events_url":"https://api.github.com/users/Bmahecha123/events{/privacy}","received_events_url":"https://api.github.com/users/Bmahecha123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-26T19:39:52Z","updated_at":"2018-07-27T22:45:46Z","closed_at":null,"author_association":"NONE","body":"Hello, not sure if I'm dealing with a bug or conflictions in versions of Xamarin with this plugin. I have an application that was successfully making purchases and getting purchases but I notice that after updating all my dependencies from Xamarin Forms Xamarin.Forms.2.5.1.444934 to 3.1.0.637273 and InAppBillingPlugin from 1.2.4 to 2.0.0 I can't grab my purchases anymore. The actual shell to make and grab purchases is the same that was demoed in all the tutorials for this plugin. Thank you for your time. I'll attach a video and code snippet along with Bug information.\r\n\r\nFortunately this issue was caught by Apple before publishing my App to App Store and breaking the currently working version of the app that's out there. The most dumbfounding thing is all I did were styling and theming changes and didn't touch any of this logic. \r\n\r\nThank you for your time everyone.\r\n\r\n## Bug Information\r\n\r\nVersion Number of Plugin: 2.0.0\r\nDevice Tested On: iPad Mini\r\nSimulator Tested On:\r\nVersion of VS: Mac Community 7.5.4 (build 3)\r\nVersion of Xamarin: iOS 11.12.0.4 (VS Community) and Forms 3.1.0.637273 (VS Community)\r\nVersions of other things you are using:\r\n\r\n### Steps to reproduce the Behavior\r\nVIDEO LINK -> https://www.youtube.com/watch?v=yMb3j6Ibkeg&feature=youtu.be\r\n### Expected Behavior\r\nExpect purchases to be successfully grabbed to validate a user on login.\r\n### Actual Behavior\r\nReceiving InAppBillingPurchaseException with same exact code that was working prior.\r\n### Code snippet\r\n`\r\npublic async Task<bool> WasPackagePurchased(string productId)\r\n        {\r\n            var billing = CrossInAppBilling.Current;\r\n\r\n            try\r\n            {\r\n                var connected = await billing.ConnectAsync();\r\n\r\n                if (!connected)\r\n                {\r\n                    //Couldn't Connect\r\n                    return false;\r\n                }\r\n\r\n                //Check Purchases\r\n                var purchases = await billing.GetPurchasesAsync(ItemType.InAppPurchase);\r\n\r\n                //Check for null just incase\r\n                if (purchases?.Any(p => p.ProductId == productId) ?? false)\r\n                {\r\n                    //Purchase restored\r\n                    return true;\r\n                }\r\n                else\r\n                {\r\n                    //no purchases found\r\n                    return false;\r\n                }\r\n            }\r\n            catch (InAppBillingPurchaseException purchaseEx)\r\n            {\r\n                //Billing Exception handle this based on the type\r\n                Debug.WriteLine(\"Error: \" + purchaseEx);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                Console.WriteLine(ex.Message);\r\n                //Something has gone wrong\r\n            }\r\n            finally\r\n            {\r\n                await billing.DisconnectAsync();\r\n            }\r\n\r\n            return false;\r\n        }`\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jamesmontemagno/InAppBillingPlugin/issues/comments/408557042","html_url":"https://github.com/jamesmontemagno/InAppBillingPlugin/issues/177#issuecomment-408557042","issue_url":"https://api.github.com/repos/jamesmontemagno/InAppBillingPlugin/issues/177","id":408557042,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODU1NzA0Mg==","user":{"login":"Bmahecha123","id":15313318,"node_id":"MDQ6VXNlcjE1MzEzMzE4","avatar_url":"https://avatars3.githubusercontent.com/u/15313318?v=4","gravatar_id":"","url":"https://api.github.com/users/Bmahecha123","html_url":"https://github.com/Bmahecha123","followers_url":"https://api.github.com/users/Bmahecha123/followers","following_url":"https://api.github.com/users/Bmahecha123/following{/other_user}","gists_url":"https://api.github.com/users/Bmahecha123/gists{/gist_id}","starred_url":"https://api.github.com/users/Bmahecha123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bmahecha123/subscriptions","organizations_url":"https://api.github.com/users/Bmahecha123/orgs","repos_url":"https://api.github.com/users/Bmahecha123/repos","events_url":"https://api.github.com/users/Bmahecha123/events{/privacy}","received_events_url":"https://api.github.com/users/Bmahecha123/received_events","type":"User","site_admin":false},"created_at":"2018-07-27T22:45:46Z","updated_at":"2018-07-27T22:45:46Z","author_association":"NONE","body":"I'm trying it on a real account. I use my own IPad Mini which I used to purchase the in app purchase for my app when I released it back in February. This testing flow for my in app purchases worked prior, it's been frustrating."}}
{"actor":{"display_login":"Bmahecha123"}}