Sylius: Test and go live
Test payment methods
Test your payment methods by simulating various payment statuses.
Note
- Use Mollie test credentials to test credit/debit cards.
- Apple Pay Direct works only in a production environment (in either test or live mode),
and on Apple devices or Safari.
Switch to test mode
In test mode, Mollie simulates payments: no real money transfers occur.
- Log in to Sylius.
- Go to Configuration > Payment methods.
- Select Edit in the Actions column of the Mollie gateway.
- In the Gateway configuration section, select Test from the relevant drop-down menu.
- Save the changes.
Make a test payment
- Make a test purchase in your Sylius shop.
- On the checkout page, select the payment method and submit the order.
- In the dialogue box, select a payment status and click Continue.
This takes you to a page that provides information about the payment's status. For example, if you selected Paid, the page confirms a successful payment.
Get status updates in test environments
To get status updates in test environments, do the following:
- Ensure that the following URL is publicly available:
https://{{your-domain}}/Mollie/notify
- White-list Mollie's IP address range.
Get status updates in local test environments
Mollie webhooks only work with public URLs. This means that when you're developing locally (for example, https://localhost:8000
), you must create a temporary, public URL to tunnel Mollie HTTP traffic to your local host.
Note
In principle, your local environment remains public for as long as the tunnel exists. However, tunneling apps usually provide options to restrict access.
- Download and install a tunneling app. We recommend using ngrok↗.
- Start NGROK:
./ngrok http --host-header=rewrite localhost:443
- NGROK returns a public URL that you can forward webhooks to.
Go live
Go live to switch from test payments to actual payments.
Note
You can only accept actual payments after Mollie has approved your website profile.
What you need to do in advance
- Ensure that you've completed the Mollie signup process.
- Set up the plugin according to your preferences.
- Test your payment methods to ensure they work properly.
Switch to live mode
- Log in to Sylius.
- Go to Configuration > Payment methods.
- Select Edit in the Actions column of the Mollie gateway.
- In the Gateway configuration section, select Live from the relevant drop-down menu.
- Save the changes.
Updated 6 months ago