I get an 'invalid url' error message when being redirected from WHMCS to PayFast.

Why do I get an 'invalid url' error message when being redirected from WHMCS to PayFast?

This is due to one of two reasons: you are testing from a non internet accessible machine (eg. a local development machine) or you have not setup your URLs in WHMCS correctly.

Non internet accessible machine

The module will only perform as expected if you are testing from an internet accessible machine (eg. http://www.mydomain.co.za). It will not work from something like http://localhost or http://my.machine.local.

Ensure that you are testing on an internet accessible machine.

URLs not setup correctly

Many components in the system, including our module, make use of the System URL to generate URLs required.

Navigate to the General tab in the WHMCS admin console and ensure that you have set up all your URLs correctly.

    • Related Articles

    • What causes an invalid URL error?

      The PayFast system will pick up on ‘local’ or ‘localhost’ in the return, cancel and notify URLs and throw the invalid URL error. This is because it is not possible to test the ITN locally due to no server to server communication. The site needs to be ...
    • Why do I get an 'invalid url' error message when being redirected from Magento to PayFast?

      This is due to testing from a non internet accessible machine (e.g. a local development machine). Non internet accessible machine The module will only perform as expected if you are testing from an internet accessible machine ...
    • On VirtueMart, I get the error message "Direct Access to this location is not allowed".

      You’ll get this error message when there is a mismatch between your version of VirtueMart and version of the PayFast VirtueMart module you have installed. There are three versions of VirtueMart currently in circulation: 2.0.0, 1.1.*, and 1.0.*. They ...
    • Why am I getting a signature mismatch error on WHMCS?

      If you are using a WordPress installation along with a WHMCS bridge plugin, the cause is that the WordPress plugin modifies the output of the values sent through to PayFast. In order to fix this, you need to comment out the signature generation part ...
    • Why am I getting a 'currency format invalid' error?

      PayFast only processes transactions in ZAR and does not provide a currency conversion service. This means the base currency of your store and product prices will need to be set to ZAR for us to be able to process the transaction. However, you may ...