Refactoring namespaces breaks payment

Vote:
 

Hi,

We are currenlty in the process of refactoring a large project to reduce the number of projects in the solution and simplify the architecture of the solution.

As part of the refactoring work we have changed some of the namespaces upon the payment types for example.

OldProject.Namespace.Payments.PayPal > NewProject.Namespace.Payments.PayPal

OldProject.Namespace.Payments.Stripe> NewProject.Namespace.Payments.Stripe

However after doing this we are now unable to retrieve orders from the system as it is looking for the old namespace.

Looking into this a bit we can see that the namespace is saved within the 'OrderFormPayment' table in the field 'ImplemenationClass'.

Is there a way to rename / change the implemenation class to our new namespace through possibly a migration step?

We have looked at a sql statement however I don't really want to go down this route as it could introduce other possible problems.

Thanks

Paul

#270648
Jan 27, 2022 9:04
Vote:
 

Hi Paul,

Have you looked at type forwarding, as this seems to deliver what you need?

https://docs.microsoft.com/en-us/dotnet/standard/assembly/type-forwarding

#270651
Jan 27, 2022 9:19
Paul McGann (Netcel) - Jan 31, 2022 15:08
Hi Andrew,

It is a nice solution and something we can possibly use in future. After reviewing this solution it doesn't quite fit our needs. The temporary solution we have in place is to move back these files until we come up with a better solution.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.