Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Example of IAP line's of codes ( google and amazon )
Started by yvandotet Oct 06 2017 04:19 AM

1 reply to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

yvandotet

[GLOBAL: userInfoPane.html]
yvandotet
  • Contributor

  • 195 posts
  • Corona SDK

Hello,

 

I have read many tutos about this, but it's confusing about what to cleary write for making a purchase ( on android google and amazon, not apple ).

 

So if I am on the main.lua file, and I have a button, what to do for a simple object ?

local button=display.newRect(100,100,100,100)

button:addEventListener("touch",function(event)

    if event.phase=="began" then

    ... things to do ? it's my question ..

    end

end)

I have found one github that give a piece of the answer: https://github.com/sebastianlis/OOP-Samples-for-Corona-SDK/blob/master/classes/samples/Monetization/InAppPurchase.lua

 

 but I wanted a full response by an expert if it's possible.

 

Thanks,

 

Yvan.

 



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,681 posts
  • Enterprise

Please read this guide: https://docs.coronalabs.com/guide/monetization/IAP/index.html

 

It should have examples on how to do what you want.

 

Rob




[topic_controls]
[/topic_controls]