1
votes

I am integrating sagepay form based integration and its keep saying

Status Detail:  3087 : The SuccessURL format is invalid.

any have idea whats the problem even i changed my urls to .php format and i checked they are accessible too.

here are two urls that i am passing to sagepay.

<input type="hidden" name="SuccessURL" value="http://food121.co.uk/en/cart/140304-1/SagePaySuccess.php"/>

<input type="hidden" name="FailureURL" value="http://food121.co.uk/en/cart/step2?shop=93"/>

doing it on https://test.sagepay.com/gateway/service/vspform-register.vsp

same question here Getting 3087 error but still no solution there.

2

2 Answers

0
votes

If you have double checked the URLs and they are web accessible then, are you using the 'Crypt' field? Because SagePay can give you errors that are not related exactly to the fields you are looking at when it decrypts your 'Crypt' from the form.

Check that what is in your 'SuccessURL' in your crypt string is correct.

A way to see this would be intentionally put wrong values in your Crypt data and see what error you get.

0
votes

I had this same problem recently. It turned out the value of SuccessURL in my Crypt field did not exactly match the value in the SuccessURL field.

The Crypt field format is name=value&name=value&... and I had assumed that the values should be URL-encoded so was using http_build_query to create it. It turns out the values must be provided as-is (not encoded) and in ISO-8859-1.

Given the fields in Crypt are not encoded, it isn't clear how to include a literal ampersand (&) in a value that you pass to SagePay although this character is permitted in some fields. The sample code provided by SagePay doesn't deal with this eventuality so in my case I just removed ampersands from all fields in advance of generating the form.