Note
-
Make a test purchase in your Magento 2 store.
While making payment, a selection dialogue appears, enabling you to test various payment statuses.
-
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.
-
Download and install a tunneling app. We recommend using ngrok↗.
-
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
-
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
-
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