Knowledge BaseCustom Payment Module Example: DocData

Custom Payment Module Example: DocData

Debug Step

Testing of a PSP is very important, but one of the hurdles to overtake is that it can be hard to test a PSP while still in the development phase. This is because in order to test the full process the confirm call has to be made by the PSP provider to the web server that is running the Sana Commerce shop. In a development environment it is often that the server/workstation running the site is not reachable to receive this request.
 
Because of the nature of DocData (to get the status of an order, we need to make a request to DocData instead of the other way around) we can create a way to test a large part of the flow using a special debug step (DocDataConfirmationDebug).
 
This step will mimic a call from the PSP and will get the status from DocData itself, allow a lot more to be tested. But it is important to disable this step when deploying to a live or beta environment. This can be done using the 'DebugDomains' setting in the configuration.
Knowledge BaseCustom Payment Module Example: DocData