I am getting sick of this problem. This is the exact code I tested:
[lua]local store = require “store”
local function callback(event)
local transaction = event.transaction
print("++++ " … transaction.state … " " … transaction.productIdentifier … “++++”)
if transaction.state == “purchased” then
elseif transaction.state == “restored” then
elseif transaction.state == “refunded” then
elseif transaction.state == “cancelled” then
elseif transaction.state == “failed” then
end
store.finishTransaction(transaction)
end
if store.availableStores.apple then
store.init(“apple”, callback)
elseif store.availableStores.google then
store.init(“google”, callback)
end
local widget = require “widget”
local buyBtn = widget.newButton{
label = “buy”,
onRelease = function()
store.purchase({
“net.topfuncoolgames.barfriends1.cash1”
})
end
}
buyBtn.x = 100
buyBtn.y = 100
local restoreBtn = widget.newButton{
label = “restore”,
onRelease = function()
store.restore()
end
}
restoreBtn.x = 100
restoreBtn.y = 200[/lua]
Then make 1 purchase:
this is what I got:
[blockcode]
++++ purchased net.topfuncoolgames.barfriends1.cash1++++
[/blockcode]
Then I made 2nd purchase of same item
[blockcode]
++++ purchased net.topfuncoolgames.barfriends1.cash1++++
++++ purchased net.topfuncoolgames.barfriends1.cash1++++
[/blockcode]
And you know what is the creepiest? Constantly spamming [blockcode]store.restore()[/blockcode] will return all the transaction, so user has unlimited in-game money.
Please correct me if there is something wrong with my code.
This is what I tested:
- A 2nd test device with a new test account
- A new app with different ID, uploaded using new developer console.
Please, someone must be able to reproduce the bug. Some us your minimal code that works (not the corona sample, too long) [import]uid: 143031 topic_id: 35459 reply_id: 141638[/import]