Copied to clipboard

Flag this post as spam?

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


  • Laurence Gillian 600 posts 1219 karma points
    Nov 28, 2014 @ 16:16
    Laurence Gillian
    0

    TeaCommerce Posts Twice, intermittent fails

    I have a TeaCommerce install where we post orders using the JavaScript API.

    What we are seeing an intermittent issue where orders are not posted properly.

    When the order fails, the products come through but all other data is missing including the customers email address.

    What is even stranger is the server responds with a 500 when the order is successful and a 200 when the error happens.

    I have checked the logs and there is nothing in there.

    Please help!

    TeaCommerce v2.3.2
    Umbraco v6.1.6

  • Anders Burla 2560 posts 8256 karma points
    Dec 01, 2014 @ 08:18
    Anders Burla
    0

    Hi Laurence

    Using session or cookie for saving the order? Try use cookie so your order wont reset when a new build is published.

    Kind regards
    Anders

  • Laurence Gillian 600 posts 1219 karma points
    Dec 01, 2014 @ 12:34
    Laurence Gillian
    0

    Hey Anders, the site is currently using Cookies and not part of continuous integration so it's not restarting very often.

    It's possible to recreate the error by posting multiple times in the same session.

    The post is happening when TC.generatePaymentForm({ storeId: 1 }); is called.

  • Laurence Gillian 600 posts 1219 karma points
    Dec 01, 2014 @ 14:17
    Laurence Gillian
    0

    Occasionally seeing these two errors:

    1. Error 1

    STACKTRACE: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Umbraco.Web.BaseRest.RestExtensionMethodInfo.Invoke(String[] parameters)

    INNEREXCEPTION: System.InvalidOperationException: Sequence contains more than one matching element at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable1 source, Func2 predicate) at TeaCommerce.Api.Models.PriceCollection.Get(Int64 currencyId) at TeaCommerce.Api.PriceCalculators.OrderCalculator.CalculateOrderLine(Order order, OrderLine orderLine, VatRate fallbackVatRate) at TeaCommerce.Api.PriceCalculators.OrderCalculator.CalculateOrderLines(Order order) at TeaCommerce.Api.PriceCalculators.OrderCalculator.CalculateOrder(Order order) at TeaCommerce.Api.Models.Order.Save() at TeaCommerce.Api.Web.TeaCommerceHelper.EnsureThatCurrentOrderIsntChangedAfterItsLockedForPayment(Int64 storeId) at TeaCommerce.Api.Web.TeaCommerceHelper.AddOrUpdateOrderProperties(Int64 storeId, IDictionary2 properties) at TeaCommerce.Api.Web.FormPostHandler.AddOrUpdateOrderProperties(Int64 storeId, IDictionary2 formFields, IDictionary`2 settings) at TeaCommerce.Api.Web.FormPostHandler.FormPost() at TeaCommerce.Umbraco.Web.RestExtensions.FormPost()]]>

    1. Error 2

    STACKTRACE: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Umbraco.Web.BaseRest.RestExtensionMethodInfo.Invoke(String[] parameters)

    INNEREXCEPTION: System.InvalidOperationException: Sequence contains more than one matching element at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable1 source, Func2 predicate) at TeaCommerce.Api.Models.PriceCollection.Get(Int64 currencyId) at TeaCommerce.Api.PriceCalculators.OrderCalculator.CalculateOrderLine(Order order, OrderLine orderLine, VatRate fallbackVatRate) at TeaCommerce.Api.PriceCalculators.OrderCalculator.CalculateOrderLines(Order order) at TeaCommerce.Api.PriceCalculators.OrderCalculator.CalculateOrder(Order order) at TeaCommerce.Api.Models.Order.Save() at TeaCommerce.Api.Web.PaymentProviders.PaymentMethodExtensions.GeneratePaymentForm(PaymentMethod paymentMethod, Order order, String submitInput) at TeaCommerce.Api.Web.TeaCommerceHelper.GeneratePaymentForm(Int64 storeId, String submitInput) at TeaCommerce.Api.Web.FormPostHandler.GeneratePaymentForm(Int64 storeId) at TeaCommerce.Api.Web.FormPostHandler.FormPost() at TeaCommerce.Umbraco.Web.RestExtensions.FormPost()]]>

  • Anders Burla 2560 posts 8256 karma points
    Dec 02, 2014 @ 08:42
    Anders Burla
    0

    Hi Laurence

    Looks like there is an order line with multiple prices for the same currency. Could you try and check the order in the DB and see if that specify order line has multiple prices for the same currency?

    Kind regards
    Anders

Please Sign in or register to post replies

Write your reply to:

Draft