Paypal IPN Handler for an Affiliate

4 replies
I am an affiliate for a product(s) where I get paid instantly by Paypal. I would like to send an email to the buyer giving them a special bonus for buying through my link. Can I use a Paypal IPN handler script to send this email? Do I have to be the orignal receiver? Since I am an affiliate I would be not be the original receiver but a second or third receiver.

Any sample scripts or a lead in the right direction would be appriciated.

Thanks,

Michael
#affiliate #handler #ipn #paypal
  • Profile picture of the author ALicenseToCode
    If you can get an IPN for the sale it shouldn't be a problem. That's the big first problem, is it the kind of program where you just get the whole dollar amount for the sale every other sale? If so you might have to request the vendor to put a paypal IPN url on their site for your sales. They should be able to handle that and be more than happy to oblige if you're making sales for them.

    Once you have the url on your site to process the IPN you just need to go grab an IPN Script, there's a good PHP Class Object on Paypal's site that can get you started. You use their class to pull in all the IPN data on your site, then you can pull their email from that script and use the PHP mail() function to send them a mail.

    This is a general outline of what to do, the specifics are kind of complicated but there's plenty of documentation in Paypal's IPN section on their site.
    {{ DiscussionBoard.errors[6667993].message }}
  • Profile picture of the author lisag
    Do you get an email notification from PayPal when the payment is processed?
    Signature

    -- Lisa G

    {{ DiscussionBoard.errors[6713392].message }}
    • Profile picture of the author Michael Travis
      Originally Posted by ALicenseToCode View Post

      If you can get an IPN for the sale it shouldn't be a problem. That's the big first problem, is it the kind of program where you just get the whole dollar amount for the sale every other sale? If so you might have to request the vendor to put a paypal IPN url on their site for your sales. They should be able to handle that and be more than happy to oblige if you're making sales for them.

      Once you have the url on your site to process the IPN you just need to go grab an IPN Script, there's a good PHP Class Object on Paypal's site that can get you started. You use their class to pull in all the IPN data on your site, then you can pull their email from that script and use the PHP mail() function to send them a mail.

      This is a general outline of what to do, the specifics are kind of complicated but there's plenty of documentation in Paypal's IPN section on their site.
      Thank you very much for the information. I will look into the paypal's sample script.

      Originally Posted by lisag View Post

      Do you get an email notification from PayPal when the payment is processed?
      I do get an email notification, but I haven't found a script to process the email and extract the information I want such as buyer's email address and product purchased.

      Thanks,

      Michael
      {{ DiscussionBoard.errors[6714229].message }}
  • Profile picture of the author rhensiong
    You have to be website owner for access paypal IPN Handler. Usually, an affiliate make his own sales letter page, and put opt-in form on the page. Write on your sales page like as this for example :
    "Let me know if you have purchase from me, I will give hundred bonuses for you."
    {{ DiscussionBoard.errors[6714522].message }}

Trending Topics