How To Setup DPO | PayGate PayWeb for Magento 2
Here we show you how to install and configure Magento 2 using the PayGate PayWeb plugin. This video will take you through every step, from start to finish. It will also take you through the basics of setting up the plugin to work with your PayGate ID.
Welcome to the PayGate PayWeb Magento 2 plugin instruction video. You’re going to want to head over to GitHub and jump on to the releases tab, or if you have a direct link that’s also great. You’re going to then want to download ‘Magento_2.2.3_PayGate_PW3_Plugin_2.2.5.zip’, which is the latest version of the plugin at the time of this recording. You may have a more recent version and that’s also great.
After downloading this file you’re going to want to save it to a convenient location, I’ve saved it to the desktop. I’m going to extract it inside this folder – you’re going to see your instruction PDF and you’re going to see a folder with a bunch of other files inside there. Let’s go through the installation instructions.
How To Setup DPO | PayGate PayWeb for Magento 2
We’re going to skip step one because you’ve already extracted the zip and we’ve got this folder on the desktop. If you are unable to extract zips on your operating system, you can download an unzipping applications, there are many available on the internet, just jump onto Google in your browser and start searching for unzipping application. See what you can find.
We’re going to upload the PayGate folder, let’s navigate over here into your Magento directory. In this case, “Upload the PayGate folder into your Magento directory e.g. magentorootfolder/app/code/ N.B.: If code folder does not exist please create it”. We’re going to jump onto FileZilla; can also use SFTP or directly if you have access to the server.
Please do be careful if you are uploading the files and you are not using an FTP client. You can sometimes upload them with the wrong user and you can have permission errors. Magento 2 is a very sensitive application, so please be careful when uploading the files. We recommend using FileZilla, but you can also use other FTP applications.
I’m going to open up the app code directory and I’m going to upload a folder. I’ll just be careful here as there are two ‘Paygate’ folders. The way Magento 2 works, you have to upload both, so don’t jump into the secondary folder. Go into your root directory where you have your PDF and your ‘Paygate’ folder. Upload that, once complete, you can close your FTP application.
You’re now going to open up your terminal. You’ll need some version of the terminal, whether that’s directly on the server or it is via SSH. If you don’t understand SSH or the server, we highly recommend you get to a developer involved. Magento 2 is quite a beast and it does require some technical knowledge.
You may already be familiar with these steps and if so, please bear with us as we run through them. Jump into your document root, as you can see there are a number of commands here, “Run below commands to install the PayGate plugin where <Magento file system owner> is the primary web server user. Ask your web hosting provider if you are unsure”. There are a few other ways you can do this, if you are within the Linux terminal, you can write ‘ls -la’, and you can get your user and your group. So the user in what I’m selecting on this particular server.
So I would be saying ‘sudo -u’ (meaning superuser do) and then the user selected would be the user which I picked up earlier. I will then copy the rest of this command, which is ‘php bin/magento module:enable Paygate_Paygate’.
Now basically what I’m doing here is running these Magento commands from the Magento root. This is quite a technical process, so if this is confusing, please do refer back to your developer – it’s much safer to rather let them do this technical step.
Magento 2 ‘command’ steps
In this case, I have already run the command, it says ‘No modules were changed’, but if the module was changed. it will give you a listing. Once the command is done, you can do the second command. To save some time, I’m going to just copy the first part of the command and then I’m going to do the next thing which is ‘php bin/magento setup:upgrade’.
You’re going to let it finish doing what it needs to do, there you go, it’s upgraded. Now we’re going to run the next step ‘php bin/magento setup:di:compile’. This is very important as it’s now compiling the modules and all the code. If you don’t do the ‘sudo -u’ and then the filesystem owner, you’re going to have permission errors. So this is quite important.
I differed slightly from the PDF here, you can do it either order. I like to say ‘php bin/magento cache:clean’ first, then I like to do ‘php bin/magento indexer:reindex’ and then finally I do ‘php bin/magento setup:static-content:deploy’.
If your website has been set up as a dev system, the static content deploy will give you an error message. So I’m gonna just demonstrate what that looks like. So this is the dev ‘manual static content deployment is not required’ message. If you are on a developer environment and you don’t spend ages waiting for your checkout to load, you can write the ‘-f’ flag at the end. That’s going to force it. I found the step is well worth doing if you are on a dev site because it does save some time when testing.
You’re nearly done.
Navigate to Stores
We can exit this terminal and login to our Magento backend. We’re going to “navigate to Stores > Configuration > Sales > Payment Methods and click on Paygate. When done with configuring the module, click on the Save Config button”. So we’re here on the Magento 2 backend and we’re going to click ‘Stores’, we’re going to click ‘Configuration’, we then go to ‘Sales’, ‘Payment Methods’. So we select ‘PayGate enabled’, the title, the allowed shipping methods, the PayGate ID and secret key. You must enter your details as supplied via PayGate, but in this casel, this is the test details.
We can change a lot, countries and you can change the successful order status. Once you’re done, you’re going to hit ‘Save config’.
You may want to hit the ‘go to the Cache management’ page. Now that we’ve done everything, just refresh the full page caching or all of them, dependent on what you’re wanting. In this case, FPC is invalidated, so I’m just going to hit that refresh button. The cache types are refreshed. Let’s see what it looks like…
Here we are on the checkout page. We’re going to hit the PayGate plugin and we’re going to say ‘place order’. We now redirect to PayGate and there we are! On the payment page, you get the test transaction warning message and as you can see, everything is configured.
You’ve now set up the Magento 2 PayGate plugin on your website,
If you have any questions or would like to find out more please contact us.