Updated SagePay Server Plugin for 3.10 and 3.20

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 年 前
I have just uploaded my newest contribution to NopCommerce.

This plugin can now be downloaded from the Extension pages: https://www.nopcommerce.com/p/1211/sagepay-server-payment-plugin-iframe-redirect-modes.aspx

This is the server integration of sage pay: iframe and redirection.

Plugin now supports Multilanguage, Multistore and also works with One Page Checkout.

I will soon be writing a post in my blog about how it internally works to help other people who want to contribute with plugins.

Thanks
10 年 前
Hi,

Trying to install this using 3.10.

I've built the solution, but when importing into the plugins, nop errors with the following:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

STACK TRACE:
[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
   System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
   System.Reflection.RuntimeModule.GetTypes() +4
   System.Reflection.Assembly.GetTypes() +61
   Nop.Core.Plugins.PluginManager.Initialize() +1466

[Exception: Could not load file or assembly 'System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
]
   Nop.Core.Plugins.PluginManager.Initialize() +1886

[Exception: Could not load file or assembly 'System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
]
   Nop.Core.Plugins.PluginManager.Initialize() +2255

[InvalidOperationException: The pre-application start initialization method Initialize on type Nop.Core.Plugins.PluginManager threw an exception with the following error message: Could not load file or assembly 'System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
.]
   System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +550
   System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +132
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +90
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +135
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +516

[HttpException (0x80004005): The pre-application start initialization method Initialize on type Nop.Core.Plugins.PluginManager threw an exception with the following error message: Could not load file or assembly 'System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Any help would be appreciated :)

Thanks,
Craig
10 年 前
I will take a look and come back to you
10 年 前
Hi,  I edited a few things in the plugin as it seems like it was upgrading some DDL versions automatically. You can download it again when it is re-approved.
10 年 前
Thanks Carlos :)

I'll let you know how I get on.

Cheers,
Craig
10 年 前
Hi Carlos,

I now get this error :(

Error INVALID, The data in the BillingState field you supplied is an invalid format. Max is 2 Characters and only applicable for US Customers only.

The BillingState = TWR (tyne and wear) by the way.
10 年 前
This should be fairly easy to sort, but every time I try and build the solution, I get 130 errors!

Just need to check if the customer is from the US and if so, then print out the Delivery and Billing States, otherwise don't bother.


if (_workContext.CurrentCustomer.BillingAddress.StateProvince != null && _workContext.CurrentCustomer.BillingAddress.Country.TwoLetterIsoCode.ToLower()=="us")
            {
                data.Add("BillingState", (_workContext.CurrentCustomer.BillingAddress.StateProvince.Abbreviation.Length > 2) ? _workContext.CurrentCustomer.BillingAddress.StateProvince.Abbreviation.Substring(0,2) : _workContext.CurrentCustomer.BillingAddress.StateProvince.Abbreviation);
            }


if (_workContext.CurrentCustomer.ShippingAddress.StateProvince != null && _workContext.CurrentCustomer.ShippingAddress.Country.TwoLetterIsoCode.ToLower()=="us")
                {
                    data.Add("DeliveryState", (_workContext.CurrentCustomer.ShippingAddress.StateProvince.Abbreviation.Length > 2) ? _workContext.CurrentCustomer.ShippingAddress.StateProvince.Abbreviation.Substring(0, 2) : _workContext.CurrentCustomer.ShippingAddress.StateProvince.Abbreviation);
                }


But as said, every time I try and build the solution I get lots of errors with regards to missing assembly references.

Thanks,
Craig
10 年 前
Never mind, got it to work :)

Make the changes as above and it's fine!

Cheers,
Craig
10 年 前
Thanks! I will implement the your changes soon
10 年 前
Hi Carlos,

'Out of the box' the plugin doesn't work with 3.20. I've updated all the references, but on build I get the following error:

'Nop.Plugin.Payments.SagePayServer.Data.SagePayServerTransactionObjectContext' does not implement interface member 'Nop.Data.IDbContext.ExecuteSqlCommand(string, bool, int?, params object[])'

File: SagePayServerTransactionObjectContext.cs
Line: 12

Any idea's?

Thanks,
Craig
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.