IAP Badger Question

Hello,

I have added the plugin to my app and am using the basic code example for making a purchase. That code is below. But my question is where do you setup the app info so it knows what app in iTunes and Google Play top use? Should be app id be setup in the build file? Or what do I do?

When I click to make a purchase through the simulator it prompts me with Purchase initiated for item: 5K_Points. What response would you like to give?

I understand that is for testing local but when on the device it needs to talk with the app info on itunes connect.

Thanks!

Warren

FYI you didn’t include any code in your post.

Sorry, here it is.

--Create the catalogue local catalogue = { --Information about the product on the app stores products = { --removeAds is the product identifier. --Always use this identifier to talk to IAP Badger about the purchase. A5KPoints = { --A list of product names or identifiers specific to apple's App Store or Google Play. productNames = { apple="5k\_Points", google="5K\_Points", amazon="5K\_Points"}, --The product type productType = "non-consumable", --This function is called when a purchase is complete. onPurchase=function() iap.setInventoryValue("unlock", true) end, } }, --Information about how to handle the inventory item inventoryItems = { unlock = { productType="non-consumable" } } } --This table contains all of the options we need to specify in this example program. local iapOptions = { --The catalogue generated above catalogue=catalogue, --The filename in which to save the inventory filename="inventory.txt", } --Initialise IAP badger iap.init(iapOptions) --------------------------------- -- -- Making purchases -- --------------------------------- --Called when the relevant app store has completed the purchase --At this point, "unlock" has already been added to the user inventory. local function purchaseListener(product ) --Tell the user their purchase was successful native.showAlert("Purchase complete", "Your unlock purchase was successful.") end --Tell IAP badger to initiate a purchase iap.purchase("A5KPoints", purchaseListener)

Nevermind, I found the config settings at the bottom of an example page. Can’t believe I missed them!

For the publisher ID is that mine or the one shown for who made this plugin? Here is the page I am looking at. It gives info for Android but not what to set for iOS. Can anyone tell me what to set for my iOS builds?

http://happymongoosegames.co.uk/iapbadger.php

settings = { plugins = { -- includes IAP Badger as a plug in ["plugin.iap\_badger"] = { -- required publisherId = "uk.co.happymongoose", }, }, }

Don’t change the publisherId, you will get an error. iOS store api is build right in so requires no setup on iOS.