Example here:
https://github.com/circleinteractive/uk.co.circleinteractive.payment.sagepay/blob/master/ipn.php#L241
An internal error in the data sent or the data stored, results in just a text message being echoed out. This leaves the user in Sage Pay with the error message:
Server error 5006: Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL.
So the user is left in a bit of limbo, stuck on Sage Pay, with no cancel button and a difficulty in using the back button due to the POST submissions.
If there is an internal data inconsistency, then return the status ERROR to Sage Pay, with the details in the normal format. That way it can be handled correctly and the user returned to site. If the data sent is so wrong that no contribution can be determined, then send them to the home page of the site at least.
There are (I think) four places that just end with a echo "Something kind of unexpected happened"
Example here:
https://github.com/circleinteractive/uk.co.circleinteractive.payment.sagepay/blob/master/ipn.php#L241
An internal error in the data sent or the data stored, results in just a text message being echoed out. This leaves the user in Sage Pay with the error message:
So the user is left in a bit of limbo, stuck on Sage Pay, with no cancel button and a difficulty in using the back button due to the POST submissions.
If there is an internal data inconsistency, then return the status ERROR to Sage Pay, with the details in the normal format. That way it can be handled correctly and the user returned to site. If the data sent is so wrong that no contribution can be determined, then send them to the home page of the site at least.
There are (I think) four places that just end with a
echo "Something kind of unexpected happened"