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.

  • Jais Edelmann 45 posts 126 karma points
    Aug 30, 2012 @ 09:24
    Jais Edelmann
    0

    Payment insufficient to cover order total (When using "no" payment)

    Hey guys, im strugling abit gettin this final payment method working, paypal integraiton works perfect no problem at all, however when i try and use banktransfer shit goes wrong, its using default checkout pipeline (and the pipeline conf is default aswell)

     

    Exception Details: System.Security.SecurityException: Payment insufficient to cover order total for OrderGuid ff4c304d-43e5-4ed8-a94e-aa8c241c5927. Please ensure that payments cover the entire value of the order before checking out.
    
    [SecurityException: Payment insufficient to cover order total for OrderGuid ff4c304d-43e5-4ed8-a94e-aa8c241c5927. Please ensure that payments cover the entire value of the order before checking out.]
       UCommerce.Pipelines.Checkout.ValidatePaymentsMadeAgainstOrderTotalTask.Execute(PurchaseOrder subject) +763
       UCommerce.Pipelines.Pipeline`1.Execute(T subject) +275


    Codesnippet

                UCommerce.EntitiesV2.Basket _basket = UCommerce.Runtime.SiteContext.Current.OrderContext.GetBasket(true);
                var paymentMethod = PaymentMethod.SingleOrDefault(x => x.PaymentMethodId == int.Parse(this.rblPaymentMethod.SelectedValue)) ?? new PaymentMethod();
                if (paymentMethod.Name.ToLower().Contains("bank"))
                {
    
    
                    decimal price = 0;
                    decimal.TryParse(core.PriceManager.NicePrice(core.PriceManager.GetBasketTotal(_basket)), out price);
                    Library.CreatePayment(paymentMethod.Id, price , false, true);
                    Library.ExecuteBasketPipeline();
                    Library.Checkout();
                }
                else
                {
                    Library.CreatePayment(paymentMethod.Id);
                    Library.ExecuteBasketPipeline();
                }
  • Jais Edelmann 45 posts 126 karma points
    Aug 30, 2012 @ 09:25
    Jais Edelmann
    0

    This problem accured after upgrading to 2.6.1

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 04, 2012 @ 10:40
    Søren Spelling Lund
    0

    Hi Jais,

    2.6.1 introduced a new security feature, which prevents orders from being checked out if they don't have payments matching the overall value of the order. A payment counts against the order total if it has payment status "Authorized" or "Acquired".

    The payment method service "Default" should set payment status to "Acquired" by default.

    Are you using the default service or a custom one?

     

  • Jais Edelmann 45 posts 126 karma points
    Sep 04, 2012 @ 10:44
    Jais Edelmann
    0

    Hey Søren, im using the default service and pipeline checkout under the paymentmethod banktransfer.

    I've also just triede to create a payment with only the payment method id without price etc. i still get the security exception that validatepaymentsmadeagainstordertotaltask.execute fails cause of lack of payment coverage.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 04, 2012 @ 11:28
    Søren Spelling Lund
    0

    Could you check the status of the payments on the order in the database and let me know what they are?

    I was unable to repro the behavior with the default XSLT store just now.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 04, 2012 @ 11:37
    Søren Spelling Lund
    0

    Alternatively you can set payment status on the payment manually like so:

    payment.PaymentStatus = PaymentStatus.Get((int) PaymentStatusCode.Acquired);
  • Jais Edelmann 45 posts 126 karma points
    Sep 04, 2012 @ 12:20
    Jais Edelmann
    0

    Awesome sauce everything is working as intend'd now.

  • Jebastin 42 posts 92 karma points
    Nov 11, 2014 @ 08:26
    Jebastin
    0

    I've tried the above solution, but it dint work for me.

    I'm getting the exception below:

    2014-11-11 12:59:38,532 [45] INFO  System.Object - [Thread 23] 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.Invocations.TransactionLibraryInternal_Checkout.InvokeMethodOnTarget()
       at Castle.DynamicProxy.AbstractInvocation.Proceed()
       at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation)
    Payment insufficient to cover order total for OrderGuid 68a7db7b-e447-4894-a371-d553646592a3. Please ensure that payments cover the entire value of the order before checking out. Payments made 0. Order total 13.2000.
    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 ASP._Page_macroScripts_uCommerce_Confirmation_cshtml.Execute()
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
       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)
       at umbraco.presentation.templateControls.Macro.CreateChildControls()
       at System.Web.UI.Control.EnsureChildControls()
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.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 rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
       at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
       at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
       at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
       at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
       at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

    Can you please provide a solution for this?

  • Jebastin 42 posts 92 karma points
    Nov 25, 2014 @ 07:05
    Jebastin
    0
    Solution:
    Open: Umbraco > ucommerce > Pipelines > Checkout.config
    Comment the value 'ValidatePaymentsMadeAgainstOrderTotal'
    <!-- Pipeline Instance -->
            <component id="Checkout"
                       service="UCommerce.Pipelines.IPipeline`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"
                       type="UCommerce.Pipelines.Checkout.CheckoutPipeline, UCommerce.Pipelines">
                <parameters>
                    <tasks>
                        <array>
                            <!--<value>${Checkout.ValidatePaymentsMadeAgainstOrderTotal}</value>-->
                            <value>${Checkout.AssignOrderNumber}</value>
                            <value>${Checkout.CreateCustomer}</value>
                            <value>${Checkout.CreateMemberForCustomer}</value>
                            <value>${Checkout.ConvertBasketToPurchaseOrder}</value>
                            <value>${Checkout.AddAuditTrailForCurrentOrderStatus}</value>
                            <value>${Checkout.SetVoucherUses}</value>
                            <value>${Checkout.ClearBasketInformation}</value>
                            <value>${Checkout.SavePurchaseOrder}</value>
                            <value>${Checkout.SendConfirmationEmail}</value>
                        </array>
                    </tasks>
                </parameters>
            </component>

    Don't forget to uncomment this line while moving on to LIVE.

     

Please Sign in or register to post replies

Write your reply to:

Draft