" at UCommerce.Pipelines.Pipeline`1.Execute(T subject)
at UCommerce.Transactions.CheckoutService.Checkout(Basket basket)
at UCommerce.Transactions.TransactionLibraryInternal.Checkout()
at Castle.Proxies.TransactionLibraryInternalProxy.Checkout_callback()
at Castle.Proxies.Invocations.TransactionLibraryInternal_Checkout.InvokeMethodOnTarget()
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.TransactionLibraryInternalProxy.Checkout()
at UCommerce.Api.TransactionLibrary.Checkout()
It doesn't provide much information. Can you find a more specific explanation, in the UmbracoLog maybe? I cannot read what exception is throwed, where and why :)
We are getting the below issue during order checkout, The exception we obtained from the umbracolog is below
Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details. UCommerce.Pipelines.PipelineExecutionResult Execute(T) at UCommerce.Pipelines.Pipeline`1.Execute(T subject) at UCommerce.Transactions.CheckoutService.Checkout(Basket basket) at UCommerce.Transactions.TransactionLibraryInternal.Checkout() at Castle.Proxies.TransactionLibraryInternalProxy.Checkout_callback() at Castle.Proxies.Invocations.TransactionLibraryInternal_Checkout.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation) UCommerce.Pipelines.PipelineExecutionResult Execute(UCommerce.EntitiesV2.PurchaseOrder) at UCommerce.Pipelines.Checkout.ValidatePaymentsMadeAgainstOrderTotalTask.Execute(PurchaseOrder subject) at UCommerce.Pipelines.Pipeline`1.Execute(T subject) at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.TransactionLibraryInternalProxy.Checkout() at UCommerce.Api.TransactionLibrary.Checkout() at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.Script.Services.WebServiceMethodData.CallMethod(Object target, IDictionary`2 parameters) at System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary`2 parameters) at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary`2 rawParams) at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData) at System.Web.Script.Services.RestHandler.ProcessRequest(HttpContext context) at System.Web.Script.Services.ScriptHandlerFactory.HandlerWrapper.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPt...
It looks like it has something to do with the task ValidatePaymentsMadeAgainstOrderTotalTask which throws an exception if payments made are less than order total. The code looks like this:
if (paymentsMadeTotal < subject.OrderTotal)
throw new SecurityException(string.Format("Payment insufficient to cover order total for OrderGuid {0}. Please ensure that payments cover the entire value of the order before checking out.", subject.OrderGuid));
Kim did you think about that ValidatePaymentsMadeAgainstOrderTotal is your last security step for possible frauds or buggy code? That task should never throw that exception as it checks weather the payments made from the paymentgateway matches the amount of the basket. It would be terribly to get that into production.
Initialy I have never commented the "<value>${Checkout.ValidatePaymentsMadeAgainstOrderTotal}</value>" and checked by adding my custom VAT calculation, it shows the same error which i have above. As Kim said i've commented that line, it works with no issues. But that will cause some in issues in future as Morten replied, so I don't what changes to be made in code that won't break the flow.
I think the cause for your exception could be a decimal problem between your tax calculation and the build in "ValidatePaymentsMadeAgainstOrderTotal" method.
Looks like you're running the CheckoutService manually to complete the order, which is fine for specific cases where you're not authorizing payment using a payment processor like Authorize.net, PayPal, or other.
However, the most common scenario is that a payment processor is involved and I'm guessing it's the case for you too. You're probably trying to do checkout twice: Once automatically using the uCommerce payment system and a second time using CheckoutService.Checkout(basket). That second checkout is probably what's failing.
If you are indeed using a payment gateyway to authorize payment checkout is typically handled by the payment provider in uCommerce itself when a successful callback is received from the payment gateway. What happens is that the configured pipeline (i.e. checkout) is executed and will handle all the checkout logic for you.
Here's what a sample config for Auth.net looks like in uCommerce:
Sorry I misread your question. Morten is right that the ValidatePaymentsMadeAgainstOrderTotal is failing. For now commenting it out of the checkout pipeline will solve the issue. I will schedule a work item to make sure that task works as exception in the future.
Could I pursuade you to send me your database along with the orderguid of the basket that's failing? Having some of your test data will speed along the fix.
You can send it to me via e-mail at ssl AT ucommerce DOT dk
Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'
We are using uCommerce 3.0.0.12320 and made a cutom VAT calculation.
The Basket.config is modified as below
The issue is during the checkout process
Please review the stacktrace below:
Hi Saravana
It doesn't provide much information. Can you find a more specific explanation, in the UmbracoLog maybe? I cannot read what exception is throwed, where and why :)
Hi Morkten Thanks for your reply.
We are getting the below issue during order checkout, The exception we obtained from the umbracolog is below
It looks like it has something to do with the task ValidatePaymentsMadeAgainstOrderTotalTask which throws an exception if payments made are less than order total. The code looks like this:
Hi Morket Thanks again.
will try as you said
Hi Morket Thanks again.
will try as you said
I ran into the same problem for a while ago and I never got it to work. My solution until now is to outcomment the line in the checkout pipeline.
<!-- <value>${Checkout.ValidatePaymentsMadeAgainstOrderTotal}</value> -->
Kim did you think about that ValidatePaymentsMadeAgainstOrderTotal is your last security step for possible frauds or buggy code? That task should never throw that exception as it checks weather the payments made from the paymentgateway matches the amount of the basket. It would be terribly to get that into production.
yes I have to find a solution or writing my own check before going in production.
@Saravana
Any updates so far :) ?
Kim and Morten
Thanks so much for your reply.
Initialy I have never commented the "<value>${Checkout.ValidatePaymentsMadeAgainstOrderTotal}</value>" and checked by adding my custom VAT calculation, it shows the same error which i have above.
As Kim said i've commented that line, it works with no issues.
But that will cause some in issues in future as Morten replied, so I don't what changes to be made in code that won't break the flow.
Please help me.
I think the cause for your exception could be a decimal problem between your tax calculation and the build in "ValidatePaymentsMadeAgainstOrderTotal" method.
Hi Kim,
Below is the code iam using for tax calculation
And I have modified the Basket.config as below
Please review the code and help me where I went wrong.
Looks like you're running the CheckoutService manually to complete the order, which is fine for specific cases where you're not authorizing payment using a payment processor like Authorize.net, PayPal, or other.
However, the most common scenario is that a payment processor is involved and I'm guessing it's the case for you too. You're probably trying to do checkout twice: Once automatically using the uCommerce payment system and a second time using CheckoutService.Checkout(basket). That second checkout is probably what's failing.
If you are indeed using a payment gateyway to authorize payment checkout is typically handled by the payment provider in uCommerce itself when a successful callback is received from the payment gateway. What happens is that the configured pipeline (i.e. checkout) is executed and will handle all the checkout logic for you.
Here's what a sample config for Auth.net looks like in uCommerce:
Hope this helps.
Hi Soren,
Thanks for your reply.
Now we are using Cybersource for payment process, which is not in ucommerce.
So I think the checkout won't happens during payment.
Please clarify
Sorry I misread your question. Morten is right that the ValidatePaymentsMadeAgainstOrderTotal is failing. For now commenting it out of the checkout pipeline will solve the issue. I will schedule a work item to make sure that task works as exception in the future.
Sorry for the inconvenience.
Thanks Soren.
Could I pursuade you to send me your database along with the orderguid of the basket that's failing? Having some of your test data will speed along the fix.
You can send it to me via e-mail at ssl AT ucommerce DOT dk
is working on a reply...