google play IAP sample code?

I’m a newbie and have problem with IAP, so I don’t know where to post this topic, I hope I’m not in the wrong place.
I’ve checked the sample code from Corona but I hardly understand the proper way to use it. I simply want a IAP button but it acts like a donate button (users can choose whether they want to pay or not, it doesn’t limit how many times they want to donate, they won’t receive any rewards - If anyone know a better way to add a donate button in google play please tell me). The codes I read have many functions that I don’t know how they are linked to google play product, I saw a lot of print functions in different transaction states. Without any tutorials, I’m totally confused. Could anyone help me about this?