From 6ae5ab34512277097558dfa0c8326b70e57815ee Mon Sep 17 00:00:00 2001 From: Julien Lengrand-Lambert Date: Fri, 4 Nov 2022 10:42:50 +0100 Subject: [PATCH] Adds basic support for Gitpod and doc --- .gitpod.yml | 17 +++++++++++++++++ README.md | 14 ++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..6809199 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,17 @@ +tasks: +- init: source ./setup.sh + command: | + if [ -z ${ADYEN_HMAC_KEY+x} ] || [[ -z ${ADYEN_API_KEY+x} ]] || [[ -z ${ADYEN_CLIENT_KEY+x} ]] || [[ -z ${ADYEN_MERCHANT_ACCOUNT+x} ]]; then + echo "Expected environment variables not found. Please set the ADYEN_HMAC_KEY, ADYEN_API_KEY, ADYEN_CLIENT_KEY, ADYEN_MERCHANT_ACCOUNT environment variables and rerun session https://gitpod.io/variables." + else + ./start.sh + fi +# exposed ports +ports: +- port: 8080 + onOpen: open-preview + visibility: public + +vscode: + extensions: + - ms-python.python \ No newline at end of file diff --git a/README.md b/README.md index 2378411..b5aa2b7 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,20 @@ An external tool which allows you to build a drop-in integration and make customizations as outlined in our style sheet. Enables you to experiment and see what your checkout could potentially look like. You can then retrive the final result alongside the changes so it can be exported for your team to fully implement your vision. + +## Run this integration in seconds using [Gitpod](https://gitpod.io/) + +* Open your [Adyen Test Account](https://ca-test.adyen.com/ca/ca/overview/default.shtml) and create a set of [API keys](https://docs.adyen.com/user-management/how-to-get-the-api-key). +* Go to [gitpod account variables](https://gitpod.io/variables). +* Set the `ADYEN_API_KEY`, `ADYEN_CLIENT_KEY`, `ADYEN_HMAC_KEY` and `ADYEN_MERCHANT_ACCOUNT variables`. +* Click the button below! + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/adyen-examples/checkoutCreate) + +_NOTE: To allow the Adyen Drop-In and Components to load, you have to add `https://*.gitpod.io` as allowed origin for your chosen set of [API Credentials](https://ca-test.adyen.com/ca/ca/config/api_credentials_new.shtml)_ + + + ## Requirements - Python 3.5 or greater