Can I Use PayPal for more than one store?
- Posted by admin
- 30 April 2009
- Zen Cart Tutorials
Using PayPal on Multiple Sites
You can use a single PayPal™ account to collect payments from multiple Zen Cart™ sites simply by following the "In Zen Cart™" instructions above, for each site. Zen Cart™ will send override information to PayPal™ to let them know which store to send its notifications to.
If you use your PayPal™ account on non-Zen Cart™ sites or on eBay™, be sure that you have all "taxes" and "shipping" options disabled in your PayPal™ profile; otherwise these charges will be added to your Zen Cart™ orders and cause them to not match, and therefore they won't be released or added to your orders list.
Things to check if it's not working
These are the common configuration errors:
1. If it "was" working, but stopped, make sure PayPal's services are running properly. PayPal Live Server Status
2. Make sure your site is *not* in down-for-maintenance mode.
3. Make sure your site does *not* have password-protection via .htaccess in order to get to the "store" area.
4. Check that the email address you enter for PayPal™ in Zen Cart™ admin matches CaSE-SenSItiVE exactly with your PRIMARY email address setting in your PayPal™ account profile on PayPal's™ site.
5. Is your PayPal™ account "verified" yet?
6. Is your PayPal™ account a "Business" account? (Business is preferred. Premier can be used in some cases. Personal cannot.)
7. Check with your host that port 80 and 443 are open for bidirectional communication.
8. Try accessing http://your_site.com/ipn_main_handler.php with your browser. If you see PHP errors, those will need to be resolved. If you get a white screen, then the first phase of PayPal™ contacting your site isn't encountering errors. This doesn't mean there aren't any, it just means the initial most obvious steps are working.
9. There are two communication testing tools available in the support forum. If you are asking for troubleshooting help, please supply the URL to each of these tools after you have installed them on your site, so we can assess the responses they reveal.
10. Turn on debug logging in your PayPal™ module, and post a link to the zipped log files so they can be analyzed. You'll need to check to be sure that your /includes/modules/payment/paypal/logs folder is marked read/write (chmod 777). Then use your FTP program to access/view those logs and zip-and-upload them for analysis.
11. Check there is no IP block or firewall to prevent PayPal's™ servers from talking to your server (your host should check this, and you should check any blocking you may have done via your control panel. Also check .htaccess for any deny from statements and be sure none of them are addresses related to PayPal™.
* PayPal IP Address List (these should be in your host's firewall whitelist)
* notify.paypal.com (as of February 2008; check the link above for specifics):
* For sandbox testing, also open: ipn.sandbox.paypal.com -> 126.96.36.199
* NOTE: There are others worth checking on PayPal's Go Live Checklist page
12. You may find it helps to Uninstall ("remove") and Re-Install the payment module in Zen Cart™ admin.
13. When you use two PayPal™ accounts to make a simulation, make sure you're using the right account.
14. Check your PayPal™ profile settings on paypal.com
* You need your Instant Payment Notification preferences ON
* Instant Payment Notification URL must be set to the URL of your site's ipn_main_handler.php (ie: http://www.your_site.com/ipn_main_handler.php or http://www.your_site.com/directory/ipn_main_handler.php )
* In Website Payment Preferences, your Return URL should be set to your site's checkout_process page. (ie: http://www.your_site.com/directory/index.php?main_page=checkout_process).
* It is advisable to have Auto Return set to On.
15. Turn off ALL tax and shipping fees in your PayPal™ profile. They will cause the purchase price to mismatch when returning to Zen Cart™.
16. Using your hosting control panel, find the "Error Log" option, and check your server's errorlog entries to see if any attempts to access your site's ipn_main_handler.php file are being denied for any reason.
17. If you have a SEFU or SEO contribution installed, try removing it and testing again. Some are not configured to allow PayPal processing.
18. Prior to v1.3.8, the PayPal™ IPN handler (ipn_main_handler.php) uses its own version of application_top. If you make changes to your application_top.php, be sure to make these same changes (if applicable) in includes/modules/payment/paypal/ipn_application_top.php.
How Does IPN work?
"IPN" = "Instant Payment Notification" ... part of PayPal's™ renamed "Payments Standard" service.
1. Customer places an order on your site
2. For payment, they are taken to a link on PayPal's™ site, where they provide their information and pay for their order.
3. They click a link when finished (or wait 5 seconds) and return to your site.
Meanwhile, between steps 2 and 3 above, PayPal's™ server does this:
1. Paypal's™ server sends a request to your website...which is waiting and listening for connections from PayPal™ to the /ipn_main_handler.php page.
2. Your server sits waiting and listening on ports 80 and 443.
3. When your server receives a request, it attempts to validate and be sure that the PayPal™ data provided matches the order details for which it is intended.
4. If validation passes, the customer's order is released, and it lets the PayPal™ server know that you received their confirmation. This handshaking happens bidirectionally on ports 80 or 443, depending on how it was originated.
5. NOTE: PayPal's™ server will attempt the IPN notification (hourly) for up to four days if it's not successful on the first try. In this case your customer's order will not show up in the Admin until the IPN notification is successful.