"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.
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).
"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.
My code:
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...
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
is working on a reply...