Skip to content

Commit

Permalink
Merge pull request alexa-samples#2 from alexa/readme-troubleshooting-…
Browse files Browse the repository at this point in the history
…updates

Readme troubleshooting updates
  • Loading branch information
xengravity authored Apr 30, 2019
2 parents 430bbff + 0d837a1 commit df7cb36
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 49 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
/lambda/custom/node_modules
/lambda/custom/node_modules
.ask/config
40 changes: 19 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Build An Alexa Skill with Amazon Pay - Demo Store
Do you currently sell goods or services on other channels but want to expand to Alexa to reach new and existing customers? Good news, with [Amazon Pay](https://developer.amazon.com/alexa-skills-kit/make-money/amazon-pay), you can offer a seamless voice purchasing experience to your customers, allowing them to purchase real-world goods and services with Alexa - without having to leave the voice experience.
# Build an Alexa Skill with Amazon Pay - Demo Store
Do you currently sell real world goods or services on other channels but want to expand to Alexa to reach new and existing customers? Good news, with [Amazon Pay](https://developer.amazon.com/alexa-skills-kit/make-money/amazon-pay), you can offer a seamless voice purchasing experience to your customers, allowing them to purchase real-world goods and services via Alexa - without having to leave the voice experience.

This custom skill is a demo store that showcases how to use Amazon Pay with your shopping experiences with Alexa.
This custom skill is a demo store that showcases how to use Amazon Pay for your shopping experiences with Alexa.

## What You Will Need
Before you start working on this skill, you will need to create the following accounts:
Expand All @@ -11,34 +11,32 @@ Before you start working on this skill, you will need to create the following ac
* [Amazon Pay Sandbox Test Account](https://www.youtube.com/watch?v=m5teEFRZB8A)

## Setting Up the Demo
This repository contains the interaction model and skill code. It is structured to make it easy to deploy if you have the [ASK CLI](https://developer.amazon.com/docs/smapi/quick-start-alexa-skills-kit-command-line-interface.html) already setup. If you would like to use the Alexa Developer Console, you can follow the steps outlined in the [Hello World](https://github.com/alexa/skill-sample-nodejs-hello-world) example, substituting the [Model](./models/en-US.json) and the [skill code](./lambda/custom/index.js) when called for. In addition, you will need to configure the additional supporting javascript files found in the custom folder.
This repository contains the interaction model and skill code. It is structured to make it easy to deploy if you have the [ASK CLI](https://developer.amazon.com/docs/smapi/quick-start-alexa-skills-kit-command-line-interface.html) setup. If you would like to use the Alexa Developer Console, you can follow the steps outlined in the [Hello World](https://github.com/alexa/skill-sample-nodejs-hello-world) example, substituting the [Model](./models/en-US.json) and the [skill code](./lambda/custom/index.js) when called for. In addition, you will need to configure the additional supporting javascript files found in the custom folder.

1. Clone repository and navigate the demo's root folder ( lambda/custom ).
1. Open [config.js](./lambda/custom/config.js) and update values `bucketName`, `sellerId`, and `sandboxCustomerEmailId`
2. Open [config.js](./lambda/custom/config.js) and update values `bucketName`, `sellerId`, and `sandboxCustomerEmailId`
* the `bucketName` is the name of your [S3](https://aws.amazon.com/s3/) bucket.
* the `sellerId` is your Amazon Pay Seller Id. You can find that [here](https://youtu.be/oHp4Hv5_MBA?t=38)
* the `sandboxCustomerEmailId` is the email address of the Amazon Pay sandbox test account you created in Seller Central. Instructions [here](https://www.youtube.com/watch?v=m5teEFRZB8A).
1. Give your skill permission to use your Amazon Pay account. You can do that [here](https://sellercentral.amazon.com/external-payments/integration/alexa/). The documentation is [here](https://developer.amazon.com/docs/amazon-pay/integrate-skill-with-amazon-pay-v2.html).
1. Enable the skill using the Alexa app. Be sure to click Settings to show the permissions page if you do not see it. Provide permission to use Amazon Pay.
3. Give your skill permission to use your Amazon Pay account. You can do that [here](https://sellercentral.amazon.com/external-payments/integration/alexa/). The documentation is [here](https://developer.amazon.com/docs/amazon-pay/integrate-skill-with-amazon-pay-v2.html).
4. Enable the skill using the Alexa app. Be sure to click Settings to show the permissions page if you do not see it. Provide permission to use Amazon Pay.

## Running the Demo
Launch the demo by saying, 'Alexa, open No Nicks'. If you receive an error, proceed to the [troubleshooting section](#troubleshooting).

## Troubleshooting

If you are encountering issues with your skill, double check that you have completed the following:

1. Confirm that your Seller Central account is in good standing by selecting the Production environment and verify there are no errors on your account.
1. Check the correct skill was linked in Sandbox using in Seller Central.
1. Verify your sandbox test user was created in Seller Central.
1. Verify Amazon Pay permissions are enabled for your skill under Build > Permissions > Amazon Pay.
1. Verify the config.js contains the appropriate values for `bucketName`, `sellerId`, and `sandboxCustomerEmailId`.
1. Verify the correct skill Id is used in your Lambda function.
1. Enable your skill in your Alexa App
1. Consent and give permissions to Amazon Pay in your Alexa App
1. Enable Voice Purchasing in your Alexa App ( with or without the voice code ).

All other errors and decline handling can be found here: https://developer.amazon.com/docs/amazon-pay/payment-declines-and-processing-errors.html
If you encounter issues with your skill, check the following:

1. Your Amazon Pay account is in good standing. Navigate to [Seller Central](https://sellercentral.amazon.com) and select the Production environment to verify there are no errors with your Amazon Pay account.
2. The correct skill Id is linked in Seller Central for both the Sandbox and Production environments. In Seller Central, navigate to [Integration > Alexa](https://sellercentral.amazon.com/external-payments/integration/alexa/).
3. Your Amazon Pay sandbox test account is created in Seller Central. Instructions [here](https://www.youtube.com/watch?v=m5teEFRZB8A).
4. Amazon Pay permissions are enabled for your skill in the Alexa Developer Console. In the Alexa Developer Console, navigate to your skill then Build > Permissions > Amazon Pay.
5. [config.js](./lambda/custom/config.js) contains the correct values for `bucketName`, `sellerId`, and `sandboxCustomerEmailId`.
6. Your skill is enabled in your Alexa App.
7. Consent and permissions for Amazon Pay are enabled for your skill in your Alexa App.
8. Voice Purchasing is enabled in your Alexa App.

Processing errors and decline handling can be found here: https://developer.amazon.com/docs/amazon-pay/payment-declines-and-processing-errors.html

## Resources
* [Amazon Pay Alexa Documentation](https://developer.amazon.com/docs/amazon-pay/amazon-pay-overview.html)
Expand Down
27 changes: 0 additions & 27 deletions models/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,24 +303,6 @@
}
]
},
{
"id": "Elicit.Slot.871466476304.1051732784111",
"variations": [
{
"type": "PlainText",
"value": "Do you want a dog?"
}
]
},
{
"id": "Elicit.Slot.871466476304.473894939028",
"variations": [
{
"type": "PlainText",
"value": "Do you want a car?"
}
]
},
{
"id": "Elicit.Slot.81496166760.874607615560",
"variations": [
Expand All @@ -329,15 +311,6 @@
"value": "You can save ten percent today by signing up for refills. Every two months, you'll receive eight blades and a two ounce tube of shaving cream for eighteen dollars including tax and shipping. You can cancel or change delivery any time. Do you want to add this to your order?"
}
]
},
{
"id": "Elicit.Slot.350082470046.957699153803",
"variations": [
{
"type": "PlainText",
"value": "dis dat upgrade doe"
}
]
}
]
}
Expand Down

0 comments on commit df7cb36

Please sign in to comment.