Developer forum

Forum » Ecommerce - Standard features » Add a Payment step in the checkout process without converting the cart to order

Add a Payment step in the checkout process without converting the cart to order

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I am trying to setup a checkout process allowing for a Payment step without converting the cart to order.

I am using Ebiz Charge (not sure if it's relevant) and right now, the Payment step is actually in the Checkout step, meaning the cart has already been converted to order, although I also noticed this behavior is not consistent.

My assumption is that based on the payment response, the "Cart" might be left as "Order" or converted back to "Cart" if the Payment response reads "unsuccessful" (or something equivalent).

Not sure how to test this though.

Can someone enlighten me on this subject?

Thanks,

Adrian


Replies

 
Nicolai Pedersen
Reply

Hi Adrian

When you get to the checkout step, Dynamicweb gives the cart an ordernumber instead of a cart id - because the payment gateways requires the orderid to process the order. At that stage, the [OrderComplete] is false. When the checkouthandler is done (The payment has gone through succesfully), the [OrderComplete] is set to true and the order might have an [OrderTransactionNumber] (If the checkouthandler creates one).

If the checkouthandler does not return succesfully, the order is given a new cartid.

If you want to keep the cart as a cart after checkout, in the checkoutdoneOrderIsComplete notification, you can do some funny stuff to make it a cart again... Not sure it is a good idea though.

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Thanks Nicolai,

I would avoid any funny stuff as well.

I was wondering if there are any settings I am missing.

I will look in the Payment logs to find out the response for each case.

Thank you,

Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

One more thing.

Is there any way (meaning a link) that can convert the order back to cart if I already got to the payment step?

Let's assume something like "Edit order" in the Payment Step ?

I know it might sound silly but I am expecting my customer to ask for this.

Thanks,

Adrian

 
Nicolai Pedersen
Reply

If you have the checkbox "Keep cart in context on checkout" set, linking back to the site will give you the cart if you just link back to the cart page.

 

You must be logged in to post in the forum