{ "id": "114762", "key": "AC-1744", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-05-22T21:41:06.000+0000", "created": "2013-05-22T14:43:33.000+0000", "labels": [ "store", "storekit" ], "versions": [], "issuelinks": [ { "id": "28993", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "114774", "key": "MOD-1401", "fields": { "summary": "Storekit: receiptVerificationSandbox always TRUE if set", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:40:37.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14550", "name": "Appcelerator Modules", "description": "Please enter tickets related to Modules here." } ], "description": "Consider the following tests:\r\n\r\n{code}\r\nvar Storekit = require('ti.storekit');\r\nTi.API.error('Storekit.receiptVerificationSandbox: (' + (typeof Storekit.receiptVerificationSandbox) + ') ' + Storekit.receiptVerificationSandbox); \r\n\r\nStorekit.receiptVerificationSandbox = false;\r\nTi.API.error('Storekit.receiptVerificationSandbox: (' + (typeof Storekit.receiptVerificationSandbox) + ') ' + Storekit.receiptVerificationSandbox); \r\n\r\nStorekit.receiptVerificationSandbox = true;\r\nTi.API.error('Storekit.receiptVerificationSandbox: (' + (typeof Storekit.receiptVerificationSandbox) + ') ' + Storekit.receiptVerificationSandbox); \r\n\r\nStorekit.receiptVerificationSandbox = 0;\r\nTi.API.error('Storekit.receiptVerificationSandbox: (' + (typeof Storekit.receiptVerificationSandbox) + ') ' + Storekit.receiptVerificationSandbox); \r\n\r\nStorekit.receiptVerificationSandbox = 1;\r\nTi.API.error('Storekit.receiptVerificationSandbox: (' + (typeof Storekit.receiptVerificationSandbox) + ') ' + Storekit.receiptVerificationSandbox); \r\n{code}\r\n\r\nResulting in the following outcome:\r\n\r\n{code}\r\nMay 22 16:09:19 iPad VerhaaltjesApp[9707] : [ERROR] Storekit.receiptVerificationSandbox: (number) 0\r\nMay 22 16:09:19 iPad VerhaaltjesApp[9707] : [ERROR] Storekit.receiptVerificationSandbox: (boolean) true\r\nMay 22 16:09:19 iPad VerhaaltjesApp[9707] : [ERROR] Storekit.receiptVerificationSandbox: (boolean) true\r\nMay 22 16:09:19 iPad VerhaaltjesApp[9707] : [ERROR] Storekit.receiptVerificationSandbox: (boolean) true\r\nMay 22 16:09:19 iPad VerhaaltjesApp[9707] : [ERROR] Storekit.receiptVerificationSandbox: (boolean) true\r\n{code}\r\n\r\nIn the docs and example code of the module it says {{receiptVerificationSandbox}} is a {{boolean}} and defaults to {{false}}. The tests above show it's a {{number}}, that defaults to {{0}} but changes to a {{boolean}} with value {{TRUE}} if you change it to *whatever* value!\r\n\r\nThis means if you do something like:\r\n\r\n{code}\r\nStorekit.receiptVerificationSandbox = (Ti.App.deployType !== 'production');\r\nStorekit.receiptVerificationSandbox = Alloy.CFG.receiptVerificationSandbox;\r\n{code}\r\n\r\nReceipts will *always* be verified against the sandbox!\r\n\r\nSince you will not know this before the app has been approved (and yes, it will be) this is an extremely critical issue that should be fixed soon. \r\n\r\nAlthough it is advised by both Apple and Appcelerator to verify receipts on your own back-end server, the in-app verification should and must work - correctly.", "attachment": [], "flagged": false, "summary": "Ti.Storekit: receiptVerificationSandbox always TRUE if set", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "ti.storekit 2.0.1", "comment": { "comments": [ { "id": "253506", "author": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "body": "Fixed issue in module with incorrect property type. Updated module (version 2.0.2) will be in the MarketPlace shortly.", "updateAuthor": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "created": "2013-05-22T21:41:06.000+0000", "updated": "2013-05-22T21:41:06.000+0000" }, { "id": "253606", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Thanks for your quick response.\n\nI see you now have this line in the {{app.js}}:\n\n{code}\nStorekit.receiptVerificationSandbox = (Ti.App.deployType !== 'production');\n{code}\n\nYou probably took this from my example, but this test is not valid :) The {{Ti.App.deployType}} can also be {{production}} if the app is *not* distributed via the App Store, e.g. Ad Hoc.\n\nI don't know if there is any way to detect if the app is distributed via the App Store. If so, then the {{receiptVerificationSandbox}} could be removed completely and handled internally.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-05-23T09:21:43.000+0000", "updated": "2013-05-23T09:21:43.000+0000" }, { "id": "257851", "author": { "name": "jam", "key": "jam", "displayName": "jammer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi,\n\nSo, now Storekit.receiptVerificationSandbox is real boolean. Good :)\n\nBut, did you manage how to make it work during Apple's review?? \n", "updateAuthor": { "name": "jam", "key": "jam", "displayName": "jammer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-14T09:01:33.000+0000", "updated": "2013-06-14T09:01:33.000+0000" }, { "id": "259403", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I just removed setting {{receiptVerificationSandbox}}, since its default is {{false}}.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-06-25T19:04:36.000+0000", "updated": "2013-06-25T19:04:36.000+0000" }, { "id": "286625", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hi Fokke Zandbergen,\n\nI believe this is fixed. Please let me know if this ticket can be closed.\n\nThanks,\nShak", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-03T20:33:15.000+0000", "updated": "2014-01-03T20:33:15.000+0000" }, { "id": "286665", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Yeo, was fixed indeed", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-01-04T19:43:22.000+0000", "updated": "2014-01-04T19:43:22.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }