I have finally got the Payment Plug-in I developed for SagePay South Africa working. The guys at SagePay South Africa tested the plug-in and are happy with the way it works. The plugin was written for nopCommerce v3.90 in Visual Studio 2017.
However, just as I completed the plug-in, SagePay South Africa notified all their plug-in developers that we have to verify the Merchant ID and Service Keys before saving this info in the database.
To do this, we have to connect to a Web Service hosted on the SagePay servers. The integration of this process was no problem and on my development PC everything works perfectly. The problem I am having is that when the plug-in is installed in a live environment, the plug-in cannot find the Endpoint Configuration settings in the Web.Config file that is located in the Plugin folder.
I got the process to work by manually editing the main Web.Config file of nopCommerce, and adding the settings below. This however is a problem, since we do not want the end-user to edit the main Web.Config file.
Here is the settings required to connect to the Web Service in the Web.Config file in the plugin folder:
<transport clientCredentialType="None" />
Does anyone know how I can resolve this problem? Does nopCommerce not read the Web.Config files in the plug-in folders?
I posted a thread on Stack Overflow to see if someone can tell me how to add the above config settings programatically in the controller, and got an answer from someone to use ChannelFactory, but I can't seem to figure that out.
Any suggestions or help would be appreciated!