Ecommerce checkout showed paid before last process

rafik maher asked on October 19, 2017 20:04

Hi guys,

in kentico 10, in the process of steps in shopping cart, when you click on the button in review to go for the final step where is the payment process for paypal or any other process, the products are marked paid. It should show paid only after you make your payments on the final step. I followed the documents and other questions been asked about this subject. Is that a bug in page wizard manager?

Best regards

Recent Answers


Brenden Kehren answered on October 19, 2017 20:25

You need to configure your statuses then and your payment method status. I believe when the order is completed, you can have a specific status selected. I'd start with your statuses first and move on from there.

0 votesVote for this answer Mark as a Correct answer

rafik maher answered on October 19, 2017 22:35

I actually configure the payment status when it success or failed like in PayPal payment method. But the thing is page wizard manager make it paid before going on the final step.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on October 20, 2017 03:08

Do you have a status before the Paid status? when an order is created (the step after the order summary and before the payment screen) it sets the order to the first Status on the list, if that's Paid, or if it has the "Is Paid" set on the status, then this will happen.

0 votesVote for this answer Mark as a Correct answer

rafik maher answered on October 20, 2017 04:21

When you are in summary to review the order and you choose by example payment by PayPal and you click next to process for the payment(in page wizard manager webpart i configure the final step for payment process page.) The system make the order as paid and it send an email of the bill to the Customer before even he start the process of payment in the final step (Payment process) and it clear the cart. And about the status is only configure in PayPal and not anywhere else.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on October 20, 2017 13:37

Do you have PayPal instant payment notification set up? Otherwise it doesn't know if they paid or not and may be setting it to paid when they head there.

https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/configuring-payment-methods/configuring-paypal#ConfiguringPayPal-IPN–InstantPaymentNotification

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 20, 2017 15:43

I'm talking about these statuses.

Image Text

Also the email will be sent whenever the status has a "send notification" checkbox checked. The way the shopping cart works is:

  • add an item to their cart - this creates a shopping cart record with an item cart item
  • proceed to cart,
  • review cart,
  • require login (or not)
  • require billing/shipping info
  • select payment method
  • review order - at this point the information is still a shopping cart record
  • pay for the order - at this point the shopping cart record is created to an order with order items and status is set to paid (default action)
  • fill out payment info and succeed or fail, this will update the status of the order from paid to whatever the status is returned from the payment processor.

If you don't want the default to be paid upon creating the order then create a custom handler to change that status from paid to payment pending. Also check this out related to custom payment related customizations.

0 votesVote for this answer Mark as a Correct answer

rafik maher answered on October 24, 2017 05:47

Do you have a custom code to make sure before last step when it clear the cart and become an order its unchecked the ispaid and put proper status until the customer finish the payment

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on October 24, 2017 15:20

You would want to create a custom implementation of the ShoppingCartInfoProvider and overwrite the method "SetOrderInternal." Now note that this runs whenever an order is Created, or updated. The below may work, you would have to test it.

[assembly: RegisterCustomProvider(typeof(CustomShoppingCartInfoProvider))]
/// <summary>
/// Summary description for CustomShoppingCartInfoProvider
/// </summary>
public class CustomShoppingCartInfoProvider : ShoppingCartInfoProvider
{
    protected override void SetOrderInternal(ShoppingCartInfo cartObj, bool generateInvoice)
    {
        // This actually creats/modifies the order
        base.SetOrderInternal(cartObj, generateInvoice);

        // Grab any newly created orders that are set to paid and unset it.
        if((cartObj.Order.OrderLastModified - cartObj.Order.OrderDate).Seconds < 5 && cartObj.Order.OrderIsPaid)
        {
            cartObj.Order.OrderIsPaid = false;
            OrderInfoProvider.SetOrderInfo(cartObj.Order);
        }
    }
}
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.