Knowledgebase

Home » Item #943

My PayPal integration isn't working properly

Item: #943
Date: 18 Oct 2006
Applies to
v5
v6

Question

I've setup PayPal with my CactuShop but it is not working properly. What's up and how do I fix it?

Answer

We've seen a number of problems with PayPal integrations, more so than for other payment gateways. Here are the various issues we've come across, and how to fix them.

1. Check your PayPal settings and ensure IPN is properly setup

The most common problem we see with PayPal integrations is that people have not set up IPN (Instant Payment Notification) properly on the PayPal account they are using. Please review the CactuShop PDF manual for the version of CactuShop you're using for more information. The callback URL must be exactly right - call it directly in a browser to make sure it does not give a 404 (you should see a blank page).

Remember that the callback is not designed to be viewed in a browser; it is purely a mechanism for PayPal to contact the CactuShop installation and set the order as complete. Do not confuse the return URL with the notification URL. The return URL is where the customer is sent to after an order. The notification URL is the callback that is used by PayPal to communicate a successful transaction to CactuShop.

2. Callback generates an error

If you get a callback error for any payment gateway, the first thing to check is that your site is sending email properly. Because the callback is the point where CactuShop sends order confirmation emails, any error generated by the mail send will cause the callback to fail.

The easiest way to do a basic mail check on your site is to sign yourself up to the mailing list on that web site and see if you get an opt-in verification sent to you. If this works, it doesn't automatically mean that the error at callback is not mail related, but it at least verifies that your emailmethod and mailserver config settings are correct.

If you do get an error, you need to fix this first before proceeding. Check with your host that they support the method that you're trying to use to send email, and that the IP or address of the mailserver you're using is correct.

If the mail server requires SMTP authentication, then v6 allows you to enter the username and password in the config settings. In v5, the functions.asp would have to be modified and have the extra values added in.

3. XML component

PayPal uses a double-step callback with a verification step that is designed to prevent order tampering. The callback script receives some values from PayPal, formulates a request which is posted to PayPal and then reads the XML response.

To ensure this part is not failing, ensure that the XML component you have set to use is installed and working on your hosting. If you see 'CactuShop News' when you first log in each day, then use the same component that this uses. If this feature doesn't work, it suggests your host has some kind of firewall in place to stop scripts connecting by HTTP outside of the web. In this case, you will need to disable the XML part of the PayPal callback. In v6.041 onwards, this can be done by setting the PAYPAL_ValidateCommand config setting to blank. If you're using an earlier version of this script, we suggest you upgrade if having XML problems so you can use this feature.

4. PayPay currency not supported

We have seen some problems where the callback script is called, but apparently no form values are passed to it. This appears to be caused by settings on the PayPal account.

In 'Payment Preferences' find the option 'Block payments sent to me in a currency I do not hold'. This should always be set to "No,
accept them and convert them to US Dollars (or could be British Pounds or another currency depending on your default currency).

5. Business / receiver email

CactuShop will check that the email passed back from PayPal as the receiver matches the PP_Business config setting. Orders where they don't match will not successfully call back. Make sure your PayPal account that is receiving the money matches the PP_Business setting in the CactuShop config settings.

6. "There is a problem with the PayPal email address supplied by the seller" message from PayPal

PayPal apparently did an upgrade to their system in early 2007 that has some unforeseen side effects, one of which is this error above during checkout. Assuming your PayPal email address is setup correctly, then there is a work around to fix it.

Open up the payment/gateway_paypal.asp script and find the hidden fields section starting around line 46. Add this new hidden field in:

<input type="hidden" name="no_shipping" value="0">

PayPal claims to have fixed this issue now, but as of March 2007 we are still seeing it, and the above fix seems to solve it.


These various issues are all ones we have seen before on PayPal and very few fall outside of this. If you work through and check these points carefully this will almost certainly fix any PayPal issues you are having.

Can't find the answer you need? Click here to open a support ticket.

« Back