Adyen Magento 2 Plugin integration demo
In this demo, you can spin up a Magento instance and install the Adyen Payment plugin to see how it works. You can try this demo online in one click using Gitpod (a remote IDE) or locally on your computer using Docker.
Demo Video
Running online with Gitpod
- Open your Adyen Test Account and create a set of API keys.
- Go to gitpod account variables
- Set the
ADYEN_API_KEY
,ADYEN_CLIENT_KEY
andADYEN_MERCHANT_ACCOUNT
variables (Scope:adyen-examples/*
). - Set
ADMIN_USERNAME
andADMIN_PASSWORD
in the Gitpod account variables as well. These will be used as your login credentials in the Magento admin dashboard. (Scope:adyen-examples/*
).
Note
ADMIN_PASSWORD
must contain alphanumeric characters (Magento requirement).
- Click the button below and wait ~260s (4 minutes) (for the Magento installation). You should have
magento2-container | Starting periodic command scheduler: cron.
before proceeding to next step.
- Open a new Terminal in the current directory and run
./install.sh
to install and configure the Adyen payment plugin. - Visit your shop on the generated preview URL
- Visit
previewURL/admin/
and login to see that the Magento Plugin is installed correctly. Login using theADMIN_USERNAME
andADMIN_PASSWORD
you created in step 2 above. - You can see the GitPod account variables which are automatically set in Step 2 above, visit
Stores
→Configuration
→Sales (submenu)
→Payment Methods
→Other Payment Methods
→Adyen Payments
→Required Settings
.
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.
If you don't want to run this demo online, then follow these steps.
- Docker
- Clone this repo:
git clone https://github.com/adyen-examples/adyen-magento-plugin-demo.git
- Navigate to the root directory, set
APP_URL
and port. You can use your preferred port:
export APP_URL=127.0.0.1:8080
- Run docker compose to spin up the Magento Docker image. This may take a few minutes depending on your internet and system speed.
docker-compose up
- Open a new terminal tab in the current directory and install the Adyen Magento plugin:
./install.sh
- Visit shop page http://localhost:8080
- Login to the admin dashboard (http://localhost:8080/admin/) to configure your API keys.
Remember to include
http://localhost:8080
in the list of Allowed Origins on the Customer Area.
To try out integrations with test card numbers and payment method details, see Test card numbers.
We commit all our new features directly into our GitHub repository. Feel free to request or suggest new features or code changes yourself as well!
Find out more in our Contributing guidelines.
MIT license. For more information, see the LICENSE file in the root directory.