From f68b8e22867bf7024534a1f1b98d1fe6f1676821 Mon Sep 17 00:00:00 2001 From: Julien Lengrand-Lambert Date: Thu, 24 Mar 2022 16:01:08 +0100 Subject: [PATCH] Creates gitpod file --- .gitpod.yml | 20 ++++++++++++++++++++ README.md | 10 +++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..49bff98 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,20 @@ +tasks: +- init: ./gradlew build + 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 + ./gradlew run + fi + +# exposed ports +ports: +- port: 8080 + onOpen: open-preview + +vscode: + extensions: + - redhat.java + - vscjava.vscode-java-debug + - vscjava.vscode-java-test + - pivotal.vscode-spring-boot diff --git a/README.md b/README.md index 0250823..a97a7eb 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,14 @@ This repository includes examples of PCI-compliant UI integrations for online pa * PayPal * Sofort +## 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/adyen-java-spring-online-payments) ## Requirements @@ -52,7 +60,7 @@ The Gradle build will install the following jars from maven central 2. Run `./gradlew run` 3. Visit [http://localhost:8080](http://localhost:8080) and select an integration type! -_NOTE: The application will also automatically pick up on the ADYEN_MERCHANT_ACCOUNT, ADYEN_API_KEY and ADYEN_CLIENT_KEY environment variables in case you do not want to create a config.properties file._ +_NOTE: The application will also automatically pick up on the ADYEN_MERCHANT_ACCOUNT, ADYEN_API_KEY and ADYEN_CLIENT_KEY environment variables in case you do not want to create a config.properties file._ ## Contributing