Sample code: ASP.net

Please see the sample code pages for the specific languages:

Why isn’t my ITN page being called?

If you’ve specified the notify_url in your HTML form code when redirecting to PayFast for payment, ITN will be used to pass payment information back to you, but it may look like you’re not receiving the ITN call for a number of reasons.

One of them which affects ASP.NET relates to session cookies and redirects.

The notify_url location must return an HTTP 200 OK response for PayFast to consider the call successful and ITN will not follow redirects.

It you have not disabled ‘cookieless session states’, ASP.NET will try and redirect to create a session cookie thereby returning a HTTP 302 code causing ITN to fail. Simply turn off the ‘cookieless session states’ in your web.config which should resolve this problem.

Turn it off by adding the following configuration setting within the web.config file:

<system.web>

<sessionstate mode="InProc" cookieless="false" timeout="120"></sessionstate></system.web>