{ "id": "171163", "key": "AC-5615", "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": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2018-03-31T23:41:04.000+0000", "created": "2018-02-22T18:16:48.000+0000", "labels": [ "ios", "module" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-03-31T23:41:04.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14550", "name": "Appcelerator Modules", "description": "Please enter tickets related to Modules here." } ], "description": "When the user doesn't have credit card on apple acount, when he click's on purchase inside the app, he is redirected to appstore to add a new card. At this moment, Storekit module fire's TRANSACTION_STATE_FAILED event with cancelled 'true'. When the user finish the credit card addition and confirm the purchase, purchased event is fired, but my app is not listenning to this event anymore, because the purchased was 'cancelled'.\r\n\r\n{code:java}\r\nStorekit.addEventListener('transactionState', function(evt) {\r\n hideLoading();\r\n switch (evt.state) {\r\n case Storekit.TRANSACTION_STATE_FAILED:\r\n \t\t//second, when the user goes to add a credit card, TRANSACTION_STATE_FAILED with cancelled 'true' is called.\r\n break;\r\n case Storekit.TRANSACTION_STATE_PURCHASED:\r\n\t\t\t\t\t\t//third, when the user ends the credit card addition and confirms the purchase, TRANSACTION_STATE_PURCHASED is fired.\r\n break;\r\n case Storekit.TRANSACTION_STATE_PURCHASING:\r\n \t//first, TRANSACTION_STATE_PURCHASING is fired.\r\n break;\r\n\t\tcase Storekit.TRANSACTION_STATE_DEFERRED:\r\n break;\r\n }\r\n});\r\n{code}\r\n\r\nTo reproduce this issue, use the example of storekit module:\r\nhttps://github.com/appcelerator-modules/ti.storekit/blob/master/ios/example/app.js\r\n\r\nBut it's only possible to reproduce on production, since it's not possible to add a credit card on sandbox environment.\r\n\r\nSometimes when the user goes to add a new credit card, the app is restarted. In this case, TRANSACTION_STATE_PURCHASED is never called, but the purchase is completed.", "attachment": [], "flagged": false, "summary": "StoreKit - cancelled event called when user doesn't have a credit card and goes to add it.", "creator": { "name": "hrfn", "key": "hrfn", "displayName": "Hugo Ramos Freire Neto", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "hrfn", "key": "hrfn", "displayName": "Hugo Ramos Freire Neto", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK: 7.0.1.GA\r\nTi.Storekit version: 4.3.0\r\nIphone\r\n- It's only possible to reproduce on production, since it's not possible to add a credit card on sandbox environment.", "comment": { "comments": [ { "id": "434782", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "might not be an issue based off of this comment https://forums.developer.apple.com/thread/64489", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-02-22T18:52:28.000+0000", "updated": "2018-02-22T18:52:28.000+0000" }, { "id": "434783", "author": { "name": "davidbenko", "key": "davidbenko", "displayName": "David Benko", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The user in the forum states\r\n\r\n> Therefore, if you wish to shut down your IAP class after a failed transaction you should wait about a second to give the system a chance to send that second transaction.\r\n\r\nBut in my experience the second transaction (the successful one) can take even like 10 minutes to be sent. Because is the amount of time it can take for the user to add the credit card and make the purchase. The problem is that in this time the app can be closed by the operating system and I never receive the success transaction.", "updateAuthor": { "name": "davidbenko", "key": "davidbenko", "displayName": "David Benko", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-22T19:01:58.000+0000", "updated": "2018-02-22T19:01:58.000+0000" }, { "id": "435835", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~hrfn],
Just passing a followup here.Are you able to get that sorted out?  Please let us know if you need more help with this issue.\r\nRegards
\r\nAxway Appcelerator Support", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-03-22T04:45:50.000+0000", "updated": "2018-03-25T20:39:23.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }