jpStoreKit.activate ( sUserToken, sActivationKey ) local tProductsIdentifier = table.newInstance ( ) table.add ( tProductsIdentifier, "com.mycompany.myapp.product1" ) table.add ( tProductsIdentifier, "com.mycompany.myapp.product2" ) table.add ( tProductsIdentifier, "com.mycompany.myapp.product3" ) --Products Data. Must be the first thing you do. jpStoreKit.requestProductsData ( tProductsIdentifier ) "onStoreKitRequestFailed" ( sError ) "onStoreKitRequestDidEnd" ( ) "onStoreKitInvalidProductReceived" ( sProductIdentifier ) "onStoreKitProductReceived" ( sProductIdentifier ) sTitle = jpStoreKit.getProductLocalizedTitle ( sProductIdentifier ) nPrice = jpStoreKit.getProductPrice ( sProductIdentifier ) sLocalizedPrice = jpStoreKit.getProductLocalizedPrice ( sProductIdentifier ) tAvailableProducts = jpStoreKit.getAvailableProducts ( ) bYes = jpStoreKit.isProductDataAvailable ( sProductIdentifier ) bYes = jpStoreKit.canMakePayments ( ) --Transactions (you must request products data first) jpStoreKit.buyProduct ( sProductIdentifier ) "onStoreKitBuyProductFailed" ( sProductIdentifier, sError ) "onStoreKitProductPurchased" ( sProductIdentifier ) "onStoreKitProductRestored" ( sProductIdentifier ) "onStoreKitProductTransactionFailed" ( sProductIdentifier, kError ) jpStoreKit.restoreCompletedTransactions ( ) "onStoreKitProductRestored" ( sProductIdentifier ) "onStoreKitRestoreTransactionsFailed" ( sError ) "onStoreKitRestoreTransactionsFinished" ( ) --App Store jpStoreKit.openAppStoreApplication ( sItunesItemIdentifier ) jpStoreKit.openAppStoreInApp ( sItunesItemIdentifier ) "onStoreKitOpenAppStoreInAppFailed" ( ) "onStoreKitOpenAppStoreInAppSucceed" ( ) "onStoreKitAppStoreInAppClosed" ( ) --Constants jpStoreKit.kErrorClientInvalid jpStoreKit.kErrorPaymentCancelled jpStoreKit.kErrorPaymentInvalid jpStoreKit.kErrorPaymentNotAllowed jpStoreKit.kErrorStoreProductNotAvailable jpStoreKit.kErrorUnknown
jpStoreKit communicates with the App Store on behalf of your application. Your application uses jpStoreKit to receive localized information from the App Store about products you want to offer in your application. Your application displays this information to users and allows them to purchase items. When a user wants to purchase an item, your app calls jpStoreKit to collect payment from the user.
jpStoreKit also let you display an in-app AppStore, where you can choose to display your other games or any iTunes item.