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.
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?`
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".
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.
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 :)
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.
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)
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.
Exception on confirming the purchase
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:
(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:
While basket pipeline is a bit tweaked, but it should not matter i guess:
Maybe this could help you (if you haven't already tried it):
http://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/34239-Payment-insufficient-to-cover-order-total-(When-using-no-payment)
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.
Ah sorry. Missed the part where it work some of the time.
Very strange indeed
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
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".
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
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 :)
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.
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.
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)
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.
Will do.
is working on a reply...