S.Simkhada
S.Simkhada

Reputation: 116

SagePay v4.0 integration - how to get the CRes value from the ThreeDSNotificationURL

I am working on getting sagepay direct v4.00 upgrade. I have got it to the stage where it ask for verification (type "challenge" page). Once i type challenge and press next i get redirect to the page i specified in ThreeDSNotificationURL (which is similar to TermUrl from before). I maybe wrong, but my understanding was that at this point we are provided with the CRes val. If this is correct - how do i go about getting this Val and passing it onto SagePay?

I understand that the question might be too vague. I'm woking on PHP - if someone has a working example of this on php it would be really helpful to have a look at.

Upvotes: 1

Views: 528

Answers (2)

Giraffe123
Giraffe123

Reputation: 61

Once a challenge flow is completed (to either success or failure) the CRes is POSTed to the ThreeDSNotificationURL in a form input named cres.

It is accompanied by an optional input threeDSSessionData which can be provided when the original CReq is posted to the ACS. This is just free text and allows users to track state.

Note the contents of the cres field is Base64 URL (not just Base64) encoded.

This is all mentioned in the EMVCo 3DSv2 2.1 spec, but it's admittedly quite well buried.

Upvotes: 1

0xFF
0xFF

Reputation: 96

The CRes is posted back to the URL you specify, so your PHP page handling this should be able to read the CRes from the $_POST object.

Once you've got it, you need to pass it back to Sagepay along with the VPSTxId (remember to remove the curly braces from this) in the same way as you'd pass the PaRes back to them in VPS 3.00

Upvotes: 0

Related Questions