I have implemented SagePay payment using the Form Integration. My implementation is based on the .Net integration kit supplied by SagePay which has all been good.
Re
The problem is that the integration kit contains a bug in that the enum
for the 3DSecure
status is missing a value for NOTAVAILABLE
. SagePay have even told me this:
Unfortunately this is a known issue with the .NET kit but there is no fix as of yet.
So there are three possible ways to fix this.
3DSecureStatus
value to NONE
(as written in the question.) Use a version of the Integration Kit that has had the fix applied. You can ask SagePay for the code (they seem perfectly willing to provide it free of charge) and add in NOTAVAILABLE
as an enum value in the ThreeDSecureStatus.cs
file:
public enum ThreeDSecureStatus
{
NONE,
OK,
NOAUTH,
CANTAUTH,
NOTAUTHED,
ATTEMPTONLY,
NOTCHECKED,
INCOMPLETE,
MALFORMED,
INVALID,
ERROR,
NOTAVAILABLE //<--- Add this
}
I have already gone through the process of fixing the bug and have uploaded it to a GitHub repository. Feel free to take the code from there. I have also updated the project to use C#6 and as such you will need to use Visual Studio 2015 or higher to use it. If you do need to use an older version, you could start with the original files from the first commit to the repository.