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.

  • urmila 18 posts 88 karma points
    Aug 12, 2013 @ 10:28
    urmila
    0

    Can't place order with same email address twice

    Hi all

    I have following scenario.I have created one member with email id for eg "[email protected]" and placed order for that member.Now I am placing order with simillar email id but as anonymous user,so in this case i am getting following error message

    UCommerce.Pipelines.PipelineException was unhandled by user code
      HResult=-2146233088
      Message=Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details.
      Source=UCommerce
      StackTrace:
           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.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting)
           at Castle.Proxies.TransactionLibraryInternalProxy.CreatePayment_callback(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting)
           at Castle.Proxies.Invocations.TransactionLibraryInternal_CreatePayment.InvokeMethodOnTarget()
           at Castle.DynamicProxy.AbstractInvocation.Proceed()
           at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation)
           at Castle.DynamicProxy.AbstractInvocation.Proceed()
           at Castle.Proxies.TransactionLibraryInternalProxy.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting)
           at UCommerce.Api.TransactionLibrary.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting)
           at Luna.Umbraco.Site.Controllers.B2CPlaceOrderSurfaceController.Buy(B2CPlaceOrderCommand command) in c:\Users\147463\Documents\GitHub\LunaHeadwear\Src\Luna.Umbraco.Site\Controllers\B2CPlaceOrderSurfaceController.cs:line 120
           at lambda_method(Closure , ControllerBase , Object[] )
           at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
           at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
           at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
           at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
           at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
           at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
           at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
           at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
           at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
      InnerException: System.InvalidOperationException
           HResult=-2146233079
           Message=Sequence contains more than one element
           Source=NHibernate
           StackTrace:
                at NHibernate.Linq.DefaultQueryProvider.ExecuteQuery(NhLinqExpression nhLinqExpression, IQuery query, NhLinqExpression nhQuery)
                at NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression)
                at NHibernate.Linq.DefaultQueryProvider.Execute[TResult](Expression expression)
                at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source, Expression`1 predicate)
                at UCommerce.EntitiesV2.Repository`1.SingleOrDefault(Expression`1 expression)
                at UCommerce.EntitiesV2.Customer.SingleOrDefault(Expression`1 expression)
                at UCommerce.Pipelines.Checkout.CreateCustomerTask.TryGetCustomerFromEmail(OrderAddress orderAddress)
                at UCommerce.Pipelines.Checkout.CreateCustomerTask.Execute(PurchaseOrder purchaseOrder)
                at UCommerce.Pipelines.Pipeline`1.Execute(T subject)
           InnerException: 

    Can anyone suggeast how to handle this exception? i am using UCommerce 3.0.4.13032 and Umbraco v6.1.1

     

  • Morten Skjoldager 440 posts 1499 karma points
    Aug 16, 2013 @ 10:40
    Morten Skjoldager
    0

    It looks like you try to get an email address from the database. NHibernate throws an exception because you get more than one customer with the same email address (not allowed). It could be a bug in our system as we try to extract the member from Umbraco. 

    Can you please provide data of the uCommerce customer and the umbraco member with the email that gets you in trouble? (There could be corrupted data somehow).

    Out of curriosity, how do you handle customers on your site ? Do they only get created on checkout? 

    Regards

    Morten

  • urmila 18 posts 88 karma points
    Sep 04, 2013 @ 10:49
    urmila
    0

    Hi Morten

    Thank you for your reply and sorry for late response.Our site basically contains 2 types of members B2B members and B2C members(2 groups B2Buser and B2Cuser). B2Bmember will be created only from the backend and B2Cmember will be created only on checkout.. The issue is when we tries to place order by anonymous login using the registered members email id. you can take any email id because it's not working for any email id.Can u think of any solution?

     

    Urmila

  • Jesper Nielsen 141 posts 498 karma points
    Sep 09, 2013 @ 11:14
    Jesper Nielsen
    100

    Hi Urmila,

    The exception occurs because the email adress you use in the request macthes more than one customer in the "uCommerce_Customer" table.

    So please double check your database table for entries where the email adress in not unique.

    Sounds like there might be an issue regarding the creation of your B2C customers. The email address for the customer must be unique! So you must not create a B2C customer with the email address of an existing B2B customer.

    How do you create your B2C customer? The system should prevent this happening.

    Kind regards,

    Jesper

  • urmila 18 posts 88 karma points
    Sep 11, 2013 @ 07:10
    urmila
    0

    Hi Jesper,

    Yes you were right.There were multiple customers getting created for B2C.I did the changes in my code and it solved the problem.

    Thank you..

    Regards,

    Urmila

Please Sign in or register to post replies

Write your reply to:

Draft