0

I can't complete a transaction via the SagePay Test Environment when attempting to run through the "challenge" flow. I'm supplying the new PDS2 fields and using VPS Direct Protocol 4.00

I've triple checked the VPSTxId to make sure it's the one I received in the response to the first stage transaction. The CReq is also present and valid (I've Base64 decoded it and it looks reasonable enough to me).

Response from test system (first stage transaction):

 "Status" -> "3DAUTH"
 "3DSecureStatus" -> "OK"
 "CReq" -> "ewogICJtZXNzYWdlVHlwZSIgOiAiQ1JlcSIsCiAgIm1lc3NhZ2VWZXJzaW9uIiA6ICIyLjEuMCIsCiAgInRocmVlRFNTZXJ2ZXJUcmFuc0lEIiA6ICJjMzY2NjEyMi04Yjk4LTRhNmEtYjlkZS01OGI2MWFkNjhhZTMiLAogICJhY3NUcmFuc0lEIiA6ICI5YjNkOGFkMS0yZDY3LTRjNjYtYmM4Yi02ZWQ1ZDIwYzk2OWEiLAogICJjaGFsbGVuZ2VXaW5kb3dTaXplIiA6ICIwNSIKfQ"
 "StatusDetail" -> "2021 : Please redirect your customer to the ACSURL, passing CReq."
 "ACSURL" -> "https://test.sagepay.com/3ds-simulator/html_challenge"
 "VPSProtocol" -> "4.00"
 "VPSTxId" -> "{2C04F723-BC87-3C7B-D805-DD4ED5B6BAFF}"

Request to test system (second stage transaction):

"CRes" -> "ewogICJtZXNzYWdlVHlwZSIgOiAiQ1JlcyIsCiAgIm1lc3NhZ2VWZXJzaW9uIiA6ICIyLjEuMCIsCiAgInRocmVlRFNTZXJ2ZXJUcmFuc0lEIiA6ICJjMzY2NjEyMi04Yjk4LTRhNmEtYjlkZS01OGI2MWFkNjhhZTMiLAogICJhY3NUcmFuc0lEIiA6ICI5YjNkOGFkMS0yZDY3LTRjNjYtYmM4Yi02ZWQ1ZDIwYzk2OWEiLAogICJ0cmFuc1N0YXR1cyIgOiAiWSIKfQ"
"VPSTxId" -> "{2C04F723-BC87-3C7B-D805-DD4ED5B6BAFF}"

Response from test system (second stage transaction):

"Status" -> "INVALID"
"StatusDetail" -> "5083 : VpsTxId provided in callback does not match transaction in CRes"
"VPSProtocol" -> "3.00"

I've tried submitting the second stage transaction with VPSProtocol (both 3.00 and 4.00) and without. No difference.

Any ideas? I expect the SagePay Test Environment is just broken, but there is also a possibility I'm doing something wrong ..

S.Thomson
  • 240
  • 1
  • 9

1 Answers1

2

The challenge is not yet working on the SagePay test server for v4.0. I got an email reply from their support staff on the 24/07/2019 saying "At the moment there is not an option to test this. Further communications will be sent in due course." Haven't heard since. Tried it yesterday and it didn't work either. Hopefully they get this done soon. I do get an error 404. The response you posted shows Invalid and then Protocal 3.0. That would be the fallback and you would need the PaReq value and all the data they require for protocol 3.0. Basically 2 differnet codes.

EDIT: I have posted answers on other questions relating this subject which can help with the integration.

3DSv2 Sagepay Direct Integration 'page not found' after correct challenge

3DSv2 Sagepay Direct Integration basics

If you search for SagePay on this site you can find all relevant questions and answers.

KH S
  • 444
  • 1
  • 4
  • 8
  • 3
    As per my post, I tried VPSProtocol 4.00, 3.00 and omitting the field entirely. No difference. I've now had a successful transaction through the challenge flow by removing the curly brackets. – S.Thomson Aug 13 '19 at 08:12
  • 1
    That's great that you got a successful transaction. I got now as far as you before but still the same error message you posted even after removing the curly brackets. – KH S Aug 13 '19 at 12:17
  • May I have the code example for how to setup the page for challenge response? – Bilal Ahmad Sep 09 '19 at 04:44
  • 1
    @Bilal Ahmad I have edited my answer and put some links to questions and answers relating SagePay integration. – KH S Sep 09 '19 at 07:56