SagePay.Net Integration Kit - Error returning NOAVAILABLE value for 3dSecureStatus

I made a SagePay payment using form integration. My implementation is based on the integrated .Net integration kit from SagePay, which is all well and good.

We recently turned on 3D Secure and ran into a problem when a value 3DSecureStatusreturns a value NOTAVAILABLE.

It would seem that when a value is returned NOTAVAILABLE, an error occurs in a method call ConvertToSagePayMessage()in a class SagePayIntegrationin a class SagePay.IntegrationKit.DotNet.dll.

In particular, this error occurs when a value is parsed enumerated ThreeDSecureStatus. This listing does not matter for the NOTAVAILABLEpossibility of parsing, hence the error.

At the moment, I have installed a fix for this to get this working. This patch replaces the value NOTAVAILABLEwith NONE, so now this parsing checks the correct value of the enumeration. This is done just before the call.ConvertToSagePayMessage()

cryptDecoded = cryptDecoded.Replace("3DSecureStatus=NOTAVAILABLE", "3DSecureStatus=NONE");

I am just wondering why the element ThreeDSecureStatusdoes not have a value for NOTAVAILABLE, as it NOTAVAILABLEis one of the values ​​that is expected to be returned, which is outlined in the SagePay Form Integration Protocol Guide. And he hoped to implement a more reliable fix, rather than replacing the string.

+4
source share
1 answer

, , enum 3DSecure NOTAVAILABLE. SagePay :

, .NET, .

, .

  • , 3DSecureStatus NONE ( .)
  • , . SagePay (, , ) NOTAVAILABLE ThreeDSecureStatus.cs:

    public enum ThreeDSecureStatus
    {
        NONE,
        OK,
        NOAUTH,
        CANTAUTH,
        NOTAUTHED,
        ATTEMPTONLY,
        NOTCHECKED,
        INCOMPLETE,
        MALFORMED,
        INVALID,
        ERROR,
        NOTAVAILABLE //<--- Add this
    }
    
  • GitHub. . , # 6, Visual Studio 2015 . , .

+6

All Articles