Skip to content

Instantly share code, notes, and snippets.

@javichur
Last active November 19, 2019 01:47
Show Gist options
  • Save javichur/42f0dfcb26addcb148da6641f57ff10a to your computer and use it in GitHub Desktop.
Save javichur/42f0dfcb26addcb148da6641f57ff10a to your computer and use it in GitHub Desktop.
const skillBuilder = Alexa.SkillBuilders.custom();
exports.handler = skillBuilder
.addRequestHandlers(
...
PurchaseHandlers.WhatCanIBuyIntentHandler, // purchase handlers
PurchaseHandlers.TellMeMoreAboutProductIntentHandler,
PurchaseHandlers.BuyIntentHandler,
PurchaseHandlers.BuyResponseHandler,
PurchaseHandlers.PurchaseHistoryIntentHandler,
PurchaseHandlers.RefundProductIntentHandler,
PurchaseHandlers.CancelProductResponseHandler,
...
)
.addRequestInterceptors(myLocalizationInterceptor, initPurchaseHandlers) // lang & purchase
.addErrorHandlers(GlobalHandlers.ErrorHandler)
.withApiClient(new Alexa.DefaultApiClient()) // API to get user permissions and in-skill purchases
.lambda();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment