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.

  • Dima Stefantsov 100 posts 225 karma points
    Apr 27, 2013 @ 15:40
    Dima Stefantsov
    0

    Exception on confirming the purchase

    2013-04-27 17:25:00,646 [5] WARN  umbraco.macro - [Thread 55] Error loading MacroEngine script (file: uCommerce/Preview.cshtml, Type: ''. Exception: UCommerce.Pipelines.PipelineException: Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details. ---> System.Security.SecurityException: Payment insufficient to cover order total for OrderGuid 95238386-544e-44e6-bd67-d9e465220a4f. Please ensure that payments cover the entire value of the order before checking out.
       at UCommerce.Pipelines.Checkout.ValidatePaymentsMadeAgainstOrderTotalTask.Execute(PurchaseOrder subject)
       at UCommerce.Pipelines.Pipeline`1.Execute(T subject)
       --- End of inner exception stack trace ---
       at UCommerce.Pipelines.Pipeline`1.Execute(T subject)
       at UCommerce.Transactions.Payments.AbstractPaymentMethodService.ExecutePostProcessingPipeline(Payment payment)
       at UCommerce.Transactions.Payments.DefaultPaymentMethodService.RequestPayment(PaymentRequest request)
       at UCommerce.Transactions.TransactionLibraryInternal.RequestPayment(Int32 paymentId)
       at Castle.Proxies.TransactionLibraryInternalProxy.RequestPayment_callback(Int32 paymentId)
       at Castle.Proxies.Invocations.TransactionLibraryInternal_RequestPayment.InvokeMethodOnTarget()
       at Castle.DynamicProxy.AbstractInvocation.Proceed()
       at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation)
       at Castle.DynamicProxy.AbstractInvocation.Proceed()
       at Castle.Proxies.TransactionLibraryInternalProxy.RequestPayment(Int32 paymentId)
       at UCommerce.Transactions.TransactionLibraryInternal.RequestPayments()
       at Castle.Proxies.TransactionLibraryInternalProxy.RequestPayments_callback()
       at Castle.Proxies.Invocations.TransactionLibraryInternal_RequestPayments.InvokeMethodOnTarget()
       at Castle.DynamicProxy.AbstractInvocation.Proceed()
       at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation)
       at Castle.DynamicProxy.AbstractInvocation.Proceed()
       at Castle.Proxies.TransactionLibraryInternalProxy.RequestPayments()
       at UCommerce.Api.TransactionLibrary.RequestPayments()
       at ASP._Page_macroScripts_uCommerce_Preview_cshtml.Execute() in d:\hostingspaces\z163862\dlya-kalyana.ru\wwwroot\macroScripts\uCommerce\Preview.cshtml:line 12
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
       at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)
       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)
       at umbraco.macro.loadMacroScript(MacroModel macro)
       at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
    

    My checkout just approves the order, client will pay with cash. That's why as my payment method I have selected Default Payment Method Service.

    My checkout pipeline looks like:

                           ${Checkout.ValidatePaymentsMadeAgainstOrderTotal}
                            ${Checkout.AssignOrderNumber}
                            ${Checkout.CreateCustomer}
                            ${Checkout.CreateMemberForCustomer}
                            ${Checkout.ConvertBasketToPurchaseOrder}
                            ${Checkout.AddAuditTrailForCurrentOrderStatus}
                            ${Checkout.SetVoucherUses}
                            ${Checkout.ClearBasketInformation}
                            ${Checkout.SavePurchaseOrder}
                            ${Checkout.SendConfirmationEmail}

    (I think it's default thing)

    It happens once in a while. Right after exception I go back to basket, confirm order again and no exception. It have happened twice for me now.

    What's going on?

    Oh. Post there does the following:

        if (request.HttpMethod == "POST" && request.Form.AllKeys.Any(x => x == "send-order"))
        {
            TransactionLibrary.ExecuteBasketPipeline();
            TransactionLibrary.RequestPayments();
            HttpContext.Current.Response.Redirect(ShopConstants.PathForOrderSubmitted);
        }

    While basket pipeline is a bit tweaked, but it should not matter i guess:

    ${Basket.SetCultureCode}
    
                            
                            ${Basket.CalculateShippingCostForShipments}
                            ${Basket.CalculateShippingTaxForShipments}
                            ${Basket.CalculateShippingTotalForShipments}
    
                            
                            ${Basket.CalculateOrderLineTax}
    
                            
                            ${Basket.CalculateOrderLinesTotals}
                            ${Basket.CalculateShippingTotal}
                            ${Basket.CalculatePaymentTotal}
    
                            
                            ${Basket.ApplyAwards}
    
                            
                            ${Basket.CalculateOrderLinesUnitDiscounts}
    
                            
                            ${Basket.CalculateOrderDiscount}
                            ${Basket.CalculateOrderLinesDiscounts}
    
                            
                            ${Basket.CalculateOrderSubTotal}
    
                            ${Basket.SetProperDeliveryType} --custom; sets paid delivery for cheap orders; after that some default pipeline items are repeated.
    
                            
                            ${Basket.CalculateShippingDiscounts}
                            ${Basket.CalculateShippingTaxForShipments}
                            ${Basket.CalculateShippingTotalForShipments}
    
                            
                            ${Basket.CalculateOrderLineTax}
    
                            
                            ${Basket.CalculateOrderLinesTotals}
                            ${Basket.CalculateShippingTotal}
                            ${Basket.CalculatePaymentTotal}
    
                            ${Basket.CalculateVATTotal}
                            ${Basket.CalculateOrderDiscountTotal}
    
                            ${Basket.CalculateOrderTaxTotal}
                            ${Basket.CalculateOrderTotal}
    
                            ${Basket.CleanUp}
                            ${Basket.Save}
  • Nickolaj Lundgreen 233 posts 1132 karma points
    May 01, 2013 @ 14:12
  • Dima Stefantsov 100 posts 225 karma points
    May 01, 2013 @ 14:24
    Dima Stefantsov
    0

    Doesn't look like my case. In my case everything works most of the time. But SOMETIMES it doesn't. With nothing changed in code, or payment method.

    It totally looks like a bug in uCommerce to me.

  • Nickolaj Lundgreen 233 posts 1132 karma points
    May 01, 2013 @ 14:26
    Nickolaj Lundgreen
    0

    Ah sorry. Missed the part where it work some of the time.

    Very strange indeed

  • Martin 181 posts 740 karma points
    May 01, 2013 @ 20:21
    Martin
    0

    Hi Dima,

    What payment provider and currency are you using? Have you tried to create two identical orders where one of them failed? Or does it only fail in some cases with "special" products?`

    Regards Martin

  • Dima Stefantsov 100 posts 225 karma points
    May 01, 2013 @ 20:46
    Dima Stefantsov
    0

    Hi, Martin.
    >That's why as my payment method I have selected Default Payment Method Service.
    I think it's the answer to your question. And my currency is rub.(cyrillic spelling, this forum keeps cutting it out) (one of my items for sale example).

    Like I said, I can't reproduce the error. I am just getting it sometimes. And then I just go back, try to "confirm" order again and it works. Have not noticed anything like "it breaks with some special products".

  • Morten Skjoldager 440 posts 1499 karma points
    May 24, 2013 @ 10:36
    Morten Skjoldager
    0

    Does it happen on products that sometimes fail and some times it don't ?

    ValidatePaymentMadeAgainstOrderTotal are quite sensitive on low decimals (5.th decimal to be exact). There's a work item scheduled to fix that. My guess is that some combinations of products, tax and shipping might cause some strange amount. Can you verify that failing payments have 5 decimals ? It would be great if you can try to look at the prices, e.g post one of the failing payments here. 

    Regards

    Morten

  • Dima Stefantsov 100 posts 225 karma points
    May 25, 2013 @ 00:44
    Dima Stefantsov
    0

    All my prices are round numbers (int), my tax is 0.00
    Shipping is always either 0 or 500. 

    I afraid I don't have any additional log data for now. Right now shop is not active enough to produce this bug again. But it for sure will be a pity to have a customer leave because of a bug. Be assured I will let you know if that will happen :)

  • saravana 26 posts 45 karma points
    May 25, 2013 @ 11:56
    saravana
    0

    Hi the below link may help you

    http://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/39800-Exception-occoured-while-processing-pipeline-UCommercePipelinesCheckoutCheckoutPipeline?p=1

    the ValidatePaymentsMadeAgainstOrderTotal is failing. For now commenting it out of the checkout pipeline will solve the issue. 

  • Morten Skjoldager 440 posts 1499 karma points
    May 27, 2013 @ 10:41
    Morten Skjoldager
    0

    Hi again dima, 

    Commenting the task out is a bad idea as it only fails on very specific cases. It is there to ensure that people do not try to do fraud on your shop. 

    Another tip;

    The task looks for payments that are either acquired or authorized and hold the total amount of these against the order total. So in cases where it fails, you should look at payments attached to the order and their status, and the order total on the order. 

     

  • Dima Stefantsov 100 posts 225 karma points
    May 27, 2013 @ 18:05
    Dima Stefantsov
    0

    saravana, thank you, that looks promising.

    Hi, Morten. Hehe, okay, I won't comment it out (even though my shop is not using money at all; it's just for orders for now; uCommerce don't have built-in providers for major Russian ecommerce players, and I don't feel like implementing it myself at the moment).
    Next time bug will happen I will make database backup and dissect it. (thinking about it, I might find nothing though; every time it worked perfect from second attempt; but real users won't try it twice)

  • Morten Skjoldager 440 posts 1499 karma points
    Jun 07, 2013 @ 15:46
    Morten Skjoldager
    1

    Dima,

    This is a hard one to break. Let me know if you see the error again. Then check upon the ordertotal and payments total. They have to be identical. Also note that every payemtn associated should be authorized or aquired. 

  • Dima Stefantsov 100 posts 225 karma points
    Jun 07, 2013 @ 16:41
    Dima Stefantsov
    0

    Will do.

Please Sign in or register to post replies

Write your reply to:

Draft