Hey guys,
i just discovered, that:
IOS: store.purchase( arrayOfProducts )
Amazon: store.purchase( “my_test_sku” )
That somethings that should be HIGHLIGHTED. We are fans fo cross stuff are like that =)
Hey guys,
i just discovered, that:
IOS: store.purchase( arrayOfProducts )
Amazon: store.purchase( “my_test_sku” )
That somethings that should be HIGHLIGHTED. We are fans fo cross stuff are like that =)
That is listed in the plugin documentation.
Yes, but that is only ONE difference =(
I was using same code as for other IAP(google/ios) - but this one difference was unpleasant and unnecessary, imho.
Here’s another way to think about it. Apple, Google and Amazon (and for that part Fortumo, which handles Nook and standalone as well as the upcoming OUYA store) are all diverse entities who do things in a way that is best for them and their native developers. Each store’s eco system is different. There are software patents involved so Vendor B can’t do exactly want Vendor A does. The fact that we have as few differences as we do between Apple, Google and Amazon is frankly an amazing feat.
But I can say this, I took one of my apps that was already Apple and Google IAP Friendly. I sat down and I read the plugin documentation, very carefully paying attention to the what’s different section so I fully understood what differences I had to deal with, planned for them, and with very minor code restructuring had Amazon’s IAP installed rather quickly and tested. Overall I would say it was a very pleasing experience.
I think as a consumer of Corona SDK, we have come to love how easy the engineers have made our lives and perhaps we need to stop and appreciate how hard of a task it is to have a code base that is 95%+ cross platform.
Corona is awesome, and i love it. Move over - i`m going to teach how to code on Corona this school year.
But - this ‘purchase’ was that 5% that broke cross-platform thing. There is a way to fix it: Limit arrayOfProducts to 1 for Amazon Plugin. That way it will support all stores, without exception. Am I rigth?
For example, I wrote a class:
[lua]
eliteShop = require(“eliteGamesStore”).new();
–adding items
eliteShop:addItem(‘moneypack1’,{cost="$0.99", money=50});
eliteShop:addItem(‘moneypack2’,{cost="$1.99", money=125});
–adding ID of items to work with external shops
eliteShop:addItemShopId(‘moneypack1’, eliteShop.CONST_SHOP_APPLE,“cc3.moneypack1”);
eliteShop:addItemShopId(‘moneypack2’, eliteShop.CONST_SHOP_APPLE,“cc3.moneypack2”);
eliteShop:addItemShopId(‘moneypack1’, eliteShop.CONST_SHOP_GOOGLE,“cc3.moneypack1”);
eliteShop:addItemShopId(‘moneypack2’, eliteShop.CONST_SHOP_GOOGLE,“cc3.moneypack2”);
eliteShop:addItemShopId(‘moneypack1’, eliteShop.CONST_SHOP_AMAZON,“cc3.moneypack1”);
eliteShop:addItemShopId(‘moneypack2’, eliteShop.CONST_SHOP_AMAZON,“cc3.moneypack2”);
–callback for event - item bougth
function storeGetItem(item_id)
local item_obj = eliteShop:getItem(item_id);
if(item_id == “moneypack1” or item_id == “moneypack2” or item_id == “moneypack3” or item_id == “moneypack4”)then
login_obj_add_item_ex(“money”, item_obj.money);
login_obj[‘noads’] = true;
end
saveData();
end
eliteShop:buyHandlerSet(storeGetItem);
[/lua]
Inside that class I added exception for Amazon Plugin. Idea is that I use same class to support 100% IAP.
I`m not hating, i just warning others that they could expirience same issue that I got when added Amazon IAP Plugin.
That is listed in the plugin documentation.
Yes, but that is only ONE difference =(
I was using same code as for other IAP(google/ios) - but this one difference was unpleasant and unnecessary, imho.
Here’s another way to think about it. Apple, Google and Amazon (and for that part Fortumo, which handles Nook and standalone as well as the upcoming OUYA store) are all diverse entities who do things in a way that is best for them and their native developers. Each store’s eco system is different. There are software patents involved so Vendor B can’t do exactly want Vendor A does. The fact that we have as few differences as we do between Apple, Google and Amazon is frankly an amazing feat.
But I can say this, I took one of my apps that was already Apple and Google IAP Friendly. I sat down and I read the plugin documentation, very carefully paying attention to the what’s different section so I fully understood what differences I had to deal with, planned for them, and with very minor code restructuring had Amazon’s IAP installed rather quickly and tested. Overall I would say it was a very pleasing experience.
I think as a consumer of Corona SDK, we have come to love how easy the engineers have made our lives and perhaps we need to stop and appreciate how hard of a task it is to have a code base that is 95%+ cross platform.
Corona is awesome, and i love it. Move over - i`m going to teach how to code on Corona this school year.
But - this ‘purchase’ was that 5% that broke cross-platform thing. There is a way to fix it: Limit arrayOfProducts to 1 for Amazon Plugin. That way it will support all stores, without exception. Am I rigth?
For example, I wrote a class:
[lua]
eliteShop = require(“eliteGamesStore”).new();
–adding items
eliteShop:addItem(‘moneypack1’,{cost="$0.99", money=50});
eliteShop:addItem(‘moneypack2’,{cost="$1.99", money=125});
–adding ID of items to work with external shops
eliteShop:addItemShopId(‘moneypack1’, eliteShop.CONST_SHOP_APPLE,“cc3.moneypack1”);
eliteShop:addItemShopId(‘moneypack2’, eliteShop.CONST_SHOP_APPLE,“cc3.moneypack2”);
eliteShop:addItemShopId(‘moneypack1’, eliteShop.CONST_SHOP_GOOGLE,“cc3.moneypack1”);
eliteShop:addItemShopId(‘moneypack2’, eliteShop.CONST_SHOP_GOOGLE,“cc3.moneypack2”);
eliteShop:addItemShopId(‘moneypack1’, eliteShop.CONST_SHOP_AMAZON,“cc3.moneypack1”);
eliteShop:addItemShopId(‘moneypack2’, eliteShop.CONST_SHOP_AMAZON,“cc3.moneypack2”);
–callback for event - item bougth
function storeGetItem(item_id)
local item_obj = eliteShop:getItem(item_id);
if(item_id == “moneypack1” or item_id == “moneypack2” or item_id == “moneypack3” or item_id == “moneypack4”)then
login_obj_add_item_ex(“money”, item_obj.money);
login_obj[‘noads’] = true;
end
saveData();
end
eliteShop:buyHandlerSet(storeGetItem);
[/lua]
Inside that class I added exception for Amazon Plugin. Idea is that I use same class to support 100% IAP.
I`m not hating, i just warning others that they could expirience same issue that I got when added Amazon IAP Plugin.