Support

Home Forums Event Espresso Premium PayPal Standard IPN Errors

PayPal Standard IPN Errors

Posted: May 6, 2013 at 3:51 pm


Marko Geisler

May 6, 2013 at 3:51 pm

Hey there,

i recently updated to the latest version of EE (3.1.32.), now my customers tell me they cannot pay via Paypal.

I’m already using the txnpage.php template for the transaction page, which is publicly visable. Turning on debugging of EE and the PayPal Sandbox and trying to enter the notify_url in the IPN Simulator results in the following error on developers.paypal.com

“IPN Delivery Failed:503 Service Temporarily Unavailable”.

Checking the paypal.ipn_results.log, i get the following log:

[05/06/2013 11:43 PM] – Errors from IPN Validation:

Using BUILT-IN PHP curl methods
Success Setting host: https://www.sandbox.paypal.com/cgi-bin/webscr
Success Setting request type to post
Success Setting post fields: cmd=_notify-validate
Success Setting Fain On Error
Success Setting return transfer
Success Setting Timeout
Success Setting verbose mode
Errors resulting from the execution of curl transfer: [05/06/2013 11:43 PM] – FAIL: IPN Validation Failed . /cgi-bin/webscr : http://www.sandbox.paypal.com
IPN POST Vars from gateway:

IPN Response from gateway Server:
INVALID

Hope you can help 🙂

Best regards,
Marko


Josh

  • Support Staff

May 7, 2013 at 7:26 am

Hi Marko,

When the IPN tester throws the “IPN Delivery Failed:503 Service Temporarily Unavailable” error, it is usually caused by having the PayPal setting in Event Espresso>Payment Settings set to live mode. In order to use the IPN simulator, you’ll need to make sure that it’s set to sandbox mode, and has a sandbox account ID entered.

If the issue is they are not able to pay at all, it may be related to the JavaScript error on the page that displays the PayPal button. If you do a test registration and check the page that has the PayPal button in Firebug or the Web inspector, you’ll see this error in the console:

Uncaught ReferenceError: jQuery is not defined 

This is usually the result from loading a custom version of jQuery, which can lead to conflicts. I’d suggest changing the theme (or plugin) that’s loading the custom version of jQuery to make it so it uses the version of jQuery that is bundled with WordPress. Here is a reference that may help:

http://pippinsplugins.com/why-loading-your-own-jquery-is-irresponsible/


Marko Geisler

May 7, 2013 at 1:37 pm

Hey Josh,

thanks for you answers.

PayPal Gateway is set to Debug, i entered the emailadress of a sandbox account from https://developer.paypal.com/webapps/developer/applications (they seem to have recently changed the dev site).

I was using the “Use Google Libraries” Plugin to load the scripts etc. from Google, but even when i deactivate that plugin, the errors above still remain.


Josh

  • Support Staff

May 7, 2013 at 6:41 pm

PayPal did indeed change their dev site. Anyway, it looks like the “jQuery is not defined” error is from a jQuery dependent script being loaded before the jQuery library is loaded.

You can fix this by moving the code that outputs:

<script type="text/javascript" src="http://www.elbe-erlebnistoerns.de/wp-content/themes/magazine-premium/js/jquery.ui.datepicker-de.js"></script>

*after* the wp_head() function in the theme’s header.php file.

Here is a link to a reference that may help:

http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/


Marko Geisler

May 7, 2013 at 11:38 pm

I just removed that script for now, but nothing changed 😉
(I normally need that one, because Event Espresso hasn’t the feature to use a translated version of the datepicker)

I got this here from the espresso_log.txt, which is written directly after clicking at the IPN simulator:

[ 2013-05-08 07:33:28 ] process_payments.php -> event_espresso_txn
Payment for: Geisler, Marko|| registration id: 44-5189dc75d7f83|| transaction details: a:7:{s:7:"page_id";s:2:"84";s:2:"id";s:3:"211";s:4:"r_id";s:16:"44-5189dc75d7f83";s:8:"event_id";s:2:"44";s:15:"attendee_action";s:12:"post_payment";s:11:"form_action";s:7:"payment";s:4:"type";s:6:"paypal";}


Marko Geisler

May 7, 2013 at 11:47 pm

But the Error-Message in the paypal.ipn_results.log is still the same…


Marko Geisler

May 8, 2013 at 2:34 am

Okay, i googled a lot, and found that paypal changed the header-requirements, and gives you a 503, when you dont match that requirements.

i added the following in the gateway/PayPal/PayPal.php after line 85:

