[FYI: I'm referencing to this documentation https://wiki.foxycart.com/gateways/paypal/express_checkout]
So we have 2 Shops (that might be already the problem, but stick with me and assume that is needed for now). As a company we have one paypal account, but of course want to be able to accept payments via paypal in both shops. Unfortunately paypal only allows you to have one Instant Payment Notification (IPN) url. (we would need to add both urls shopA.foxycart.com & shopB.foxycart.com into it).
Apart from the option to migrate to one shop or create another paypal account(need to see if this is a valid option in terms of legal aspects etc.), there are two options on foxycards side to support this and i wanted to ask what you think about itOption 1
- Implement middleware to broadcast a request from Paypal to both urls on foxycards side
. So we will enter something like "ourserver.com/api/shop" into paypals IPN setting and this route will broadcast the request 1:1 to both foxycart urls. Do you think that could be problematic (as only one shop would actually have the valid transaction fullfilled) ?Option 2
- As stated in this forum post on paypal(https://www.paypal-community.com/t5/Selling-on-your-website/Setting-up-multiple-IPN-s/td-p/397504?profile.language=en-gb
) you could also dynamically set the IPN url from your system
. In this case not only would the paypal setup get easier(as the store owner would not need to add the IPN url into paypal) but also it would automatically solve our use case, as now each shop would automatically redirect to the correct url. However, i don't know how complicated this is on your end and of course how well it works in practice.