What your site needs to do is be able to access the PayPal (or other payment system if applicable) API. With PayPal, the API allows you to track a particular transactions progress. If a transaction fails/completes successfully, PayPal will send the transaction information to a page on your website which allows you to then process it however you wish to (using PHP, mostly).
The way most people would do it is to store that information into a database (MySQL for example) which can then be accessed later via various other methods. Sourcemod can access MySQL databases pretty easily in-fact!
However this can be a somewhat complex system to implement depending on what you want/need.