{"action":"opened","issue":{"url":"https://api.github.com/repos/voltrue2/in-app-purchase/issues/8","labels_url":"https://api.github.com/repos/voltrue2/in-app-purchase/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/voltrue2/in-app-purchase/issues/8/comments","events_url":"https://api.github.com/repos/voltrue2/in-app-purchase/issues/8/events","html_url":"https://github.com/voltrue2/in-app-purchase/issues/8","id":70101458,"number":8,"title":"validate returns an error","user":{"login":"gurmukhp","id":899769,"avatar_url":"https://avatars.githubusercontent.com/u/899769?v=3","gravatar_id":"","url":"https://api.github.com/users/gurmukhp","html_url":"https://github.com/gurmukhp","followers_url":"https://api.github.com/users/gurmukhp/followers","following_url":"https://api.github.com/users/gurmukhp/following{/other_user}","gists_url":"https://api.github.com/users/gurmukhp/gists{/gist_id}","starred_url":"https://api.github.com/users/gurmukhp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gurmukhp/subscriptions","organizations_url":"https://api.github.com/users/gurmukhp/orgs","repos_url":"https://api.github.com/users/gurmukhp/repos","events_url":"https://api.github.com/users/gurmukhp/events{/privacy}","received_events_url":"https://api.github.com/users/gurmukhp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-22T11:28:15Z","updated_at":"2015-04-22T11:28:15Z","closed_at":null,"body":"I am trying to use your module and have copied in the sample code you've given:\r\n\r\n```\r\n\tiap.setup(function (error) {\r\n\t    if (error) {\r\n\t        // error hmm \r\n\t    }\r\n\t    iap.validate(iap.APPLE, function (error, response) {\r\n\t        if (error) {\r\n\t            // error \r\n\t        }\r\n\t        if (iap.isValidated(response)) {\r\n\t            var purcahseDataList = iap.getPurchaseData(response);\r\n\t            /*\r\n\t                [\r\n\t                    {\r\n\t                        productId: xxx,\r\n\t                        purchasedDate: yyy,\r\n\t                        quantity: zzz\r\n\t                    }\r\n\t                ]\r\n\t            */\r\n\t        }\r\n\t    });\r\n\t});\r\n```\r\n\r\nHowever I'm getting the error about validate?\r\n\r\n```\r\n[ERROR] TypeError: undefined is not a function\r\n    at /Users/gurmukh.panesar/Sites/iap/node_modules/in-app-purchase/index.js:45:11\r\n    at handleResponse (/Users/gurmukh.panesar/Sites/iap/node_modules/in-app-purchase/lib/apple.js:115:2)\r\n    at /Users/gurmukh.panesar/Sites/iap/node_modules/in-app-purchase/lib/apple.js:78:3\r\n    at Request._callback (/Users/gurmukh.panesar/Sites/iap/node_modules/in-app-purchase/lib/apple.js:129:10)\r\n    at Request.self.callback (/Users/gurmukh.panesar/Sites/iap/node_modules/in-app-purchase/node_modules/request/request.js:122:22)\r\n    at Request.EventEmitter.emit (events.js:98:17)\r\n    at Request.<anonymous> (/Users/gurmukh.panesar/Sites/iap/node_modules/in-app-purchase/node_modules/request/request.js:888:14)\r\n    at Request.EventEmitter.emit (events.js:117:20)\r\n    at IncomingMessage.<anonymous> (/Users/gurmukh.panesar/Sites/iap/node_modules/in-app-purchase/node_modules/request/request.js:839:12)\r\n    at IncomingMessage.EventEmitter.emit (events.js:117:20)\r\n```"}}