Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1449 posts 1870 karma points
    Jan 20, 2014 @ 17:47
    Gordon Saxby
    0

    Script error with GeneratePaymentForm

    I have used the sample project as a basis which has mostly worked until I go to the submit order stage (Accept page). The razor script fails on this command

          @Html.Raw( TC.GeneratePaymentForm( storeId, "\" />" ) )
    The error message (in the page source) is
    Error Loading Razor Script (file: Shopping Cart Accept) The underlying connection was closed: An unexpected error occurred on a send.    at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
      at System.Net.HttpWebRequest.GetRequestStream()
      at TeaCommerce.Api.Web.PaymentProviders.APaymentProvider.MakePostRequest(String url, String request, NetworkCredential credentials)
      at TeaCommerce.PaymentProviders.Classic.SagePay.GenerateHtmlForm(Order order, String teaCommerceContinueUrl, String teaCommerceCancelUrl, String teaCommerceCallBackUrl, String teaCommerceCommunicationUrl, IDictionary`2 settings)
      at TeaCommerce.Api.Web.PaymentProviders.PaymentMethodExtensions.GeneratePaymentForm(PaymentMethod paymentMethod, Order order, String submitInput)
      at TeaCommerce.Api.Web.TeaCommerceHelper.GeneratePaymentForm(Int64 storeId, String submitInput)
      at ASP._Page_macroScripts_step_accept_cshtml.Execute() in c:\inetpub\website\macroScripts\step-accept.cshtml:line 49
      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
      at System.Web.WebPages.WebPage.ExecutePageHierarchy()
      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
      at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
      at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
    Line 49 is the code snippet above.
    The payment provider is SagePay which I think I have setup correctly ... but don't rely on it ;-)

     

     

  • Anders Burla 2560 posts 8256 karma points
    Jan 20, 2014 @ 18:46
    Anders Burla
    0

    Hi Gordon

    Could you try and download the source code for the payment providers and try build it, attach your debugger and see what happens. Think the uername/password is wrong or maybe an IP address needs to be allowed at SagePay. Did you follow this guide?
    http://anders.burla.dk/umbraco/tea-commerce/using-sage-pay-with-tea-commerce/

    Kind regards
    Anders

  • Gordon Saxby 1449 posts 1870 karma points
    Jan 20, 2014 @ 23:01
    Gordon Saxby
    0

    The guide doesn't match the Umbraco interface, or the SagePay one. I have allowed the server IP address and there isn't a username/password?

    I'll try and find the source for the payment provider ...

  • Anders Burla 2560 posts 8256 karma points
    Jan 21, 2014 @ 09:50
    Anders Burla
    0

    Hmm - which SagePay product do you have? The one out of the box is the "Server integration" from SagePay.

    Kind regards
    Anders

  • Gordon Saxby 1449 posts 1870 karma points
    Jan 21, 2014 @ 10:13
    Gordon Saxby
    0

    It is my client who registered with Sage ... I am not sure and I bet he doesn't know! I will get him to find out.

    Oh yes, I really think it should be mentioned somewhere that the Server Integration method is required / supported :-)

  • Gordon Saxby 1449 posts 1870 karma points
    Jan 21, 2014 @ 11:32
    Gordon Saxby
    0

    Sage has told my client that any of the integration methods should work.

    Anders, have you tried connecting to Sage with the Starter Kit? I did and that failed as well.

  • Anders Burla 2560 posts 8256 karma points
    Jan 21, 2014 @ 11:48
    Anders Burla
    0

    Yes we tested SIMULATION mode when we did the programming of the provider. Try go to the starter kit website and choose "test" as the payment option. It redirects to SagePay so things works.

    Kind regards
    Anders

  • Gordon Saxby 1449 posts 1870 karma points
    Jan 22, 2014 @ 10:33
    Gordon Saxby
    0

    OK - I think I have sorted it / got to the bottom of the issues!!

    I created my own Sage Simulator account and that worked, I was able to create and process an order (although I now have the problem that no values display on the confirmation page!!).

    I then switched back to the client Simulator account and eventually found that the "AUTHENTICATE" payment action was not enabled on their account - arrgh! I'll let the customer decide / sort that one out :-)

    So, to summarise: it would be good if you mentioned somewhere that your interface is for the "server" integration method. I will remember to test with my own Simulator account first, before trying to use the customers vendor ID.

    Hopefully, all will go well from here!

  • Anders Burla 2560 posts 8256 karma points
    Jan 22, 2014 @ 12:10
    Anders Burla
    0

    Hi Gordon

    Great you found the issue! And we will be sure to write that in the new documentation for the provider.

    Do you have an finalized order (try use the Razor API og the JS API to check)?

    Kind regards
    Anders

Please Sign in or register to post replies

Write your reply to:

Draft