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 for support.

  • Javier Barrera 34 posts 85 karma points
    Jan 15, 2013 @ 00:43
    Javier Barrera

    uCommerce 3 and UCommerce.Xslt.Library.Checkout()

    Hello, I've implimented a few e-commerce sites using uCommerce 2. To save time, I've created a few different libraries out to help manage the basket and perform updates. I've also created a custom Payment Method Service as described in the following tutorial.

    In uCommerce 3, I noticed that I had to make some modifications to my libraries as some methods have changed. In my shopping cart, when I get to the end of the checkout process, I execute:


    However, I get an error: Payment insufficient to cover order total for OrderGuid 39c8e04b-81e1-4c69-85f1-8bd1393673c2. Please ensure that payments cover the entire value of the order before checking out.

    My question is, has something changed in uCommerce 3 that I need to impliment with my custom Payment Method Service? Is there something else I need to perform before I checkout? I do execute UCommerce.Xslt.Library.ExecuteBasketPipeline(); to make sure that everything has been updated.

  • Nickolaj Lundgreen 233 posts 1132 karma points
    Jan 15, 2013 @ 09:23
    Nickolaj Lundgreen
  • Javier Barrera 34 posts 85 karma points
    Jan 16, 2013 @ 21:13
    Javier Barrera

    Thanks @Nickolaj for the link - I'm not sure how I didn't find that. It still doesn't appear to solve my problem, but it may be something unrelated all toghether. I'll update this status shortly.

  • Javier Barrera 34 posts 85 karma points
    Jan 16, 2013 @ 21:49
    Javier Barrera

    I'm starting to narrow this down to an error that happens during Library.CreatePayment(). The code that I'm using is the following:

    PaymentMethod method = PaymentMethod.SingleOrDefault(x => x.PaymentMethodId == helper.DefaultPaymentMethodID);
    decimal total = orderbasket.PurchaseOrder.OrderTotal != null ? (decimal)orderbasket.PurchaseOrder.OrderTotal : 0.00M;
    Library.CreatePayment(method.PaymentMethodId, total, true, false);

    With the error now stating: "not-null property references a null or transient value UCommerce.EntitiesV2.Payment.PaymentMethodName." I have tried to explicitly set this in my custom PaymentMethodService under CreatePayment, however it doesn't appear to change this error in this context.

            public Payment CreatePayment(PaymentRequest request)
                var payment = new Payment
                    TransactionId = Guid.NewGuid().ToString(),
                    PaymentMethod = request.PaymentMethod,
                    PaymentMethodName = request.PaymentMethod.Name,
                    Created = DateTime.Now,
                    Fee = CalculatePaymentFee(request).Value,
                    FeePercentage = request.PaymentMethod.FeePercent,
                    PaymentStatus = PaymentStatus.SingleOrDefault(x => x.Name == "Authorized"),
                    Amount = request.Amount.Value

                return payment;

  • Javier Barrera 34 posts 85 karma points
    Jan 16, 2013 @ 21:53
    Javier Barrera
  • Javier Barrera 34 posts 85 karma points
    Jan 16, 2013 @ 22:32
    Javier Barrera

    I found the issue. It had to do with an incorrect configuration with my custom payment service. In the DB, I had an incorrect value for PaymentMethodServiceName (there were spaces). Updating this solved my issues.

Please Sign in or register to post replies

Write your reply to: