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.

  • Søren Kottal 713 posts 4571 karma points MVP 6x c-trib
    Dec 10, 2014 @ 13:01
    Søren Kottal
    0

    "Sequence contains more than one element" on TransactionLibrary.CreatePayment

    I am trying to add a "payment-less" payment provider to an exists ucommerce shop. But when I create the payment (using TransactionLibrary.CreatePayment(paymentId)) I get an error saying "Sequence contains more than one element".

     

    The normal paymentprovider (through ePay) still works.

     

    [InvalidOperationException: Sekvensen indeholder mere end ét element]
       NHibernate.Linq.DefaultQueryProvider.ExecuteQuery(NhLinqExpression nhLinqExpression, IQuery query, NhLinqExpression nhQuery) +598
       NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression) +133
       NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression) +75
       System.Linq.Queryable.SingleOrDefault(IQueryable`1 source, Expression`1 predicate) +490
       UCommerce.EntitiesV2.Customer.SingleOrDefault(Expression`1 expression) +184
       UCommerce.Pipelines.Checkout.CreateCustomerTask.Execute(PurchaseOrder purchaseOrder) +79
       UCommerce.Pipelines.Pipeline`1.Execute(T subject) +275
    
    [PipelineException: Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details.]
       UCommerce.Pipelines.Pipeline`1.Execute(T subject) +513
       UCommerce.Transactions.Payments.DefaultPaymentMethodService.RequestPayment(PaymentRequest request) +285
       UCommerce.Transactions.TransactionLibraryInternal.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) +1568
       Castle.Proxies.TransactionLibraryInternalProxy.CreatePayment_callback(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) +40
       Castle.Proxies.Invocations.TransactionLibraryInternal_CreatePayment.InvokeMethodOnTarget() +267
       Castle.DynamicProxy.AbstractInvocation.Proceed() +116
       UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation) +599
       Castle.DynamicProxy.AbstractInvocation.Proceed() +604
       Castle.Proxies.TransactionLibraryInternalProxy.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) +329
       UCommerce.Api.TransactionLibrary.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting) +206
       ASP._Page_Views_Basket_cshtml.Execute() in d:\_SK\Dokumenter\Ovethi\dæk.dk\Views\Basket.cshtml:166
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +181
       StackExchange.Profiling.MVCHelpers.WrappedView.Render(ViewContext viewContext, TextWriter writer) +295
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378
       System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +33
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854684
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854684
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +265
       System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +854492
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__19() +40
       System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +65
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +51
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +51
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
  • Søren Kottal 713 posts 4571 karma points MVP 6x c-trib
    Dec 10, 2014 @ 13:02
    Søren Kottal
    0

    My code:

     

            
            TransactionLibrary.CreateShipment(11, overwriteExisting: true);
         //   TransactionLibrary.ExecuteBasketPipeline();
            var paymentId = 8;
            if (request.Form["payment"] == "Finansiering") {
                paymentId = 9;
            }
            else {
            }
    
                TransactionLibrary.CreatePayment(paymentId);
    
                TransactionLibrary.RequestPayments();
            TransactionLibrary.ExecuteBasketPipeline();
    
            HttpContext.Current.Response.Redirect("/shop/kvittering/");
    
    
  • Søren Kottal 713 posts 4571 karma points MVP 6x c-trib
    Dec 10, 2014 @ 13:05
    Søren Kottal
    0

    This is from umbracoLog in the DB

     

    Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details.

    UCommerce.Pipelines.PipelineExecutionResult Execute(T)

       ved UCommerce.Pipelines.Pipeline`1.Execute(T subject)

       ved UCommerce.Transactions.Payments.DefaultPaymentMethodService.RequestPayment(PaymentRequest request)

       ved UCommerce.Transactions.TransactionLibraryInternal.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting)

       ved Castle.Proxies.TransactionLibraryInternalProxy.CreatePayment_callback(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting)

       ved Castle.Proxies.Invocations.TransactionLibraryInternal_CreatePayment.InvokeMethodOnTarget()

       ved Castle.DynamicProxy.AbstractInvocation.Proceed()

       ved UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation)

    Sekvensen indeholder mere end ét element

    System.Object ExecuteQuery(NHibernate.Linq.NhLinqExpression, NHibernate.IQuery, NHibernate.Linq.NhLinqExpression)

       ved NHibernate.Linq.DefaultQueryProvider.ExecuteQuery(NhLinqExpression nhLinqExpression, IQuery query, NhLinqExpression nhQuery)

       ved NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression)

       ved NHibernate.Linq.DefaultQueryProvider.Execute[TResult](Expression expression)

       ved System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source, Expression`1 predicate)

       ved UCommerce.EntitiesV2.Customer.SingleOrDefault(Expression`1 expression)

       ved UCommerce.Pipelines.Checkout.CreateCustomerTask.Execute(PurchaseOrder purchaseOrder)

       ved UCommerce.Pipelines.Pipeline`1.Execute(T subject)

       ved UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation)

       ved Castle.DynamicProxy.AbstractInvocation.Proceed()

       ved Castle.Proxies.TransactionLibraryInternalProxy.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting)

       ved UCommerce.Api.TransactionLibrary.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting)

       ved ASP._Page_Views_Basket_cshtml.Execute()

       ved System.Web.WebPages.WebPageBase.ExecutePageHierarchy()

       ved System.Web.Mvc.WebViewPage.ExecutePageHierarchy()

       ved System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)

       ved StackExchange.Profiling.MVCHelpers.WrappedView.Render(ViewContext viewContext, TextWriter writer)

       ved System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)

       ved System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17()

       ved System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)

       ved System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)

       ved System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)

       ved System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)

       ved System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__19()

       ved System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()

       ved System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)

       ved System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)

       ved System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)

       ved System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult)

       ved System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass...

  • Martin 181 posts 740 karma points
    Dec 11, 2014 @ 16:15
    Martin
    0

    Hi Søren,

    It seems something is going wrong in the pipeline task "CreateCustomerTask". Appearently more than one customer with your identifier exists in this table. I can't precisely remember how this tasks works but I can try to take a look into it (Unless it's not the default task of uCommerce).

    Best regards
    Martin 

Please Sign in or register to post replies

Write your reply to:

Draft