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.
Recently we have enabled 3D Secure and have encountered an issue when the value of 3DSecureStatus
returns a value of NOTAVAILABLE
.
It would seem that when the NOTAVAILABLE
value is returned, an error is thrown within the call to the ConvertToSagePayMessage()
method on the SagePayIntegration
class within the assembly SagePay.IntegrationKit.DotNet.dll
.
Specifically, this error occurs when the value is being parsed to the ThreeDSecureStatus
enum. This enum does not have a value for NOTAVAILABLE
to be able to parse to, hence the error.
I have put a fix in for this for the moment to get this working for now. This fix replaces the NOTAVAILABLE
value with NONE
, so this now parse to a valid enum value. This is done just before the call to ConvertToSagePayMessage()
cryptDecoded = cryptDecoded.Replace("3DSecureStatus=NOTAVAILABLE", "3DSecureStatus=NONE");
I was just wondering why the ThreeDSecureStatus
enum does not have a value for NOTAVAILABLE
, as NOTAVAILABLE
is one of the values that it is expected to return, which is outlined in the Form Integration Protocol guide supplied by SagePay. And was hoping to implement a more robust fix, rather than the string replace.