Developer forum

Forum » Ecommerce - Standard features » Returned data from DIBS payment system

Returned data from DIBS payment system

Olga Petrova
Reply

Hi, all

When the client has bought something he/she is redirected to the Confirmation page. Payment system returns some parameters using POST method (Cart type, number and so on). And I must use these returned values to send them to the client in the confirmation email.

 

How could it be done? Should I use some template extender or something else?

 

Thanks!


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

When using Cartv2 and Dynamicweb DIBS checkout handler, you get some information from the call back stamped on the order. These information are available in the template. Use DwTemplateTags to see what is available. These information includes transaction ID etc.

 

If you need further information, you need to collect them in the callback from the gateway. That is handled by a server-to-server request from DIBS to the DW server. When that callback is done, Dynamicweb saves the order (Order.Save()). That raises a OrderSaved notification you can subscribe to:

 

http://developer.dynamicweb-cms.com/api8/#Dynamicweb~Dynamicweb.Notifications.eCommerce+Order~AfterSave.html

 

In the subscribe, make a conditional to see if you have a httpcontext and if you have a value in HttpContext.Current.Request["transact"];

If so, you have a callback from DIBS, and then you can find your additional information in the POST Collection of that request.

 

You make some code that saves that on custom fields on the order:

http://manual.dynamicweb-cms.com/Dynamicweb-On-line-Manual/Management-Center/eCommerce/Orders/Order-fields.aspx

 

Then you need to create a order template extender that renders the information that you collected in the callback:

http://developer.dynamicweb-cms.com/api8/#Dynamicweb~Dynamicweb.Extensibility.TemplateExtender.html

 

Tricky task - hope this will guide you in the right direction.

 

BR Nicolai

Votes for this answer: 1
 
Olga Petrova
Reply

Thank you very much, Nicolai. You have helped me a lot! :)

 

You must be logged in to post in the forum