I am developing a SagePayDirect plugin to use the integrated version of SagePay rather than the offsite or Iframe version.
I have built the basic plugin using the SagePayServer as a basis to give me the same configuration etc.
I have yet to put any processing code, but I have added the config code for the install.
It all compiles fine and copies over the DLLs fine. It shows up on the list of plugins and installs fine adding relevant stuff to DB, but when it comes to configure I get this...
he view 'Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Themes/DarkOrange/Views/PaymentSagePayDirect/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.cshtml
~/Themes/DarkOrange/Views/PaymentSagePayDirect/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.vbhtml
~/Themes/DarkOrange/Views/Shared/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.cshtml
~/Themes/DarkOrange/Views/Shared/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.vbhtml
~/Views/PaymentSagePayDirect/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.cshtml
~/Views/PaymentSagePayDirect/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.vbhtml
~/Views/Shared/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.cshtml
~/Views/Shared/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.vbhtml
~/Administration/Views/PaymentSagePayDirect/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.cshtml
~/Administration/Views/PaymentSagePayDirect/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.vbhtml
~/Administration/Views/Shared/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.cshtml
~/Administration/Views/Shared/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.vbhtml
This is my controller code:
[AdminAuthorize]
[ChildActionOnly]
public ActionResult Configure()
{
var model = new ConfigurationModel();
model.AdditionalFee = _SagePayDirectPaymentSettings.AdditionalFee;
model.ConnectTo = _SagePayDirectPaymentSettings.ConnectTo;
model.PartnerID = _SagePayDirectPaymentSettings.PartnerID;
model.TransactType = _SagePayDirectPaymentSettings.TransactType;
model.VendorName = _SagePayDirectPaymentSettings.VendorName;
model.NotificationFullyQualifiedDomainName = _SagePayDirectPaymentSettings.NotificationFullyQualifiedDomainName;
model.ReturnFullyQualifiedDomainName = _SagePayDirectPaymentSettings.ReturnFullyQualifiedDomainName;
model.Profile = _SagePayDirectPaymentSettings.Profile;
model.ConnectToList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.ConnectToValues.SIMULATOR });
model.ConnectToList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.ConnectToValues.TEST });
model.ConnectToList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.ConnectToValues.LIVE });
model.TransactTypeList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.TransactTypeValues.PAYMENT });
model.TransactTypeList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.TransactTypeValues.DEFERRED });
model.TransactTypeList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.TransactTypeValues.AUTHENTICATE });
return View("Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure", model);
}
[HttpPost]
[AdminAuthorize]
[ChildActionOnly]
public ActionResult Configure(ConfigurationModel model)
{
if (!ModelState.IsValid)
return Configure();
//save settings
_SagePayDirectPaymentSettings.AdditionalFee = model.AdditionalFee;
_SagePayDirectPaymentSettings.ConnectTo = model.ConnectTo;
_SagePayDirectPaymentSettings.PartnerID = model.PartnerID;
_SagePayDirectPaymentSettings.TransactType = model.TransactType;
_SagePayDirectPaymentSettings.VendorName = model.VendorName;
_SagePayDirectPaymentSettings.NotificationFullyQualifiedDomainName = model.NotificationFullyQualifiedDomainName;
_SagePayDirectPaymentSettings.ReturnFullyQualifiedDomainName = model.ReturnFullyQualifiedDomainName;
_SagePayDirectPaymentSettings.Profile = model.Profile;
_settingService.SaveSetting(_SagePayDirectPaymentSettings);
model.ConnectToList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.ConnectToValues.SIMULATOR });
model.ConnectToList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.ConnectToValues.TEST });
model.ConnectToList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.ConnectToValues.LIVE });
model.TransactTypeList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.TransactTypeValues.PAYMENT });
model.TransactTypeList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.TransactTypeValues.DEFERRED });
model.TransactTypeList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.TransactTypeValues.AUTHENTICATE });
return View("Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure", model);
}
The relevant view is in at: plugins/Nop.Plugin.Payments.SagePayDirect/Views/PaymentSagePayDirect/Configure.cshtml
How to I make sure that I includes my new plugin folder in the routing for the view?
Ta
Ben