Installation & Update Instructions for OpenCart 2.x
Before you begin We recommend you do a full backup of your OpenCart files and database, just in case.
Preliminary Information
All OpenCart releases
After installation/update the following new database tables will be introduced:
- mastercard_pgs_transaction: This holds all transactions created by the extension.
- mastercard_pgs_token: This holds the relationships between your registered customers and their credit card tokens.
OpenCart 2.3.0.0 - 2.3.0.2
The release for OpenCart 2.3.0.0 - 2.3.0.2 does not rely on any modifications (neither OpenCart Modifications, nor vQmod).
After installation/update the extension will hook to events in your OpenCart system:
- catalog/controller/checkout/checkout/before → extension/payment/mastercard_pgs/init: This is necessary for Mastercard Payment Gateway Services to work on your checkout page. If you disable it, the extension will stop working.
- admin/model/sale/order/getOrderHistories/after → extension/payment/mastercard_pgs/order_history_link: This will make the order history comment text as links to the generated transactions. Disabling this will not impact the general functionality of the extension.
- admin/model/customer/customer/deleteCustomer/before → extension/payment/mastercard_pgs/delete_tokens: After you delete a customer from your system, this will also delete the associated payment tokens. We recommend you keep this enabled to make sure the tokens database table is kept nice and tidy.
OpenCart 2.0.0.0 - 2.2.0.0
The release for OpenCart 2.0.0.0 - 2.2.0.0 relies on a modification.
The modification will be applied for the following OpenCart files:
- catalog/controller/checkout/checkout.php: Necessary for Mastercard Payment Gateway Services to work on your checkout page.
- admin/controller/sale/order.php: This will make the order history comment text items as links to the transactions.
- admin/model/{sale,customer}/customer.php: After you delete a customer, this will also delete the associated payment tokens.
Install using the OpenCart Extension Installer
- Unzip the downloaded Mastercard Payment Gateway Services .ZIP file into a new directory
- In your OpenCart admin panel go to Extensions > Extension Installer
- Upload the file mastercard_pgs.ocmod.zip which is in the directory you created in step 1.
If you receive an error "Could not connect as..." this means you have not configured FTP credentials for your Extension Installer. You can resolve this in two ways:
Approach 1: Configure FTP from System > Settings > FTP
Approach 2: Install the iSenseLabs QuickFix When you are done, try uploading mastercard_pgs.ocmod.zip once again. - Go to Extensions > Payments > Mastercard Payment Gateway Services and click the Install button
- (for OpenCart 2.0.0.0 - 2.2.0.0) Go to Extensions > Modifications and click the Refresh button on the top right
Congratulations! Mastercard Payment Gateway Services is now installed.
Manual Installation
- Unzip the downloaded Mastercard Payment Gateway Services .ZIP file into a new directory
- Navigate to this directory and find the file mastercard_pgs.ocmod.zip
- Extract mastercard_pgs.ocmod.zip into a new directory
- Navigate to the newly extracted directory. You will notice it contains a directory called upload/
- (Optional) If necessary, rename the admin/ and admin/language/english directories to match your OpenCart setup
- Upload the contents of the upload/ directory to your OpenCart installation, making sure to preserve the directory structure
- Go to Extensions > Payments > Mastercard Payment Gateway Services and click the Install button
- (for OpenCart 2.0.0.0 - 2.2.0.0) Go to Extensions > Modifications and click the Refresh button on the top right
Congratulations! Mastercard Payment Gateway Services is now installed.
Update Instructions
Before you begin We recommend you do a full backup of your OpenCart files and database, just in case.
OpenCart 2.0.0.0 - 2.2.0.0
- Delete the modification Mastercard Payment Gateway Services from Extensions > Modifications
- Follow one of the installation methods above
- Go to Extensions > Payments > Mastercard Payment Gateway Services > Edit and configure your settings
- Click Save on the top right
OpenCart 2.3.0.0+
- Follow one of the installation methods above
- Go to Extensions > Payments > Mastercard Payment Gateway Services > Edit and configure your settings
- Click Save on the top right
- Go to Extensions > Payments > Mastercard Payment Gateway Services > Edit
- Click Re-hook Events on the top right
That's it! Mastercard Payment Gateway Services is now updated.