You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+8-1
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ This quick start guide makes the following assumptions:
5
5
- You are familiar with using AWS Lambda & AWS API Gateway, and have an [active AWS account](https://aws.amazon.com/).
6
6
- You have a Square account enabled for payment processing. If you have not enabled payment processing on your account (or you are not sure), visit [squareup.com/activate](squareup.com/activate).
7
7
- You are familiar with basic NodeJS development.
8
+
- You have NodeJS installed on your local system.
8
9
9
10
## Before you start
10
11
Clone this repo (if you have not already): [https://github.com/mootrichard/serverless-backend-quick-start](https://github.com/mootrichard/serverless-backend-quick-start)
@@ -20,4 +21,10 @@ If you haven't already created a function in AWS, you'll want to navigate to the
20
21
21
22
You'll find a create function button in the top right that will allow you to create a new Lambda function. You'll be prompted through a wizard for configuring your function. The only required configuration for this quick start is using `Node.js 8.10`. You must also select an appropriate IAM profile to associate with your function.
22
23
23
-
After completing the wizard, you'll have another editor that you can edit the function in. You'll want to select the drop-down titled "Code entry type" and select "Upload a .zip file". Click the "Upload" button that appears and upload the `chargeForCookies.zip` file. Click "Save" found at the top-right. You should now see your function in the AWS editor as it appears in your local editor.
24
+
After completing the wizard, you'll have another editor that you can edit the function in. You'll want to select the drop-down titled "Code entry type" and select "Upload a .zip file". Click the "Upload" button that appears and upload the `chargeForCookies.zip` file. Click "Save" found at the top-right. You should now see your function in the AWS editor as it appears in your local editor.
25
+
26
+
The final step here is to add 2 environment variables. One if for `ACCESS_TOKEN` which you add your OAuth `access_token` or your personal `access_token`. The other environment variable to add is `LOC_ID` which should be the location ID for which you're processing payments.
27
+
28
+
## Step 4: Add AWS API Gateway as trigger
29
+
30
+
Next, you'll want to click on AWS API Gateway under "Add triggers". This will allow you to create an HTTP endpoint to POST your `nonce` to in order to process payments.
0 commit comments