In order to use PayFast with osCommerce, you will need to install the PayFast payment module for osCommerce which is provided by PayFast.
To install the PayFast Website Payments payment module, please follow the instructions below:
If you are concerned that copying the entire folder from the downloaded module may overwrite files in your installation, rather copy the files from the extracted module individually into your installation.
Be sure to copy the files from the downloaded module to their corresponding locations within your installation:
The list of files needed in your online installation is as follows:
catalog/ext/modules/payment/payfast/payfast.php catalog/includes/languages/english/modules/payment/payfast.php catalog/includes/modules/payment/payfast.php
In order to make the module “Live”, follow the instructions below:
The module is now ready to receive live payments.
UPDATE `orders_status` SET `orders_status_name` = 'Preparing [PayFast]' WHERE `orders_status_name` = 'Awaiting Payment [PayFast]';
Follow the Standard Upgrade Procedure above.
Follow the Standard Upgrade Procedure above.
The osCommerce module currently uses PDT and not ITN.
Notwithstanding this though, when using the one of our payment modules, the ITN url is set automatically and you do not need to set it on your account manually.
This is the root of your osCommerce installation. Where this is, depends on what system you are using and where you are hosting.
The easiest way to find this though would be to look for the osCommerce directory structure.
The base (or root) osCommerce folder will look similar to the image shown below.
Simply find the folder in your installation which looks similar to this structure and that will be your “base osCommerce folder”.
The problem is that the PHP installation on your server does not have OpenSSL support enabled. This is required in order for your server to communicate securely with PayFast to receive payment information.
You can check this by creating a file called “phpinfo.php” in the root of your website with the following content:
<?php echo phpinfo(); ?>
Once you have done this, browse to the file in your browser. This will output information about your server's PHP installation to the screen. There should be a section entitled “OpenSSL” with a value showing “OpenSSL support = enabled” (Similar to the image below). If you are experiencing this problem, this section will either not be there, or will be set to disabled.
To correct this problem, your hosting provider will need to enable OpenSSL support within PHP.
| Note: | This has nothing to do with an SSL certificate and you don't need an SSL Certificate! If you're hosting provider advises you that you do, they are incorrect and we advise that you ask to speak to someone technical regarding this and potentially direct them to this help resource as well. Failing this, we advise that you move to a different hosting provider. Please see our Solution Providers page in this regard. |
|---|
To enable OpenSSL for PHP, please ask your hosting provider to consult PHP resources on how to achieve this or direct them to the following websites:
PayFast works on browser redirection and will redirect the user to PayFast for payment after they click the “Continue” button on the Order Confirmation page.
Before the browser is redirected to PayFast, an order is created in osCommerce with the status “Preparing [PayFast]”. This is to ensure that you have a reference for payments in osCommerce in case anything goes wrong.
If the order is cancelled during processing on PayFast:
If the order is successful during processing on PayFast: