I have a role which has access to create "X" content type and this content type "X" is setup with paid adverts. The content type is set up to be unpublished by default. The Node Subscription set up, it all looks correct.

Paypal sandbox is enabled, if that makes any difference...

So I sign up as a new user, create an "X" node, click the paypal subscribe tab, go through the paypal subscription process get redirected back to my site / default thank you page.

There is the message to log out and log back in before the node will be published. I log out, log back in. The node is not published. It does not show up under "My Account"

When logged in as an admin, I check the LM_Paypal settings / logs. All the Paypal IPNs show up in my list of "Saved IPNs"
When looking at LM_Paypal > Show Paid Adverts, nothing shows up.
When looking at LM_Paypal > Show Subscribers, The subscriber / node / status looks good, the subscription says "Live"

When checking "Admin > content management > content", the newly created "X" node is still unpublished.

Am I misunderstanding what this module does?

When setting the "X" content type to published by default and the going through the node creation / subscription process. The newly created "X" node shows up under "my account", When looking at "LM_Paypal > Show Paid Adverts" the node shows up and appears to be correct.
Then I go through the process of canceling the subscription to test unpublishing. Next, I Log in as admin, set the subscription to "eot" which should unpublish the node.

I log in as the user, check "my account" the node is listed as "not published" ok good...

BUT

I'm using views, the node still shows up (because according to Drupal the "X" node status is 1 (published)"

The node shows up but when I visit it the title is truncated with a "..." and the body is replaced with "not yet published".. Ok good..

But my other CCK fields still show up (location info, email etc) while they should also be hidden.

So is it true that this module does not actually "publish" / "unpublish" a node?

How hard would it be to modify this to actually set the node status to 0 when an "eot" IPN comes in. and set node status to 1 when a "signup" IPN comes in? And have the "X" node show up under "My account" / "LM_Paypal > Show Paid Adverts" Would this be done in "lm_paypal_paid_adverts.module" ? or "lm_paypal_subscriptions.module" ? both? someplace else?

Suggestions / direction appreciated...

Comments

lyricnz’s picture

LM Paypal does not (currently) publish/unpublish nodes, it just replaces the body with "not yet published". We're working on a significant refresh of the codebase in a new branch, so this might change in the future. In any case, LM Paypal doesn't know anything about other modules that add data to $node, like CCK - so it can't remove those fields (and it might be dangerous to do so). Suggest that you handle this at your theme layer. Again, the next version of the code might provide a hook, allowing other modules to modify $node for the paid/unpaid state.

internets’s picture

Hello lyricnz,

Thanks for the explanation, that make sense, so the module is working correctly.

I did get it working with views using theme level checks for the paid status.

One other question, sort of unrelated.

Do you have any tips for filtering node markers from showing up on a gmap map? The unpaid nodes still show up on the map. The description / views related field info is filtered out by my theme level php check but the markers still show up on the map.

Any suggestions for preventing the unpaid markers from showing up on the gmap map?

Thank you.

Great module!

lyricnz’s picture

Status: Active » Closed (works as designed)

I haven't really looked at this yet, but it should be possible to filter nodes using a views filter. This would probably require some small Views integration for LM Paypal Subscriptions, but I haven't written this yet.

I'll mark this issue as closed, as the original issue was resolved.