Alexa ISP関連コード:getMonetizationServiceClient()

課金に関わるインテント内に記載されるもの。

const locale =
handlerInput.requestEnvelope.request.locale;
const ms =
handlerInput.serviceClientFactory.getMonetizationServiceClient();

const WhatCanIBuyHandler
return ms.getInSkillProducts(locale).then(function fetchPurchasableProducts(result)

const ProductDetailHandler
return ms.getInSkillProducts(locale).then(function fetchProductDetails(result)

const BuyHandler
return ms.getInSkillProducts(locale).then(function initiatePurchase(result)

const BuyResponseHandle
return ms.getInSkillProducts(locale).then(function handlePurchaseResponse(result)

const CancelSubscriptionHandler
return ms.getInSkillProducts(locale).then(function initiateCancel(result)

const CancelResponseHandler
return ms.getInSkillProducts(locale).then(function handleCancelResponse(result)

コメントを残す