290968
Shouldn't be that hard. Most shopping carts use a return script, meaning you can declare a script that is to be run after the payment is accepted. Simply create a script that changes a members group from a non-paying to paying and include some type of referrer check to ensure someone isn't trying to call the script directly.