Forums

PayPal IPN Issues

johnoathome 29 Sep, 2015
Hi,

I subscribed to the paypal ultimate actions and have been making some progress getting things set up.

I started with the demo form and modified it a bit to suit my needs but I've got a couple of issues that are defeating me.

Issue 1 - IPN resent after successful verification

For testing, I set up a bunch of emails to fire off.

1. On the IPN event firing. This email is sent when the event is called, regardless of success of failure
2. On IPN verified
3. On IPN verified and successful DB read
4. On IPN invalid
5. On IPN error

When I post a transaction to the sandbox, emails 1,2 and 3 are sent, so all good.

However shortly after, email 1 is sent again followed by email 4 (invalid).

It would appear the listener isn't notifying PayPal that it has received the successful verification so it sends it again, but this is just a guess. I supposeI can work around it, but I'd really like to have an notification set up for invalid IPN transactions and the way it is at the moment even the verified transactions generate an invalid event.

Issue 2 - Overriding the profile IPN notification URL

According to the documentation, I should be able to override the IPN notification url set in the profile by appending the notify_url parameter. The only place I can see to put this is in the additional parameters for the PayPal redirect action. I've tried using both raw and urlencoded strings, but no matter what I do, the IPN is sent to the IPN notification url set in the profile.

Appreciate any tips on how to move forward with these issues.

Thanks

John
GreyHead 29 Sep, 2015
Hi John,

Please see this FAQ for setting up the dynamic Notify URL

There's no obvious reason why you would bet repeated emails. It is possible either that PayPal is sending more than one message - unlikely if the first one was successful; or that there is a loop somewhere and the action is being reloaded, or the URL called again??

Checking the timing and the data submitted may give some more clues about exactly what is happening.

Bob
johnoathome 29 Sep, 2015
Hi Bob,

Thanks as always for the prompt response.

I should be able to get the notify_url working using the faq.

Regarding the IPN action firing multiple times, I checked the IPN history in my PayPal profile and confirm the messages are only being sent once. I went through my configuration and couldn't find any issues so in the end I just stood up a fresh site to test this. Here are the steps:

1. New install of Joomla 3.4.3 with the default prostar template
2. Install Chonoforms 5.0.10 - no other packages
3. Restore the form to the test site.
4. Test the form

The results is that the ipn event fires multiple times. Sometimes it returns success followed by failure and other times it returns multiple successes.

The form itself is just the demo form with the db actions removed and some additional email actions added for testing. It doesn't get much more basic than this.

I've also tested with a live setup to confirm this isn't just a sandbox issue. The result is about the same, except instead of getting a second invalid message there are multiple success messages - between 4 and 5.

I will PM you details of the test site. I'd appreciate it if you could have a quick look.

Thanks
John
GreyHead 29 Sep, 2015
Hi John,

I ran a couple of tests and I am not seeing the email duplication so far. I've got just the first email and an 'On Success' one. I added a dump of the form data to the first one as that may help diagnosis.

There is possibly a bug in the Sandbox mode as the action checks for the cURL response being 'VERIFIED' and iirc that doesn't happen in the SandBox.The logic is:

If no cURL result (or it is false) then set the Error event
Else
If cURL result includes 'VERIFIED' set the Success event
Else set the Invalid event

So it should only be possible to set one event unless the action is being run more than once.

The only other debugging action I can suggest requires hacking the action code to add the cURL response to the $form->data array so that can be included in the output - at present it's not visible,

Bob
This topic is locked and no more replies can be posted.