-
Notifications
You must be signed in to change notification settings - Fork 53
Onboarding Playground
Hi,
This page is all about getting started with a locally running Shopware instance and playing around with Mollie. This is a perfect thing if you don't have a Shopware 6 yet, or if you just want to test a few things locally.
Please keep in mind, while it's usually up to you how to run Shopware 6, we use the Docker images from dockware.io in this article. These help you to easily run any Shopware 6 version locally using Docker.
- 1. Mollie Account
- 2. Install Docker (only first time)
- 3. Prepare local Domain (only first time)
- 4. Start Shopware
- 5. Configure API Keys
- 6. Configure Payment Methods
- 7. Start Testing
- 8. Advanced
First you need your own Mollie Account.
Go to Mollie to create your account.
This should not take a lot of time and you should already be able to test the plugin, while your account is being verified.
We start by downloading and installing Docker on your system. This allows you to easily start local web servers (Containers) based on Docker templates (Images).
Such a container will then serve our local Shopware, based on the dockware.io Docker images.
Download and Install Docker: https://www.docker.com/products/docker-desktop
Please also make sure that it's started
Mollie doesn't allow that payments are made from "http://localhost". So instead of localhost we need to use a different domain. This only needs to be done once!
Let's just create an entry, so that our computer thinks, http://testing.mollie.shop is existing on our local system. Or in other words, whenever you open that web URL, it will just open your local computer and see if a web application is found.
Open your terminal and just enter this command. It will open your file explorer with the directory /etc.
open /etc
There is a file called hosts. Just copy/paste it onto your Desktop. Then open the file with any text editor.
Now add this line to the bottom and save the file
127.0.0.1 testing.mollie.shop
Copy and replace the file from the Desktop to the original directory.
That's it. From now on you can use http://testing.mollie.shop, which just looks for a web application on your local system.
Now that Docker is started, and our domain is recognized, we can finally start Shopware.
Please open your Terminal and enter the following commands. Also keep in mind, you can use any Shopware version after the ":". The available dockware images can be found at: https://dockware.io/images
The first time, the image is downloaded, which might take a bit, but then its usually started in 5 seconds.
docker run --rm --name shopware -p 80:80 -p 443:443 -p 3306:3306 -d dockware/dev:6.4.16.1
With this command, you should see if the container is running.
docker ps
Now let's just switch our Shopware Sales Channel domain to our new one. You could also do this in the Admin at http://localhost, but this works faster :)
docker exec shopware bash -c 'php bin/console sales-channel:update:domain testing.mollie.shop'
That's it, you can now open your shop at http://testing.mollie.shop.
If you want to remove your Docker container again (maybe before starting a new one), just run this:
docker rm -f shopware
Now just download any plugin version that you want to test. We would recommend using the downloads of the ZIP files from Github.
Github URL: Stable Releases
Upload the plugin in the Administration as described and install + activate it.
It's time to configure your plugin to make it work in your shop.
The plugin will create new payment methods that can be used like any other payment methods.
Please keep in mind, that you can only use Mollie payment methods in Shopware, that are unlocked and enabled in your Mollie Dashboard too!
Now configure your LIVE or TEST API keys in the plugin configuration along with a correct "test mode" or "live mode" that you need in this shop.
In Shopware 6, you have to activate payment methods in the general settings, and also assign them to your Sales Channels. Once you do this, you should be able to see your Mollie Payment methods in your shop.
Mollie provides a simple Sandbox mode to start testing. Open the plugin configuration and enable the "Test Mode" for your Sales Channel.
If you now start a payment in your shop, you should already see the sandbox page, where you can easily decide what should happen in your test scenario.
Mollie notifies your shop about payment status updates. This means Mollie needs to be able to communicate with your Shopware 6 shop.
While not all processes need webhooks, some do need them (Shipping orders and more.).
If you want to use webhooks locally, please read this: Using Webhooks locally
With dockware you can just use any MySQL client and connect using the 3306 port. Credentials can be found at: https://docs.dockware.io/use-dockware/default-credentials
In addition to this, you can also just open /adminer.php web page to access the database.
See more here: https://docs.dockware.io/features/adminer
German Support: [email protected] | International Support: [email protected]
- Apple Pay
- Apple Pay Direct
- Bancontact
- Belfius
- Billie
- Credit Card
- EPS
- Giftcard
- Giropay
- iDEAL
- in3
- KBC / CBC
- Klarna Pay Later
- Klarna Pay Now
- Klarna Slice It
- PayPal
- Paysafecard
- POS Terminals
- Przelewy24
- SEPA Bank Transfer
- SOFORT
- TWINT
- Voucher