0
votes

I'm using SagePay server integration for my project. I'm able to send my request. But my problem is response url.

I'm using azure portal (Azure App Services). After I publish my project I can go to sagepay also.

This is my web config

<sagePay>
    <add key="NotificationHostName" value="tdm.azurewebsites.net" />
    <add key="NotificationController" value="PaymentResponse" />
    <add key="NotificationAction" value="Notify" />
    <add key="SuccessAction" value="Success" />
    <add key="FailedAction" value="Failed" />
    <add key="VatMultiplier" value="1" />
    <add key="VendorName" value="VVVVVVV" />
    <add key="Mode" value="Test" />
  </sagePay>

I think these parts are OK. I just added payment response controller and relevant views.

So after I provide test card, then it looks like this. all necessary things here.

enter image description here

So in final step I'm getting following error.

Server error 5006: Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL. HTTP error 500: The request was unsuccessful due to an unexpected condition encountered by the server.

enter image description here

1

1 Answers

0
votes

Make sure the Notification URL is externally accessible

You must acknowledge receipt of the transaction response with a Status of either OK, INVALID or ERROR.

Clear the response buffer to remove any header code, comments or HTML. The Sage Pay Server is expecting “Status=” to be the first characters in the response.

The NotificationURL should ONLY respond with a Status field, a RedirectURL field and optionally a StatusDetail field. 4.The RedirectURL must be valid. Regardless of status, the RedirectURL must be sent that contains a valid, Fully Qualified URL (i.e. an address starting http:// or https://)