Developer forum

Forum » Development » Finish the transaction at a custom CheckoutHandler

Finish the transaction at a custom CheckoutHandler

Tomas Gomez
Reply

Hi,

We are implementing a custom CheckoutHandler. We are unsure about which functions we need to call to properly mananage the response of the transaction.

1) When the payment is approved: We use SetOrderComplete() and the order is displayed as completed but its name is "CART000" instead of "ORDER000". There are other candidates (SaveOrderComplete, UpdateCartToOrder, UpdateExistOrderFromCartToOrder). What are their differences and which ones should we use?

2) When the payment is rejected: We use Errors.Add(the_error) and DowngradeToCart(). Do we need to add any other function?

Regards,
Tomas


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
 
Tomas Gomez
Reply

Hi Nicolai,

Thanks for the help!

I added the call to CheckoutDone() and the function and call to SetOrderSucceeded() but still there is something missing as the order is still named as CART0000 instead of ORDER0000

In your code there are no calls to SaveOrderComplete, UpdateCartToOrder or UpdateExistOrderFromCartToOrder. Neither in StripeCheckout.cs that I'm using as example.

Which function/s should be called to get the order renamed as ORDER0000? Is there any other thing that I should check to ensure that the order is proprly completed?

Regards,
Tomas

 

 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Tomas

When the checkout starts, not when it completes, the order is changed from a cart to an order and changes its number. So maybe take a look at the StartCheckout method in Quickpay and in your own to see about differences.

 

You must be logged in to post in the forum