Paypal Notify_URL (Advanced variables

One more question for you. In addition to the subscriptions and Paypal IPN we use with s2member, our customers are able to download software with their subscription.

We use a third party to protect the software. Within paypal, we can set up a button an advanced variable like this:


This automatically generates a serial number for the customer.

If we use s2member to process our payments and subcriptions we can’t use those paypal buttons. So is there a way to pass this “notify_url” along with the signup form?
(I don’t know if this your proxy keys, or some other implentation (if you have one))

Thank you

Hi Vincent.

s2 does handle PayPal’s proxy key, see: WP Admin > s2Member > PayPal Options > IPN > IPN w/ Proxy Key

About that notify_url, s2 also sets a custom IPN URL for the subscriptions it creates with PayPal, so I don’t know if you can set a second one for that service you mention.

What I’d do, would be create a hack that hooks on to s2’s PayPal notifications handler, and if the IPN is for the other service, forward it. Look at the files with “notify” in their name. For an example of a forwarder, you could look in the “pro extras” zip in your Account page, or google PayPal IPN forwarder.

Does that help? :slight_smile:

Their instructions say to set the IPN to that one. But of course I’m using the s2member ipn.

There is another option when building a paypal form.

From their instructions:

“o accomplish this, first create your Buy button HTML code snippet from the Merchant Services page of your Paypal account. Now paste a new hidden field named notify_url with value equal to the new URL with the form tag. Order data for this Buy or Subscription button is now posted to this URL instead of the default IPN URL.”

I was wondering if adding “notify_url=link above” would work in the shortcode.

If not I’ll have to turn to a devloper on this one as it’s a bit to techy for me.


I see.

Well, s2 sets the notify URL dynamically on checkout. The one in the PayPal configuration is a default.

You could try changing the default to that other app’s URL, and test a payment (1 cent per day subscription, for example) with s2 to see if the subscription’s IPN URL is set correctly to s2’s. If this works, then it’d save you the trouble of custom coding anything.

Keep s2’s logging enabled to see the core-ipn log. WP Admin > s2Member > Log Files

Let me know how it goes. :slight_smile:

Believe it or not, adding notify_url in the paypal pro code worked (to an extent). I didn’t have to touch the paypal IPN.

But it’s not passing along “item_name”

That has to match exactly in order for a serial number to be generated. (it doesn’t user product_name, just item_name. I put item_name-“blahblah” in the code. Didn’t work.

I’ll keep trying. Has to be a way.

1 Like

Cool. How did you add it?

Just added notify_url to the shortcode.

i have a ticket with the 3rd party provider to get feedback on the item_name. I think that may be a setting I have to use in their own system (called “tags”)…in other words “mapping.”

I’ll let you know the results.

Okay, let me know how it goes. :slight_smile:

I actually got it working with Paypal Buttons (not yet working with Paypal Pro.

I put the form code in the page, and replaced the notify_url with another one (the one that triggers the serial number for the software).

I see that the history of ipns is in my paypal account. And I have the s2member ipn set as default in paypal account…but it’s not in the button code.

Is this ok? I need to make sure it works. I set up a test transaction and cancelled it. The test user was upgrades correctly, but user wasn’t downgraded when cancelled…but I’m assuming they won’t be downgraded until the next billing cycle. I have to wait 30 days to find that out for sure I guess. Just need to make sure I’m not messing with s2member ipn.

The EOT gets set on cancellation, and its time would be the end of the paid period plus the grace time in your configuration. See: WP admin > s2Member > PayPal Options > Auto EOT Behavior

Right, PayPal has a history of the IPNs, so you can see there what URL a subscription’s IPN gets sent to.

It still surprises me that you’re adding custom IPN URL in the shortcode, though… Could you show me the customized shortcode you’re using? And is it working to set the custom URL for the subscription?


I’m not adding it through the shortcode…it doesn’t work… I am using the Paypal Button. using the “FORM” shown under the shortcode. (however adding notify_url to the shortcode does trigger the notification to the 3rd party app)

By the way, this is the app:

To the form I added

input type=“hidden” name=“notify_url” value=“

(that is the 3rd party app)


input type=“hidden” name=“item_name” value=“ThePRODUCTName”

And it works with the 3rd party app, producing a serial number and emailing it to the customer.

I can’t get this to work with Pro Forms (there is only a shortcode), which is my preference.

I tried to add those two lines to the template, but that didn’t work either. For some reason some information is not being passed along to the 3rd party app. When I look in their debug logs, there is no “item_name” for example.

Their data log:

Raw Payment Data Date: Sat, 13 Mar 2021 23:59:36 +0000
&payment_cycle=Monthly&txn_type=recurring_payment_profile_created&last_name=SMITH&initial_payment_status=Completed&next_payment_date=03:00:00 Apr 12, 2021 PDT&residence_country=US&initial_payment_amount=0.01&rp_invoice_id=1618315165:0 D:1¤cy_code=USD&time_created=15:59:26 Mar 13, 2021 PST&verify_sign=885834S9EVFx1e1GVARRQV6HKDwh44-Afg88uVOO1pM&period_type= Regular&payer_status=verified&tax=0.00&¬ify_version=3.9&amount=0.01&outstanding_balance=0.00&recurring_payment_id=I-MGDME3T4MY6J&product_name=OurProductName&ipn_track_id=6ca1d1e7ab12a IP unknown

Is there a FORM available instead of the pro form shortcode?

Ah, I see, that makes more sense now.

Well, remember that if you set the notification URL to the other app, then the IPNs won’t be sent to s2Member… I don’t know if that’s what you want, though.

It seems like you actually want both, s2 and Safe Activation, to receive the IPNs, right? If that’s the case, then you’ll need a script that receives the IPN and then forwards it to both applications. Or you can have one of the applications receive it, but have there a custom script that forwards a copy of the IPN to the other app.

PayPal only lets you set one IPN URL for a subscription, so to notify two apps, you need a custom solution as the examples I mentioned above.

Yea, I’ve given up on this. Sticking with paypal buttons which works well.

All I know is on the paypal buttons I set notify_url to safeactivation link.
Paypal IPn is set to s2member notify.
s2member works as it should returning the customer, upgrading them and setting up EOT and subscription. Their serial number is send via email.

So if notifty_url for s2member is bypassed, how is this working?

Thanks for the help.


If you’re setting it in the button’s HTML, that is a variable available for buttons, so is expected to work and is fine. :slight_smile:

What I’m saying wouldn’t work is that it at the same time notifies the other app you mentioned, i.e. have PayPal notify both. The PayPal subscription can only take one.

I thought you were asking how to also notify the other app, without losing the notifications to s2, in which case you’d need some customization to try doing it.