tags:

views:

58

answers:

1

I'm creating a custom PayPal "Pay Now" button based on the results of the creation of a CCK node. Basically, someone is creating their own "registration" for an event and then are redirected to a "pay now" page which is of the "PHP" input type. When I do a "print_r($_POST)", the variable is empty.

How can I use the data just stored in the new node? Or, at least use PHP to inspect the POST parameters given to create the node? I'm trying to populate a "Pay Now" button for PayPal.

(disclaimer that I have some odd requirements as to how payment is handled/directed, otherwise I would use an existing module like UberCart)

Note that I've turned off users ability to view nodes that they've just created as it contains personal information.

+2  A: 

Well, the main question here is how you do the redirection after node submission. After completing a form submit cycle, the user normally gets redirected to whatever ends up in the forms '#redirect' entry. One effect of this redirect is that the POST data will be gone on the target page.

So in order to get access to the created node on the target page, you'll probably have to pass it the nid of the created node, e.g. by adding it to the redirect URL (potential security issue) or storing it in the session data in the node creation forms submit function. Then you can just do a node_load() on the target page, using the passed nid.

Henrik Opel
This is close to what I'll end up doing. I also ended up messing around with the nodeapi.
altCognito