Callback issue with Custom Errors

Posted By BORNXenon Wed 8 Oct 2014
Add to Favorites0
Author Message
BORNXenon
 Posted Wed 8 Oct 2014
Supreme Being

Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)

Group: Forum Members
Last Active: Mon 23 Apr 2018
Posts: 59, Visits: 291
We are using SagePay as our payment gateway and we appear to have an issue with the callback page when Custom Errors are turned on in the web.config.

If we have Custom Errors turned on, when an order is processed through SagePay everything goes through correctly and Callback.aspx is loaded but redirects to Error.aspx, yet doesn't actually log an Error in the error logs.
If we have Custom Errors turned off however, it redirects to the Customers 'My Account' page as it is supposed to.

I thought at first that this was caused by attempting to update the Google Analytics Tracking, however, it occurs even after reverting to the original tracking code, (I took a backup of the file before changing it).

Also, after being redirected to the 'My Account' page, the basket is not cleared.

I have replaced the Callback.aspx and the EcommerceTracking.ascx and associated .VB files with clean copies from the download zip file in case something has inadvertently changed, however the issue persists.

Can someone look into this for me?
Wed 8 Oct 2014 by BORNXenon
Paul
 Posted Wed 8 Oct 2014
große Käse

große Käse - (559,214 reputation)große Käse - (559,214 reputation)große Käse - (559,214 reputation)große Käse - (559,214 reputation)große Käse - (559,214 reputation)große Käse - (559,214 reputation)große Käse - (559,214 reputation)große Käse - (559,214 reputation)große Käse - (559,214 reputation)

Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807, Visits: 2,748
If we have Custom Errors turned off however, it redirects to the Customers 'My Account' page as it is supposed to.


Is it supposed to? Do you mean you modified it to do that? Because it does not as standard. It should show a text summary of the order on either callback or checkoutcomplete, depending on the payment system.


--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb
BORNXenon
 Posted Thu 9 Oct 2014
Supreme Being

Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)

Group: Forum Members
Last Active: Mon 23 Apr 2018
Posts: 59, Visits: 291
Paul (08/10/2014)

Is it supposed to? Do you mean you modified it to do that? Because it does not as standard. It should show a text summary of the order on either callback or checkoutcomplete, depending on the payment system.


In which case, there is a bigger issue than I thought because I have not modified it and it definitely does not redirect to checkoutcomplete.


I have been trying to debug it this morning and it bombs out with this error:


An exception of type 'System.Security.Cryptography.CryptographicException' occurred in mscorlib.dll but was not handled in user code


Any ideas?
BORNXenon
 Posted Thu 9 Oct 2014
Supreme Being

Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)

Group: Forum Members
Last Active: Mon 23 Apr 2018
Posts: 59, Visits: 291
I thought this may have something to do with my URL Rewrite rules in the web.config, however, I have stopped the URL Rewrite for callback.aspx and I still get the Error page.
BORNXenon
 Posted Thu 9 Oct 2014
Supreme Being

Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)

Group: Forum Members
Last Active: Mon 23 Apr 2018
Posts: 59, Visits: 291
Really stuck now.

I've had a trace running and SagePay posts back to the correct callback.aspx, because of my new exclusion rule, 'callback.aspx' doesn't redirect to 'callback' but it does still throw an error, which is not written to the logs.

If I turn off customerrors, it redirects through to the Customer account page with a ReturnURL QueryString.

http://forum.kartris.com/Uploads/Images/a01b2df1-e16d-4d69-acdd-4ecc.png


I can't debug this as it is a live site. If I try to debug it locally, it bombs out with a blank referrer.
BORNXenon
 Posted Thu 9 Oct 2014
Supreme Being

Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)

Group: Forum Members
Last Active: Mon 23 Apr 2018
Posts: 59, Visits: 291
After wasting a day on this, it gets weirder.

I have set up a test store with an exact copy of the live database and live files.
The only differences between the sites is the URL and that SSL is turned off on the test site.

Hosting settings are all the same with the exception of SSL and a dedicated IP on the live site.

On the test site, the error still occurs on the Callback.aspx page. I am not certain, but I think that SagePay is not returning the order details as it works fine if I have the gateway set to FAKE.
If I change the payment gateway to SagePayDirect, everything works correctly, I even get eCommerce tracking from my edited Ecommerce.aspx usercontrol.

On the live site, if I change the payment gateway to SagePayDirect with all the same settings, it doesn't generate the Payment Selection dropdown box, and also doesn't generate the Credit card fields.

PLEASE, can somebody help me as I have spent months getting this site up and running and I really can't afford these issues.
BORNXenon Marked As Answer
 Posted Fri 10 Oct 2014
Supreme Being

Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)Supreme Being - (37,451 reputation)

Group: Forum Members
Last Active: Mon 23 Apr 2018
Posts: 59, Visits: 291
Right, after much more digging and messing about with my test installation, I have found the issue.

It appears that if running in Integrated mode, I have the following issues with the payment system:

The checkout page goes off to the payment gateway as it is supposed to, the payment is made and the payment gateway returns to Callback.aspx.
The callback page, instead of confirming the successful transaction and redirecting to CheckoutComplete.aspx throws an unknown error. It is unknown because it never gets written to the logs. If CustomErrors is set to 'On' in the web.config file, then the customer gets shunted through to Error.aspx. If Customer errors are set to 'Off', the customer gets shunted to the Customer.aspx (My Account) page.

The customer never actually sees an Order Confirmation. As a result of this, we have had several phone calls and cancelled orders, one customer placed his order 3 times as he wasn't sure whether or not the payment had gone through.

Also, if running in Integrated Mode, I am unable to be logged into the backend and frontend at the same time. If I am logged in to the frontend as a 'customer' and the backend as Admin, any changes I attemt to make in the backend result in me being redirected to the frontend My Account page, yet in Classic mode, it works as it should.

The only issue I have with running in Classic Mode, is that the graphs don't work in the backend, yet work perfectly in Integrated mode.Crying

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top