-1

I am trying to upgrade sage pay version from 2.22 to 3.00 and I am using Form Intergration to submit the values to Sage. The codes written VB. In 2.2, it was using "SimpleXor encryption algorithm", but that doesn't allowed in version 3.00 and as a result, I am getting the below error message:

This transaction attempt has failed. We are unable to redirect you back to the web store from which you were purchasing. The details of the failure are given below.

Status: INVALID

Status Detail: 5068 : The encryption method is not supported by this protocol version.

I found, version 3.00 allowed only AES encryption. Is there any sample AES encryption code to fix this issue?

Thank you in advance.

Rik Blacow
  • 1,139
  • 1
  • 7
  • 12
Mahesh
  • 1
  • 2

1 Answers1

0

This has been asked before, and there are some really helpful posts under the sagepay tag, so I recommend having a look through those. There is also a classic asp example located here which you might be able to recycle (it originated in one of the old Sage Pay integration kits).

You will also need to check the fields you are sending over - addresses are now split over several lines, and some stuff that wasn't mandatory, now is.

Also note that test and live encryption passwords are different. You can get these from My Sage Pay if you log in under the main admin account.

And finally, if you get the 3045 'Currency' error, it's probably nothing to do with currency and more likely your encryption is wrong.

Rik Blacow
  • 1,139
  • 1
  • 7
  • 12
  • sorry for the late reply.. Actually its vb.net not classic asp. I have added the aes encryption in class file. But do I need to "base64Encode" after AES encryption? If any queries, please let me know. – Mahesh Jul 22 '15 at 04:58
  • No need to base64Encode - just ensure that you add '@' to the beginning of the crypt string, though. – Rik Blacow Jul 22 '15 at 07:35
  • In my AES encrypt function there is a line: clearText = Convert.ToBase64String(ms.ToArray()) And in my main page, I am calling this function and added the "@" before the ecnrypted sting: strCrypt = "@" & aesEncrypt Are you saying to not use "ToBase64String" in main function? – Mahesh Jul 22 '15 at 09:03