Magento 2: Test payment methods

Warning

  • To test credit/debit cards, you need to use to use the test credentials provided by Mollie.

  • Apple Pay Direct only works in a production environment and on Apple devices or the Safari browser. You can still test it with the module in test mode.

  • Apple Pay Direct only works in live mode. This means you must test it using a real transaction.

Make a test payment

  1. Log in to Magento 2.

  2. Go to Stores > Configuration.

  3. On the Configuration page, scroll to Mollie, select the arrow, and then General.

  4. In the Modus drop-down list under API details, select Test .

  5. Select Save config.

  6. Make a test purchase in your Magento 2 store.

    While making payment, a selection dialogue appears, enabling you to test various payment statuses.

    screenshot-test-payment-page.png
  7. 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 local test environments

  1. Download and install a tunneling app. We recommend using ngrok↗.

  2. Start an HTTP tunnel:

    ngrok http 80 -region eu

    The output is similar to the following, and contains the URL of your public domain:

    Forwarding http://9229455c6109.eu.ngrok.io -> http://localhost:80
  3. Change the base URL manually in the backend of your Magento 2 installation.

    Alternatively, use n98-magerun↗ to change the URL:

    export SHOPHOST="acme-store.eu.ngrok.io"
    n98-magerun2 config:store:set web/unsecure/base_url http://$SHOPHOST/
    n98-magerun2 config:store:set web/secure/base_url https://$SHOPHOST/
    n98-magerun2 config:store:set web/unsecure/base_link_url https://$SHOPHOST/
    n98-magerun2 config:store:set web/secure/base_link_url https://$SHOPHOST/
    n98-magerun2 cache:flush
  4. Depending on your installation, you may need to add the ngrok URL as a virtual host or alias to your Apache or NGINX server.

    If you run Laravel Valet or Laravel Valet +, run the following:

    valet link acme-store.eu.ngrok.io