Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Simon Osborne 108 posts 150 karma points
    Sep 16, 2011 @ 12:11
    Simon Osborne
    1

    SagePay - The Vendor failed to provide a RedirectionURL

    Hi,

    I am using the SagePay as the payment gateway. In Test mode when I submit the Payment on SagePay I get the following:

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

     

    My SagePay notificationURL in the SagePay.config is set to (auto).

    Any ideas what is wrong?

  • Simon Osborne 108 posts 150 karma points
    Sep 18, 2011 @ 22:38
    Simon Osborne
    0

    I really need an answer on this, if anyone can help.

    Why does the (auto) facility not generate a redirectionUrl???

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 19, 2011 @ 21:33
    Søren Spelling Lund
    0

    Which version of uCommerce are you on?

    Do you have a direct connection between your server and the SagePay system? The notification will happen server to server so you need to poke a hole in your firewall on port 80/443 depending on the protocol used on the page on which RequestPayment or CreatePayment is called.

  • Byron Delgado 47 posts 70 karma points
    Sep 21, 2011 @ 11:45
    Byron Delgado
    0

    Did you get a fix for this Simon?  Thanks

  • Byron Delgado 47 posts 70 karma points
    Sep 21, 2011 @ 19:38
    Byron Delgado
    1

    Just to update in the situation. We notice that there is nothing wrong with the uCommerce PaymentProcessor HttpHandler that awaits for the callback from Sage. You can try to feed the query string from the Sumulator and that completes the payment.

    In our case we managed to make it work by adding an entry in the IIS ip restrictions (may be is a good idea to check the iis log) for sagepay. This only works in our public staging site, it does not work in our local development machines. But it is fine as long we know it works.

    Hope this helps.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 21, 2011 @ 22:10
    Søren Spelling Lund
    0

    Hi Byron,

    Thanks for adding the info. I'm sure it will be useful for others.

  • Simon Osborne 108 posts 150 karma points
    Sep 22, 2011 @ 10:31
    Simon Osborne
    0

    Hi

    sorry for not replying sooner. I haven't resolved the issue yet, but I spoke to SagePay support to see if they could shed some light on the problem. They said that it was simply that the RedirectUrl parameter had not been supplied.

    Is it the PaymentProcessor HttpHandler that supplies the RedirectUrl?

  • Byron Delgado 47 posts 70 karma points
    Sep 22, 2011 @ 11:01
    Byron Delgado
    0

    Hi Simon, yes it does. It gets it from the SagePay.config once the call back comes back to the notificationUrl.

    The noticiation Url look like this:

    http://stage.somewhere.com/8/818/PaymentProcessor.axd

    I think what you can do is ask SagePay to set up a Simulator account, where you can see all the variables arriving over there. Then you can see that it gets the notificationUrl then it will show a query string, you can use it manually to the notificationUrl and that will complete the payment. So the problem must be in the communication. In our case it worked in a public server, and using an IIS IP entry to the sage test server.

    The query string looks like this

    VPSProtocol=2.23&TxType=PAYMENT&VendorTxCode=Reference-736&VPSTxId={55DC43CB-28FF-4778-BFC4-41686FB9D7
    9C}&Status=OK&TxAuthNo=5250&AVSCV2=ALL+MATCH&AddressResult=MATCHED&PostCodeResult=MATCHED&CV2Resu
    lt=MATCHED&GiftAid=0&3DSecureStatus=OK&CAVV=MNAFX42AVJ75WVBUX1863I&CardType=VISA&Last4Digits=8620
    &VPSSignature=0AC37F6975AAFAFCE62171EB9A8C91DA

    I hope this helps

  • Simon Osborne 108 posts 150 karma points
    Sep 22, 2011 @ 12:55
    Simon Osborne
    0

    I don't presently have the IP Restriction Feature installed, so I will have to install it first. What IP did you use for the SagePay test server?

  • Byron Delgado 47 posts 70 karma points
    Sep 22, 2011 @ 15:12
    Byron Delgado
    0

    195.170.169.8 is what I get after ping to test.sagepay.com

  • Simon Osborne 108 posts 150 karma points
    Sep 22, 2011 @ 15:13
    Simon Osborne
    0

    doh

  • Simon Osborne 108 posts 150 karma points
    Sep 23, 2011 @ 15:50
    Simon Osborne
    0

    I installed the IP Restrictions feature and set the 195.170.169.8 IP as allowed but this diddn't change the error.

    I have now spotted the following errors in umbracoLog:

    407496    0    -1    23/09/2011 14:31:34    Error    At /10/49/PaymentProcessor.axd (Referred by: ): System.Net.WebException: The remote server returned an error: (404) Not Found.
       at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
       at System.Net.WebClient.DownloadData(Uri address)
       at System.Net.WebClient.DownloadData(String address)
       at UCommerce.Transactions.EmailService.Send(EmailProfile profile, String emailTypeName, MailAddress to, IDictionary`2 templateParameters)
       at UCommerce.Transactions.EmailService.Send(EmailProfile profile, String emailTypeName, MailAddress to, String orderNumber)
       at UCommerce.Pipelines.Common.SendEmailTask.Execute(PurchaseOrder purchaseOrder)
       at UCommerce.Pipelines.Pipeline`1.Execute(T subject)

    407495    0    -1    23/09/2011 14:31:34    Error    The remote server returned an error: (404) Not Found.
    Byte[] DownloadDataInternal(System.Uri, System.Net.WebRequest ByRef)
       at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
       at System.Net.WebClient.DownloadData(Uri address)
       at System.Net.WebClient.DownloadData(String address)
       at UCommerce.Transactions.EmailService.Send(EmailProfile profile, String emailTypeName, MailAddress to, IDictionary`2 templateParameters)
       at UCommerce.Transactions.EmailService.Send(EmailProfile profile, String emailTypeName, MailAddress to, String orderNumber)
       at UCommerce.Pipelines.Common.SendEmailTask.Execute(PurchaseOrder purchaseOrder)
       at UCommerce.Pipelines.Pipeline`1.Execute(T subject)

    407494    0    -1    23/09/2011 14:31:34    Error    Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details.
    UCommerce.Pipelines.PipelineExecutionResult Execute(T)
       at UCommerce.Pipelines.Pipeline`1.Execute(T subject)
       at UCommerce.Transactions.Payments.AbstractPaymentMethodService.ExecutePostProcessingPipeline(Payment payment)
       at UCommerce.Transactions.Payments.ExternalPaymentMethodService.ProcessPaymentRequest(PaymentRequest request)
       at UCommerce.Transactions.Payments.SagePay.SagePayPaymentMethodService.ProcessCallback(Payment payment)
       at UCommerce.Transactions.Payments.PaymentProcessor.ProcessRequest(HttpContext context)

    407493    0    -1    23/09/2011 14:31:34    Error    PaymentMethodName: 10, PaymentId: 49

    407492    0    -1    23/09/2011 14:31:34    Error    The remote server returned an error: (404) Not Found.
    Byte[] DownloadDataInternal(System.Uri, System.Net.WebRequest ByRef)
       at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
       at System.Net.WebClient.DownloadData(Uri address)
       at System.Net.WebClient.DownloadData(String address)
       at UCommerce.Transactions.EmailService.Send(EmailProfile profile, String emailTypeName, MailAddress to, IDictionary`2 templateParameters)
       at UCommerce.Transactions.EmailService.Send(EmailProfile profile, String emailTypeName, MailAddress to, String orderNumber)
       at UCommerce.Pipelines.Common.SendEmailTask.Execute(PurchaseOrder purchaseOrder)
       at UCommerce.Pipelines.Pipeline`1.Execute(T subject)

    Does the "The remote server returned an error: (404) Not Found" relate to a missing email template or a failure to respond to SagePay?

    Thanks,

    Simon

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 26, 2011 @ 12:33
    Søren Spelling Lund
    0

    The error you're seeing is not related to SagePay, but rather the e-mail service, which tries to send out the order confirmation once the order is completed. uCommerce will request the configured Umbraco page and use that for the contents of the e-mail. Basically you should be able to to view the order confirmation e-mail template from the server itself.

    I've seen load balancers cause an issue similar to this. Basically the machines behind the load balancer were accessed by IP and the domain was only available going through the load balancer. What you can do is set up a hostname in the the "hosts" file so you can access the content site from the server itself.

  • Simon Osborne 108 posts 150 karma points
    Sep 28, 2011 @ 12:56
    Simon Osborne
    0

    HI Soren,

    it was a 404 on the email Template causing the PaymentProcesor to fall over. The 404 seems to be because the shop had a sub domain allocated to it under the Manage Hostnames feature and it was in turn a sub node of the site homepage which had the of the parent domain allocated to it in the same way. The shop worked fine but all other pages such as email templates generated a 404. Have now move the shop out from under the homepage re-published and the 404 is gone and SagePay redirect correctly. Soren and Byron thanks for your help :)

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 28, 2011 @ 13:22
    Søren Spelling Lund
    0

    Glad to hear that you got it going :)

  • Byron Delgado 47 posts 70 karma points
    Sep 28, 2011 @ 14:55
    Byron Delgado
    0

    Great!!

  • Robert 30 posts 110 karma points
    Nov 08, 2011 @ 10:38
    Robert
    0

    Hi guys i'm getting the same error on the redirect after payment of

    5006 Error Description : Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL.

    I'm getting a error log of, these are all of type Error:

    1. Could not find the Payment with PaymentId: 65, PaymentMethodName: 7 Void ProcessRequest(System.Web.HttpContext)    at UCommerce.Transactions.Payments.PaymentProcessor.ProcessRequest(HttpContext context)

    2. PaymentMethodName: 7, PaymentId: 65

    3. At /7/65/PaymentProcessor.axd (Referred by: ):

    4. Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details.

    5. Duplicate User name! A member with the user name [email protected] already exists umbraco.cms.businesslogic.member.Member MakeNew(System.String, System.String, System.String, umbraco.cms.businesslogic.member.MemberType, umbraco.BusinessLogic.User)    at umbraco.cms.businesslogic.member.Member.MakeNew(String Name, String LoginName, String Email, MemberType mbt, User u)     at umbraco.cms.businesslogic.member.Member.MakeNew(String Name, String Email, MemberType mbt, User u)     at UCommerce.Pipelines.Checkout.CreateMemberForCustomerTask.CreateOrGetUmbracoMember(String username, String emailAddress, Int32 memberGroupId, Nullable`1 umbracoMemberTypeId)     at UCommerce.Pipelines.Checkout.CreateMemberForCustomerTask.CreateUmbracoMemberForOrder(PurchaseOrder purchaseOrder)     at UCommerce.Pipelines.Checkout.CreateMemberForCustomerTask.Execute(PurchaseOrder purchaseOrder)     at UCommerce.Pipelines.Pipeline`1.Execute(T subject)

    When I look in CMSMember table there is no user with my [email protected] - I'm guessing that table from umbraco.cms.businesslogic.member.Member. Also no user of that username in uCommerce.Customer

    Any help would be great.

     

     

  • Simon Osborne 108 posts 150 karma points
    Nov 08, 2011 @ 10:41
    Simon Osborne
    0

    Hi Robert,

    anything that falls over in the pipeline causes the RedirectUrl not to be supplied back to SagePay. The following looks like there is a duplicate user:

    Duplicate User name! A member with the user name [email protected] already exists

    Could that be the case?

  • Robert 30 posts 110 karma points
    Nov 08, 2011 @ 10:53
    Robert
    0

    Hi Simon,

    Silly question, which database table?

    There is no user of that email address/ username in any of the membership, customer tables.

    What I think I need is on the addresses page is for the page to create the user if it doesn't exist on email address? Can this be done in XSL? or am I having to edit business logic?

    I was looking at

    <xsl:variable name="CreateUser" select="CommerceLibrary:SetOrderProperty('signup', 'true')" />

    But wasn't sure how to submit it to create a user?

  • Robert 30 posts 110 karma points
    Nov 08, 2011 @ 12:05
    Robert
    0

    I think it was this http://our.umbraco.org/forum/developers/api-questions/12757-Duplicate-User-name-when-trying-to-add-new-member 

     

    Basically I had users in the members table with nothing for username and email, this appeared to mess everything up. will have a good test now.

  • Craig Cronin 304 posts 503 karma points
    Oct 22, 2012 @ 21:23
    Craig Cronin
    0

    HI All,

    I'm really having a problem with this.  Locally on my web server it works fine, but on the live server I get the following message from sage pay

    [SocketException (0x274c): A connection attempt failed because the connected party did not 
    properly respond after a period of time, or established connection failed because connected host
    has failed to respond 80.71.16.12:80]
    System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
    +305
    System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6,
    Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult,
    Int32 timeout, Exception& exception) +699

    [WebException: Unable to connect to the remote server]
    System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +3291792
    System.Net.WebClient.DownloadData(Uri address) +223
    UCommerce.Transactions.EmailService.Send(EmailProfile profile, String emailTypeName,
    MailAddress to, IDictionary`2 templateParameters) +738
    UCommerce.Pipelines.Common.SendEmailTask.Execute(PurchaseOrder purchaseOrder) +588
    UCommerce.Pipelines.Pipeline`1.Execute(T subject) +275

    [PipelineException: Exception occoured while processing pipeline
    'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details.]
    UCommerce.Pipelines.Pipeline`1.Execute(T subject) +513
    UCommerce.Transactions.Payments.ExternalPaymentMethodService.ProcessPaymentRequest(PaymentR
    equest request) +49
    UCommerce.Transactions.Payments.SagePay.SagePayPaymentMethodService.ProcessCallback(Payment
    payment) +771
    UCommerce.Transactions.Payments.PaymentProcessor.ProcessRequest(HttpContext context) +235
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +625
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
    completedSynchronously) +270
  • Søren Spelling Lund 1797 posts 2786 karma points
    Oct 24, 2012 @ 11:27
    Søren Spelling Lund
    0

    When uCommerce tries to send an e-mail it will do a local request back to Umbraco to get it to render the body of the e-mail using the standard templating system. Typically this issue arises when the domain name of the store is not resolvable locally, i.e. accessing www.mystore.com from the server itself is not possible.

    The simplest way to diagnose this issue it to log onto the server via Remote Desktop, open a browser, and try accessing the store using the public domain name.

    If that's not possible the fix is to add a hostname to the hosts file on the server for the public domain name pointing to 127.0.0.1 

  • Maff 141 posts 465 karma points
    Dec 12, 2013 @ 11:43
    Maff
    0

    Hi,

    I'm getting the same problem 'Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL.'

    I've tried the process using the SagePay SIMULATOR mode, got the returnUrl with the long querystring ok.

    I'm running the code on a public web server with a public DNS server entry, and can TELNET onto ports 80 and 443, so no issues there.

    I can browse to the store url locally from the server, so there's no local DNS issues either.

    My email template shows fine in the browser so there's no problems with that.

    I added the IP Restriction record in IIS as advised earlier on this thread, but still no joy!

    My SagePay.config file looks like this (sensitive info removed):

    <?xml version="1.0"?>

    <sagePayPaymentMethodService

    vendor="myvendorname"

    txType="PAYMENT"

    debug="false"

    testMode="TEST"

    successUrl="http://mywebsite/cart/Confirmation.aspx"

    abortUrl="http://mywebsite"

    failureUrl="http://mywebsite"

    notificationURL="(auto)"

    />

    Any ideas?

    Thanks,

    Maff

  • Maff 141 posts 465 karma points
    Dec 12, 2013 @ 11:58
    Maff
    0

    A couple more bits of info that might help:

    - the transaction ID for my orders looks like this: VPSTxId=,TxAuthNo=,SecurityKey=Q18NWAYIQW - should the VPSTcId and TxAuthNo be populated?

    - the order status is still at 'new' in the database also

    Thanks,

    Maff

  • Jesper Nielsen 141 posts 498 karma points
    Dec 16, 2013 @ 12:44
    Jesper Nielsen
    0

    Hello Maff,

    Could you post the relevant part of the log, please?

    Also, when you say that the order status is still "new", are you sure you do not mean the payment status? The order status should be "basket" at this point.

    Kind regards,

    Jesper

  • Maff 141 posts 465 karma points
    Dec 16, 2013 @ 12:53
    Maff
    0

    Hi Jesper,

    Where can I find the logs? I don't see anything in the umbracoLog database table.

    You're correct - the status in the uCommerce_PurchaseOrder table is 1 (basket) and it's the same in the uCommerce_Payment table.

    Thanks,

    Maff

  • Jesper Nielsen 141 posts 498 karma points
    Dec 16, 2013 @ 13:05
    Jesper Nielsen
    0

    Hi Maff,

    What versions are you running of Umbraco and uCommerce?

    In some versions you can find the logs in "App_Data/Logs".

    Kind regards,

    Jesper

  • Maff 141 posts 465 karma points
    Dec 16, 2013 @ 13:11
    Maff
    0

    Umbraco version is 4.9.1, uCommerce version is 4.0.6.13304

    I can't see a Logs folder in App_Data

    Thanks,

    Maff

  • Jesper Nielsen 141 posts 498 karma points
    Dec 16, 2013 @ 14:58
    Jesper Nielsen
    0

    Hi Maff,

    Are you running against a simulator account, or a real customer account?

    We have checked the code, and the "RedirectURL" parameter should be set up ok.

    Could it be a problem with the TEST environment?

    Kind regards,

    Jesper

  • Maff 141 posts 465 karma points
    Dec 16, 2013 @ 15:04
    Maff
    0

    Hi,

    I'm running the code against SagePay's test environment, which was set up with a real customer account.

    I spoke to someone at SagePay and they said that this error happens when the store doesn't respond to the response they send to us. So it could be be something to do with what uCommerce does after the payment step happens?

    Thanks,

    Maff

  • Jesper Nielsen 141 posts 498 karma points
    Dec 16, 2013 @ 16:18
    Jesper Nielsen
    0

    Hi,

    Could you please check if you have the "PaymentProcessor.axd" registered as an HttpHandler in the web.config file?

    Kind regards,

    Jesper

  • Maff 141 posts 465 karma points
    Dec 16, 2013 @ 17:15
    Maff
    0

    Hi,

    Yes - we have this in the httpHandlers section:

    <add verb="*" path="PaymentProcessor.axd" type="UCommerce.Transactions.Payments.PaymentProcessor, UCommerce" />

    and this in the handlers section:

    <add verb="*" path="PaymentProcessor.axd" preCondition="integratedMode" name="PaymentProcessor" type="UCommerce.Transactions.Payments.PaymentProcessor, UCommerce" />

    Thanks,

    Maff

  • Jesper Nielsen 141 posts 498 karma points
    Jan 06, 2014 @ 10:48
    Jesper Nielsen
    0

    Hi Maff,

    Can you please check if the url is available from outside your own network? Can you access the urls from a phone, for example?

    The problem is most likely one of availability.

    Kind regards,

    Jesper

  • Maff 141 posts 465 karma points
    Jan 06, 2014 @ 11:19
    Maff
    0

    Hi Jesper,

    Thanks for your response but we ended up ditching uCommerce and now we're using Tea Commerce instead.

    Thanks,

    Maff

Please Sign in or register to post replies

Write your reply to:

Draft