Integrating Sage 50 With an external payment processor

SUGGESTED

I am attempting to integrate an external payment processor with Sage 50.  Does anyone know what needs to be written so that Sage 50 shows the entry as paid and is associated with a transaction in the same fashion that it does with Sage Payment Solutions?