Jump to content


Photo

PayPal Variables before / after processing Order


  • This topic is locked This topic is locked
3 replies to this topic

#1 Zak

Zak

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 06 February 2003 - 10:49 AM

Hi All,

k, here's the issue. I have created my order page and have looked at all different documentation to how to pass IPN variables etc., to PayPal... I am still kind of stuck on how to get the information to PayPal and save to a mySQL database that I have set up...

My intention is to generate an OrderID as the customer is sent to PayPal to Process their order, then assign that specific OrderID to the customer on the Thank You Page. Here are my main issues:

1. How do I get the auto-incremented OrderID number from the newly created record generated (in my database) upon submit to PayPal for processing,

2. Passing the new OrderID to PayPal as a variable for the specific customer,

3. Pass the PayPal Transaction ID to the specific record in the mySQL database table for the specific customer,

4. How do I pass ANY VAriable to PayPal from a textbox on my Order Page,

I have more, but this is the main concern at this time...

Just a quick background on my programming experience, I have been a software developer for about 5 years now... From VB 5 to VB 6, SQL Server 7 and M$ Access databases, Data conversions, etc...
I am including this information so that you will know that I do have experience with programming... only php and mySQL are new to me and are a little bit different from VB and SQL Server 7 (and using ADO - ActiveX Data Objects.) Another thing is that I'm having to rely on another server to pass variables back to me as opposed to keeping all of the variables global (or set for instant access)... That is one reason why I'm getting a little bit lost here...
Another issue is keeping the database info in the source code invisible for obvious reasons... the connection string is parsed from the server, however, all of the other variables are still visible in the source code as I test out all different things... "includes" have been quite unsuccessful...

Please Please Please help me resolve these issues... I'm goin' bald ripping my hair out over this... it is the only thing keeping me from launching my site at this time and I was expecting to have this site launched already...

Thank You... :)

btw/ My test order page is here:
http://www.InfoAgency.Info/test.php


#2 paypal_pb

paypal_pb

    Advanced Member

  • Members
  • 2,960 posts

Posted 06 February 2003 - 10:57 AM

The PayPal interface provides a few pass-through variables. If you are definitely creating a unique ID and want to prevent the same ID from being paid twice, use "invoice". Else, you could use "item_number". You'll need to generate the order number, of course. Your database system may have a mechanism for generating an auto-incrementing ID.

Pass-through fields are then echoed back to you in the IPN.

You'r going to need to do some PHP scripting to get this all to happen.

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn

#3 Zak

Zak

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 06 February 2003 - 11:09 AM

Hi pb,

Yes, I know I'm going to have to do some scripting on this... I am in the process of writing the script, and that is why I'm here asking for assistance... :)

I have successfully connected to the mySQL database, now, I need to create the new record (Insert) which will create a new record with an auto-incremented number that I will use for the Order ID. Problem is, I don't know where to insert the record into my database using the paypal order button, and then extract the newly generated OrderID number and pass it to PayPal as a variable (hence, "invoice" or "item_number") and then use the approved order to my thank you page...

I know the 'concepts' of how to do this to an extent, but functionality is the main issue... How would I incorporate my database function(s) with the <form action> with the Submit to PayPal button?

Thanks... :)


#4 paypal_pb

paypal_pb

    Advanced Member

  • Members
  • 2,960 posts

Posted 06 February 2003 - 11:22 AM

This sounds like more of a PHP/MySQL question. There are some good informational sites like sitepoint.com that you might have a look at.

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users