{"action":"created","issue":{"url":"https://api.github.com/repos/AlexDisler/cordova-plugin-inapppurchase/issues/2","repository_url":"https://api.github.com/repos/AlexDisler/cordova-plugin-inapppurchase","labels_url":"https://api.github.com/repos/AlexDisler/cordova-plugin-inapppurchase/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/AlexDisler/cordova-plugin-inapppurchase/issues/2/comments","events_url":"https://api.github.com/repos/AlexDisler/cordova-plugin-inapppurchase/issues/2/events","html_url":"https://github.com/AlexDisler/cordova-plugin-inapppurchase/issues/2","id":141021499,"number":2,"title":"Consume then validate in one promise chain","user":{"login":"mklilley","id":7937044,"avatar_url":"https://avatars.githubusercontent.com/u/7937044?v=3","gravatar_id":"","url":"https://api.github.com/users/mklilley","html_url":"https://github.com/mklilley","followers_url":"https://api.github.com/users/mklilley/followers","following_url":"https://api.github.com/users/mklilley/following{/other_user}","gists_url":"https://api.github.com/users/mklilley/gists{/gist_id}","starred_url":"https://api.github.com/users/mklilley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mklilley/subscriptions","organizations_url":"https://api.github.com/users/mklilley/orgs","repos_url":"https://api.github.com/users/mklilley/repos","events_url":"https://api.github.com/users/mklilley/events{/privacy}","received_events_url":"https://api.github.com/users/mklilley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-15T16:07:24Z","updated_at":"2016-03-16T00:00:51Z","closed_at":null,"body":"Hi,\r\n\r\nThanks for taking the time to write this plugin, I have only been looking at it briefly but am finding it infinitely easier to understand that the other ones out there....shall name no names :-)\r\n\r\nI just have a question really.  I am looking at your example:\r\n\r\n` \r\n  inAppPurchase\r\n    .buy('com.yourapp.consumable_prod1')\r\n    .then(function (data) {\r\n      return inAppPurchase.consume(data.productType, data.receipt, data.signature);\r\n    })\r\n    .then(function (data) {\r\n      console.log('product was successfully consumed!');\r\n    })\r\n    .catch(function (err) {\r\n      console.log(err);\r\n    });`\r\n\r\n\r\nI am wondering, after the product has been consumed is the data returned from `inAppPurchase.consume(data.productType, data.receipt, data.signature);` the same as that returned from ` inAppPurchase\r\n    .buy('com.yourapp.consumable_prod1')`.  It seems to be suggested to be the case, but as I went through the source code it was not immediately apparent that nativeCall to the consume function returns the same data as for the buy function.\r\n\r\nEssentially what i'd like to do is consume the product then afterwards validate it as a nice promise chain and im worried that if i consume first ill lose the receipt and signature data.\r\n\r\nI hope that makes sense\r\n\r\nThanks for your time\r\n\r\nMatt"},"comment":{"url":"https://api.github.com/repos/AlexDisler/cordova-plugin-inapppurchase/issues/comments/197073317","html_url":"https://github.com/AlexDisler/cordova-plugin-inapppurchase/issues/2#issuecomment-197073317","issue_url":"https://api.github.com/repos/AlexDisler/cordova-plugin-inapppurchase/issues/2","id":197073317,"user":{"login":"mklilley","id":7937044,"avatar_url":"https://avatars.githubusercontent.com/u/7937044?v=3","gravatar_id":"","url":"https://api.github.com/users/mklilley","html_url":"https://github.com/mklilley","followers_url":"https://api.github.com/users/mklilley/followers","following_url":"https://api.github.com/users/mklilley/following{/other_user}","gists_url":"https://api.github.com/users/mklilley/gists{/gist_id}","starred_url":"https://api.github.com/users/mklilley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mklilley/subscriptions","organizations_url":"https://api.github.com/users/mklilley/orgs","repos_url":"https://api.github.com/users/mklilley/repos","events_url":"https://api.github.com/users/mklilley/events{/privacy}","received_events_url":"https://api.github.com/users/mklilley/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T00:00:51Z","updated_at":"2016-03-16T00:00:51Z","body":"Yeah that makes sense now.  Thanks"}}