[AC-2710] Ti.Storekit: requestProducts don't return Ti.Storekit.Product object
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-04-04T23:36:35.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator Modules, Titanium SDK & CLI |
Labels | storekit |
Reporter | Seiji Nakaya |
Assignee | Shak Hossain |
Created | 2013-03-23T13:29:20.000+0000 |
Updated | 2016-03-08T07:41:49.000+0000 |
Description
Ti.Storekit's requestProducts don't return Ti.Storekit.Product object, returns product's description instead of Ti.Storekit.Product, so i cannot call purchase method in next step.
For example, In the followings code,
purchaseBtn.addEventListener('click', function(e) {
storeKit.requestProducts(['product1'], function (evt) {
if (evt.success) {
Ti.API.info(evt);
Ti.API.info(JSON.stringify(evt));
product = evt.products[0];
}...
evt.products is:
{
products = (
"You can to be use Full Function"
);
source = "[object TiStorekitProductRequest]";
success = 1;
type = callback;
}
{"type":"callback","products":[{}],"source":{},"success":true}
Not object.
AppStore server returns Product's information normally.
I attached sample code project, and capture result with AppStore.
Attachments
File | Date | Size |
---|---|---|
IaPTest.zip | 2013-03-23T13:29:20.000+0000 | 2154866 |
sandbox_In-App-Purchase.xml | 2013-03-23T13:29:20.000+0000 | 9356 |
Seiji, The JIRA platform is here to report known bugs. If you have questions on how to implement a feature such as Ti.Storekit please refer to the Q&A: http://developer.appcelerator.com/questions/newest Regards, Carter
Hi, I already submitted Q&A: http://developer.appcelerator.com/question/149502/tistorekit-requestproducts-dont-return-tistorekitproduct-return-description Your support team recommends here, if I think this is a BUG. I think this a BUG happens on unknown conditions. Because it happens in 100% on my environment. Regards, -Seiji
Please reattachthe sample app. The one you have uploaded is the default Ti App, I think this might have been a mistake. I will then take another look at this. -Carter
This not default app. Please see ui/common/FirstView.js. This is very simple sample app. I have tried on my devices. of cause same result. If you teach me your UDID, I can send you sample app of this code.
Seiji, I am not quite sure I understand your problem/code. In order to get the description you need to call Ti.StoreKit.Product.description and I dont see you doing that. Also can you clarify what your second piece of code is referring too? Is this the printed value of evt.products? Because I do not see where you printed that out in your code. All the information you need on how to set up Ti.StoreKit is available to you in the example folder within the module when you download it. I will attach it here as well again for you. Apple has not made an recent changes and this problem only seems to be unique to you at this time. This leads me to believe you are making an error somewhere. Please use the example app.js as a reference on how to use the StoreKit and your issue should go away. Any questions or comments, feel free to ask. Regards, Carter app.js
Hello Carter, I'm sorry, This case is my misunderstanding. It seemed that evt.products is invalid in json. However evt.products has normally data actually. My app works fine now. I apologize to your team, and Thanks for your support so much. -Seiji