Knowledge BaseCustom Payment Module Example: DocData

Custom Payment Module Example: DocData

Retrieving the Correct Status

Now that we wrote the code to send a user successfully, we must also make sure we update our orders with the correct status after they have been paid or the status changes for some other reason. In DocData, like most other PSP's we can do this by letting the PSP call the confirm page (paymentConfirm.aspx) this page will call the confirm pipeline to execute steps needed in the event of a changed status.
 
The order confirm page by default expects that the 'ID' request parameter is filled with the 'orderId'. In the case of DocData this is true, but this may not always be the case. If you want to change this behavior you can do this by creating a custom 'PaymentPageHelper' class. This class will determine from where in the 'HttpRequest' the 'orderId' is fetched. This class should inherit from the 'IPaymentPageHelper' interface.
 
For now it is only possible to have a single implementation of this class, as configured in unity. 
Knowledge BaseCustom Payment Module Example: DocData