Php code for member get member

Is there some php code I can use on a Wordpress site I made to add a member get member offer? (Where on completing a purchase a customer is offered on the thank you page x% off next purchase if a friend purchases?)

Sponsor our Newsletter | Privacy Policy | Terms of Service