Search code examples
sitefinityopayo

Can i respond to the notification POST from SagePay with a POST


I am integrating SagePay with Sitefinity, specifically the server low profile integration and i am a little stuck.

I have created a custom offline payment provider in Sitefinity, and this class has the relevant Notification hooks (Sitefinity has its own dedicated Notification Url which handles processing so you don't have to run your own).

The issue i have, is Sitefinity wants to POST the relevant information back (Status, RedirectUrl) but in the integration guides the notification paid seems to flush itself and just present itself as the plain text representation of the required return values.

Is there a URL i can post the notification response too, or does it have to be the Plain text response?


Solution

  • For anyone else, i would speak to Sitefinity to see if they have a route for this, there current setup i think deals with most situations but mainly from a direct point of view where you are directly able to POST and receive specific responses.

    The current setup of the Server integration from SagePay is not like that, in that it needs some form of notification page to output a specific format as part of its response output (so basically the response needs to be "rendered" to the page") for SagePay to pick it up and complete the transation.

    This was a custom cart implementation so i had a bit more scope, think it would be a PITA if i had to do it via the built in checkout.

    1. On my Payment page, if the user selected Card payment i would register SagePay via the code library they supply (if JavaScript is enabled i did this via a Web Api Call and responded with the next URL)
    2. Created a notification.aspx page in a publically available area on the site and passed that to SagePay as the notification point
    3. After payment is confirmed i have a confirmation step in my checkout that deals with setting all the required values pulled back from SagePay, it has no output, it just processes the order and payment together before redirecting to the success step

    Should have been much more simple then this, but they would have to update their internal notification page to respond with a plain text response in order for this to work.