Developer forum

Forum » Development » CheckoutHandlers - Using a proxy page and return

CheckoutHandlers - Using a proxy page and return

Diogo Lino
Reply

Hello,

When integrating CartV2 checkout handlers with some payment providers I'm using an ASHX file in the middle, where I receive the submission from the CheckoutHandler.StartCheckout() and then contact the payment provider.

Correct me if I'm wrong, but to return again to the checkout proccess I only need to use the request CheckoutHandlerOrderID=ORDERxx (the CheckoutHandler.OrderIdRequestName property) and it enters on the CheckoutHandler.Redirect() method.

I receive a TransactionNumber and a GatewayResult for the order on the ASHX and try to save them on the Order object using the methods Save() and UpdateGatewayResult() respectively, the values are saved on the database, but after redirecting to the CheckoutHandler.Redirect() method those values are deleted / reset by Dynamicweb.

As a workaround I send them by request, encrypting them for security reasons, but I ask if there is a better way, because also remains on browser history the URL &CheckoutHandlerOrderID=ORDERxx&PaymentStatus=Ok&TransactionNumber=xxxxxx and a user can try to change a PaymentStatus from Error to Ok.

Is this the best approach to work with checkout handlers and return to them when using an ASHX file in the middle?

 

Thanks,

Diogo

 


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Diogo

 

I think you should take a look at the DIBS checkout handler in the source code here:

http://developer.dynamicweb-cms.com/downloads/source-code.aspx (Dynamicweb.eCommerce.Cart.CheckoutHandlers.zip)

 

It uses a callback, and that is handled by the checkout handler it self.

 

Also if the order is not saved and persisted it sound like you have forgotten to call CheckoutDone it the right place. Have a look at the source and see how it is handled.

 

You should definitely not send the status and transaction number to the clients browser.

 

BR Nicolai

 

You must be logged in to post in the forum