How to optionally redirect to a payment page after adding a node? I want to add an option to the node add form so that the user who creates the node can choose if the node will be " promoted " or not. If the promoted option is selected, then I want to redirect the user to a payment page, so that the option charges can be payed.

Any suggestions about how to do so?
Step 1a: Optional redirect to payment page

Add a Boolean field to each content type for which you want to offer such "Promoted" option, say its allowed options are Yes or No.

Then use the Rules module like so:


Event: After saving a node
Condition: (both conditions must be true)


Entity has field "Promoted"
Data Comparison "Promoted" = "Yes"

Action: Perform a page Redirect to your Payment Page


Step 1b: Limit node access while payment is not completed

To wait for the payment to be completed (and not "submit" the node yet), you could use the Content Access module, and the Content Access Rules Integrations module.

So that "After saving content" (= Event), you "Give 'authenticated user' the permission to 'view own content' for the specific node" (= Action). This additional "Action" can be added is a 2nd action to the same rumle suggested above.

This would be a variation of what is explained in this article also (within "Access Control Customized for Your Needs").

Step 2: Promote the node (after payment)

After the payment is received, you could use that "Event" to trigger another rule, which basically consists of these actions:


Mark the node as "Promoted".
Remove the node access restriction, so that all appropriate roles can view the node.


Step 3: Stop the promotion of the node

If at some point in the future the "Promoted" node no longer should be promoted, then you could use the Rules Scheduler ( a sub-module of the Rules scheduler) to trigger a rule to no longer mark the node as "Promoted.

Note: If you're not familiar (enough/yet) with Rules, the checkout the 32 (!!!) great, and free, video tutorials Learn the Rules framework.