Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Im trying to add Klarna. But Im getting 400-error (bad request). This is how my settings looks like:
Im trying to get the klarna iframe with this code:
Order currentOrder = TC.GetCurrentOrder(1); string html = ""; WebClient webclient = new WebClient(); webclient.Headers["Referer"] = HttpContext.Current.Request.Url.AbsoluteUri.ToString(); try { // returns http://localhost:62438/base/TC/PaymentCommunication/1/Klarna/f10f4894-59c3-4b84-a18c-04bbee42e8e7/f5120cd0719fd282dbcd822edd83a79f476160d2e5dd896750026462f229dd62.aspx?communicationType=checkout html = webclient.DownloadString(currentOrder.Properties.First(x => x.Alias.Equals("teaCommerceCommunicationUrl")).ToString() + "?communicationType=checkout"); } catch (Exception ex) { @ex.Message } @Html.Raw(html)
Stacktrace:
2015-02-06 11:18:31,191 [20] ERROR TeaCommerce.Umbraco.Configuration.Infrastructure.Logging.LoggingProvider - [Thread 8] Klarna(CART-23) - ProcessRequest - Exception: Klarna.Checkout.ConnectorException: BadRequest ---> System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.GetResponse() at Klarna.Checkout.HTTP.BasicHttpTransport.Send(HttpWebRequest request, String payload) at Klarna.Checkout.BasicConnector.Handle(HttpMethod method, IResource resource, Dictionary`2 options, List`1 visitedUrl) --- End of inner exception stack trace --- at Klarna.Checkout.BasicConnector.Handle(HttpMethod method, IResource resource, Dictionary`2 options, List`1 visitedUrl) at Klarna.Checkout.BasicConnector.Apply(HttpMethod method, IResource resource, Dictionary`2 options) at TeaCommerce.PaymentProviders.Inline.Klarna.ProcessRequest(Order order, HttpRequest request, IDictionary`2 settings) Klarna.Checkout.ConnectorException: BadRequest ---> System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.GetResponse() at Klarna.Checkout.HTTP.BasicHttpTransport.Send(HttpWebRequest request, String payload) at Klarna.Checkout.BasicConnector.Handle(HttpMethod method, IResource resource, Dictionary`2 options, List`1 visitedUrl) --- End of inner exception stack trace --- at Klarna.Checkout.BasicConnector.Handle(HttpMethod method, IResource resource, Dictionary`2 options, List`1 visitedUrl) at Klarna.Checkout.BasicConnector.Apply(HttpMethod method, IResource resource, Dictionary`2 options) at TeaCommerce.PaymentProviders.Inline.Klarna.ProcessRequest(Order order, HttpRequest request, IDictionary`2 settings)
Any help would be greatly appreciated!
hmm, it seems like the problem was that I'd set the wrong region code on the country (it should be SE not SWE for Sweden)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Klarna payment provider 3.0 - getting 400-error (bad request)
Im trying to add Klarna. But Im getting 400-error (bad request). This is how my settings looks like:
Im trying to get the klarna iframe with this code:
Stacktrace:
Any help would be greatly appreciated!
hmm, it seems like the problem was that I'd set the wrong region code on the country (it should be SE not SWE for Sweden)
is working on a reply...