$error["set_http_version"] = curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); //marko
$error["set_http_header"] =curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close')); //marko

By adding this, the PayPal IPN Simulator tells me it was successfull, and the paypal.ipn_results.log tells me, it verified the IPN successfully.

BUT: The payment listed under events->attendees is still marked as incomplete


Marko Geisler

May 8, 2013 at 3:22 am

https://ppmts.custhelp.com/app/answers/detail/a_id/926/

Thats the article i found, the part under “PLEASE NOTE” with “if (strcmp (trim($res), “VERIFIED”) == 0) {” isn’t implemented right now, but changing the sourcecode by myself didn’t solved the problem…

I’ll be in the EE-IRC-Channel today, maybe thats easier to communicate 🙂


Josh

  • Support Staff

May 8, 2013 at 9:53 am

Hi Marko,

Are you still having issues with the PayPal IPN or is this resolved?

With the datepicker script, you don’t need to remove it, it will work as expected if you move it below the wp_head() function so that it loads on the page *after* the jQuery library loads.


Marko Geisler

May 8, 2013 at 10:03 am

The error is still there. You can find me in IRC atm 😉


Josh

  • Support Staff

May 8, 2013 at 10:27 am

Hi Marko,

Can you check to see if cURL is installed on your server? The Event Espresso>System status page will check and report whether cURL is enabled.


Marko Geisler

May 8, 2013 at 10:47 am

It is.


Josh

  • Support Staff

May 8, 2013 at 11:23 am

Hi Marko,

I’ve opened a ticket and added what you’ve reported here. I’ll let you know what the dev team finds.


Marko Geisler

May 8, 2013 at 12:02 pm

Hey Josh,

i think apina found a hint to the solution…

I just renamed the languages-folder inside the uploads/espresso/ folder, and now the paypal ipn were working again, just checked with a live payment with a ticketprice of 0,01€.

Who would have thought of that?

I didnt update the language-files, when i updated event espresso… let me check if the error comes up again if i add a current version of the language-files…


Marko Geisler

May 8, 2013 at 12:14 pm

Just loaded the current translation-files from github… Everything seems fine…

Okay… *sighs*

There isn’t a way to automatically load the current version from github, right? Or check, if one uses an outdated version?


Josh

  • Support Staff

May 9, 2013 at 8:39 am

Hi Marko,

The older translation files would not have caused IPN errors, however, older gateway files and/or template files in /wp-content/uploads/espresso/templates and/or /wp-content/uploads/espresso/gateways could cause problems if left un-updated after doing an update.

In Event Espresso>Template settings, there is a box at the bottom of the page that will let you know whether there are templates copied over to the alternate templates location. There is a warning message that displays at the bottom of Event Espresso>Payment settings that will display if it detects files in the alternate gateways folder.

With the language files, you’re correct, at this time there isn’t a detection mechanism that checks which version of the file is there or runs an update. In practice many folks tend to customize their language files, so an auto update feature for the language files would need to be an opt-in feature. I’ll create a ticket based on your feedback here.


Marko Geisler

May 9, 2013 at 3:26 pm

Hey Josh,

you say that outdated language files cannot cause IPN Errors… But this is indeed the case.

One of the first things i did was renaming the template and gateway-folders in the uploads/espresso/ folder. This did not solve the problem… renaming the language-folder there did indeed solve the problem. *sighs*


Josh

  • Support Staff

May 9, 2013 at 4:10 pm

Hi Marko,

How does a language file cause an IPN to fail?


Marko Geisler

May 9, 2013 at 11:57 pm

I dunno, but the outdated language file also caused that when i openend the url behind the (payment_url)-shortcode, that on that page the paypal button wasn’t loaded (everything but the payment options).

So maybe a few missing strings stop the page from loading (completely)? *guesses*


Josh

  • Support Staff

May 10, 2013 at 11:54 am

A missing translation string would make it so it wasn’t translated, it will fall back to what’s in the plugin.

To test your theory out about the IPN failing due to a translation file not being up to date I ran some registrations and tested the PayPal IPN while having the WP Pig Latin plugin activated.

This will translate every string that has a translation function attached to it. So in the case where there’s a string that shouldn’t be translated (which would break something if it gets translated) you’d see stuff break since the pig latin plugin translates everything. In the tests I ran, the IPN was valid and the payments went through as expected.

If you set up your outdated language file on a test server with wp debug on and run a few tests you may be able to narrow down/rule out the issues you think it’s causing.

The support post ‘PayPal Standard IPN Errors’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso