Jump to content

PayPal Octa IPN - Multiple WHMCS with one PayPal account


Qarizma

Recommended Posts

We are currently using this in production and it works well. Includes examples for WHMCS. Feel free to use it or modify it, submit PR and issues here:

https://github.com/qarizma/paypal-octa-ipn

 

PayPal Octa IPN

IPN broadcaster for PayPal to support up to eight different IPN hosts. WHMCS used as example.

 

Situation

PayPal provides an IPN service, which will do a callback to your defined IPN link to confirm the payment. This is a process behind the scenes and the customer won't notice anything. The problem is that PayPal only allows one IPN link, which means that you can only run one automated business with this PayPal account. Please note that PayPal permits you to have two PayPal accounts, one Personal account and one Business account.

 

Solution

This Octa IPN script is the solution. Now you can run up to eight different businesses. PayPal allows you to add additional email addresses. Currently there is a limit of eight total email addresses, hence the name Octo. Using this approach you can provide your business a seperate email address for the payments. This script must be hosted on your web server and must be added in your PayPal settings as IPN URL. This script will then proxy the IPN POST to the right business based on the secondary email address.

 

Notification

Below is an example POST from the PayPal IPN. It contains several variables, but the most important ones are receiver_email and business values. This script uses the business value to filter the request and pass it to the right IPN. (This log has been captured from WHMCS)

 

transaction_subject => X
payment_date => 11:47:03 Oct 24, 2016 PDT
txn_type => web_accept
last_name => Doe
residence_country => UK
item_name => Invoice XXX
payment_gross => 
mc_currency => EUR
business => companysecondary@qarizm.com
payment_type => instant
protection_eligibility => Ineligible
verify_sign => X
payer_status => verified
tax => 0.00
payer_email => thisisthecustomer@qarizm.com
txn_id => X
quantity => 1
receiver_email => companyprimary@qarizm.com
first_name => John
payer_id => X
receiver_id => X
item_number => 
payment_status => Completed
payment_fee => 
mc_fee => 0.00
mc_gross => 0.00
custom => 0
charset => windows-1252
notify_version => 3.8
ipn_track_id => 0

 

Installation

Setup and validate extra PayPal email addresses in your account.

Enter the ones that you want to use in the script.

Adjust the IPNs in the script.

If you are using WHMCS please check the steps below to make it work.

 

WHMCS Setup

Go to: Setup - Payments - Payment Gateways - Manage Existing Gateways

Enter in "PayPal Email" one of the secondary email addresses from PayPal that you want to use in this specific WHMCS.

At the end of this email field add a comma, and enter your primary PayPal email address. This is only used for verification and is required.

(More information: http://docs.whmcs.com/PayPal#Invalid_Receiver_Email)

 

Credits

Codeseekah for the original code (http://codeseekah.com).

 

License

MIT License

Link to comment
Share on other sites

  • 2 years later...
1 hour ago, jeffuk said:

Does this still work? I see it hasn't been updated in 3 years. 🙄

perhaps go back to the original author and see what he says... he still seems to be answering questions about the core code... and sometimes with reference to WHMCS too.

https://codeseekah.com/2012/02/11/how-to-setup-multiple-ipn-receivers-in-paypal/

Link to comment
Share on other sites

  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated