Community Support Forums — WordPress® ( Users Helping Users ) — 2011-05-23T02:43:01-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=6489 2011-05-23T02:43:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6489&p=15618#p15618 <![CDATA[Re: Duplicate API Cancellation Notification]]> Thanks for reporting this.
Yea, PayPal is known to do that every once in awhile.

In your script that handles your custom routine, I would take the %%subscr_id%% value and write a temporary file to disk. On the second Notification, check for the existence of that temporary file. If it exists, don't process it again.

Statistics: Posted by Jason Caldwell — May 23rd, 2011, 2:43 am


]]>
2011-05-19T01:00:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6489&p=15357#p15357 <![CDATA[Duplicate API Cancellation Notification]]> - subscr_cancel
- recurring_payment_profile_cancel

They BOTH trigger the s2m API Cancellations Notification, for which I have some php that sends an email to the site owner, who therefore gets two (nearly) identical emails when a member cancels.

The IPN log shows that s2m is aware of the duplication:
Code:
4 => 'Ignoring Cancellation. An Auto-EOT Time is already set for this Member. An s2Member API Notification will still be processed however.',
5 => 'Cancellation Notification URLs have been processed.',


How can I PREVENT one of the API Notifications from being processed, or somehow distinguish between the two different IPNs, so that my routine runs only once?

Statistics: Posted by toddz88 — May 19th, 2011, 1:00 am


]]>