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

前端 未结 1 962
旧巷少年郎
旧巷少年郎 2021-01-06 03:35

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

1条回答
  •  一生所求
    2021-01-06 03:45

    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.

    1. Either modify the decoded response from the server to change the value of the 3DSecureStatus value to NONE (as written in the question.)
    2. 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
      }
      
    3. 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.

    0 讨论(0)
提交回复
热议问题