alexa-labs / workshop-in-skill-purchasing

A sample skill which demonstrates the use of in-skill purchasing (ISP) of consumables within an Alexa skill. Examples of the other types of in-skill purchases can be found in other samples.
Other
8 stars 15 forks source link

unable to buy hints (after completing lab2) #7

Open singha53-zz opened 5 years ago

singha53-zz commented 5 years ago

Hi I have completed labs 1 and 2, but I keep getting an internal service error when I try to buy hints: https://github.com/singha53/alexa-isp/blob/master/pics/errorMsg.png

Can you please help me debug this issue? Not sure what the problem is. Thank you! A

franklin-lobb commented 5 years ago

This could be a tough one to debug. I presume you have looked in your CloudWatch logs and saw nothing relevant. (I wouldn't think you would, but let's rule out the simple things, yeah?)

First thing I would try is to test on an actual device. (Again, shouldn't be an issue, but since the error message isn't giving us anything to work with, and it's an easy check...)

Next I would check your account configuration. Since ISP's only work in specific locales, and for accounts which meet specific criteria. Navigate to https://www.amazon.com/hz/mycd/myx?ie=UTF8&ref_=nav_youraccount_myk#/home/settings/payment while logged in to the account you're using for testing. Click on the Country/Region Settings section and check the setting. I don't recall the full list of valid settings, but it could be a clue if it's not one of the locales with ISP's (e.g. US, GB, DE, JP).

singha53-zz commented 5 years ago

Thanks for your quick reply! Nothing on cloudwatch, but you can see that the locale is en-US: https://github.com/singha53/alexa-isp/blob/master/pics/buyHintIntent.png

I changed my Country/Region to the US on my account but that didn't work either. (maybe it takes sometime to take effect?) Out of ideas at the moment 🤔

franklin-lobb commented 5 years ago

Unfortunately, the Country/Region is not the only dimensions that has to align. That will match things up with the en-US locale. This page from our Tech Docs describes how distribution countries work.

For the en-US locale, your location (a.k.a. country of residence or billing address) also needs to be in the USA. The locations relevant to a given locale can be seen in the Pricing & Availability section when you create an In-Skill Product.

I'm not certain getting those things aligned will fix your problem, but it's worth a shot.

singha53-zz commented 5 years ago

I found this video from Dabble Lab that says to basically modify the purchasable and purchaseResult conditional to account for undefined cases (for alexa skill makers outside of the US) but to remove it during production: (watch from 14:15) https://www.youtube.com/watch?v=l-otNJNgW8c

However, today I repeated the alexa isp tutorial from scratch and its working now (I didn't change anything from before with respect to account settings)! https://github.com/singha53/alexa-isp/blob/master/pics/isp_working.png

This is a mystery to me lol. Thanks for your help!