Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable Scope - available after post 1

Status
Not open for further replies.

ClulessChris

IS-IT--Management
Jan 27, 2003
890
GB
Is it possible to set a variable that although isn't part of the post array will be available allowing that the post array is sent to same page?

I'm trying to use Paypal IPN. When Paypal returns notification I'll want to insert into mySQL. Can I store the sql insert string so that it's available following Paypal notification?

Never knock on Death's door: ring the bell and run away! Death really hates that!
 
Not entirely sure what you mean, but as a guess, you could sue a SESSION variable to store anything you want through page reloads, or page changes.

Though I don't quite understand the benefit of storing an SQL statement like that.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
the return notification from the PayPal IPN should have all the information in it that you need. identifier and all. check the IPN specification carefully.
 
Both many thanks for your response, as you may have guessed I'm new to PHP. Allow me to explain what I'm trying to do.
I have an event registration page. much of the data is event related and and will be entered in to the db following Paypal validation. I also have the payment details.
Unless I'm mistaken the payment details get passed to and from Paypal but what about the registration data?
Intended program flow:
1. capture all data in a form
2. submit > validate and sanitize data. if all correct display summary form with Paypal payment option.
3. Paypal notification recieved, so insert into db.

Is this correct? am I missing something simple?

Never knock on Death's door: ring the bell and run away! Death really hates that!
 
the 'normal' process is

1. on a 'commitment' to purchase a product/event the details of the order are placed in your database. a pending status is flagged in the database table. This is typically at the point where the user has validated the 'basket' and asked to pay.
2. the user then 'pays' for the product. either this is done via data entry on your site or (more normally with paypal) you host an iframe or similar that pulls a template from paypal. the information is provided to paypal via a url, which then prefills the template)
3. the payment processor (paypal) informs the merchant that a product order with an id of xxx has been paid for.
4. the merchant thanks the user for the payment and changes the status flag in the database table. Fulfillment proceses are then engaged.

the precise method and API calls depend on which of the various paypal systems you are using.
 
jpadie, Many thanks that is most helpful

Never knock on Death's door: ring the bell and run away! Death really hates that!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top